OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/scheduler/renderer/renderer_scheduler_impl.h" | 5 #include "components/scheduler/renderer/renderer_scheduler_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/stack_trace.h" | 8 #include "base/debug/stack_trace.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/trace_event/trace_event.h" | 11 #include "base/trace_event/trace_event.h" |
12 #include "base/trace_event/trace_event_argument.h" | 12 #include "base/trace_event/trace_event_argument.h" |
13 #include "cc/output/begin_frame_args.h" | 13 #include "cc/output/begin_frame_args.h" |
14 #include "components/scheduler/base/task_queue_impl.h" | 14 #include "components/scheduler/base/task_queue_impl.h" |
15 #include "components/scheduler/base/task_queue_selector.h" | 15 #include "components/scheduler/base/task_queue_selector.h" |
16 #include "components/scheduler/base/virtual_time_domain.h" | 16 #include "components/scheduler/base/virtual_time_domain.h" |
17 #include "components/scheduler/child/scheduler_tqm_delegate.h" | 17 #include "components/scheduler/child/scheduler_tqm_delegate.h" |
18 #include "components/scheduler/renderer/web_view_scheduler_impl.h" | 18 #include "components/scheduler/renderer/web_view_scheduler_impl.h" |
19 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" | 19 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" |
20 | 20 |
21 namespace scheduler { | 21 namespace scheduler { |
22 namespace { | 22 namespace { |
23 // The run time of loading tasks is strongly bimodal. The vast majority are | 23 // The run time of loading tasks is strongly bimodal. The vast majority are |
24 // very cheap, but there are usually a handful of very expensive tasks (e.g ~1 | 24 // very cheap, but there are usually a handful of very expensive tasks (e.g ~1 |
25 // second on a mobile device) so we take a very pesimistic view when estimating | 25 // second on a mobile device) so we take a very pessimistic view when estimating |
26 // the cost of loading tasks. | 26 // the cost of loading tasks. |
27 const int kLoadingTaskEstimationSampleCount = 1000; | 27 const int kLoadingTaskEstimationSampleCount = 1000; |
28 const double kLoadingTaskEstimationPercentile = 99; | 28 const double kLoadingTaskEstimationPercentile = 99; |
29 const int kTimerTaskEstimationSampleCount = 1000; | 29 const int kTimerTaskEstimationSampleCount = 1000; |
30 const double kTimerTaskEstimationPercentile = 99; | 30 const double kTimerTaskEstimationPercentile = 99; |
31 const int kShortIdlePeriodDurationSampleCount = 10; | 31 const int kShortIdlePeriodDurationSampleCount = 10; |
32 const double kShortIdlePeriodDurationPercentile = 50; | 32 const double kShortIdlePeriodDurationPercentile = 50; |
33 // Amount of idle time left in a frame (as a ratio of the vsync interval) above | 33 // Amount of idle time left in a frame (as a ratio of the vsync interval) above |
34 // which main thread compositing can be considered fast. | 34 // which main thread compositing can be considered fast. |
35 const double kFastCompositingIdleTimeThreshold = .2; | 35 const double kFastCompositingIdleTimeThreshold = .2; |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 return "idle"; | 1417 return "idle"; |
1418 case v8::PERFORMANCE_LOAD: | 1418 case v8::PERFORMANCE_LOAD: |
1419 return "load"; | 1419 return "load"; |
1420 default: | 1420 default: |
1421 NOTREACHED(); | 1421 NOTREACHED(); |
1422 return nullptr; | 1422 return nullptr; |
1423 } | 1423 } |
1424 } | 1424 } |
1425 | 1425 |
1426 } // namespace scheduler | 1426 } // namespace scheduler |
OLD | NEW |