Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h

Issue 2755953003: [scheduler] Add RendererScheduler.TaskDurationPerQueueType. (Closed)
Patch Set: fixed compilation Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_ 5 #ifndef THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_
6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_ 6 #define THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDULER _IMPL_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 13 matching lines...) Expand all
24 #include "platform/scheduler/renderer/render_widget_signals.h" 24 #include "platform/scheduler/renderer/render_widget_signals.h"
25 #include "platform/scheduler/renderer/task_cost_estimator.h" 25 #include "platform/scheduler/renderer/task_cost_estimator.h"
26 #include "platform/scheduler/renderer/user_model.h" 26 #include "platform/scheduler/renderer/user_model.h"
27 #include "platform/scheduler/renderer/web_view_scheduler_impl.h" 27 #include "platform/scheduler/renderer/web_view_scheduler_impl.h"
28 #include "public/platform/scheduler/renderer/renderer_scheduler.h" 28 #include "public/platform/scheduler/renderer/renderer_scheduler.h"
29 29
30 namespace base { 30 namespace base {
31 namespace trace_event { 31 namespace trace_event {
32 class ConvertableToTraceFormat; 32 class ConvertableToTraceFormat;
33 } 33 }
34 class HistogramBase;
34 } 35 }
35 36
36 namespace blink { 37 namespace blink {
37 namespace scheduler { 38 namespace scheduler {
38 class AutoAdvancingVirtualTimeDomain; 39 class AutoAdvancingVirtualTimeDomain;
39 class RenderWidgetSchedulingState; 40 class RenderWidgetSchedulingState;
40 class WebViewSchedulerImpl; 41 class WebViewSchedulerImpl;
41 class TaskQueueThrottler; 42 class TaskQueueThrottler;
42 43
43 class PLATFORM_EXPORT RendererSchedulerImpl 44 class PLATFORM_EXPORT RendererSchedulerImpl
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 const TaskQueuePolicy& old_task_queue_policy, 399 const TaskQueuePolicy& old_task_queue_policy,
399 const TaskQueuePolicy& new_task_queue_policy) const; 400 const TaskQueuePolicy& new_task_queue_policy) const;
400 401
401 static const char* ExpensiveTaskPolicyToString( 402 static const char* ExpensiveTaskPolicyToString(
402 ExpensiveTaskPolicy expensive_task_policy); 403 ExpensiveTaskPolicy expensive_task_policy);
403 404
404 bool ShouldDisableThrottlingBecauseOfAudio(base::TimeTicks now); 405 bool ShouldDisableThrottlingBecauseOfAudio(base::TimeTicks now);
405 406
406 void AddQueueToWakeUpBudgetPool(TaskQueue* queue); 407 void AddQueueToWakeUpBudgetPool(TaskQueue* queue);
407 408
409 void RecordTaskMetrics(TaskQueue::QueueType queue_type,
410 base::TimeDelta duration);
411
412 void RecordTaskDurationPerQueueType(TaskQueue::QueueType queue_type,
413 base::TimeDelta duration);
414
408 SchedulerHelper helper_; 415 SchedulerHelper helper_;
409 IdleHelper idle_helper_; 416 IdleHelper idle_helper_;
410 IdleCanceledDelayedTaskSweeper idle_canceled_delayed_task_sweeper_; 417 IdleCanceledDelayedTaskSweeper idle_canceled_delayed_task_sweeper_;
411 std::unique_ptr<TaskQueueThrottler> task_queue_throttler_; 418 std::unique_ptr<TaskQueueThrottler> task_queue_throttler_;
412 RenderWidgetSignals render_widget_scheduler_signals_; 419 RenderWidgetSignals render_widget_scheduler_signals_;
413 420
414 const scoped_refptr<TaskQueue> control_task_queue_; 421 const scoped_refptr<TaskQueue> control_task_queue_;
415 const scoped_refptr<TaskQueue> compositor_task_queue_; 422 const scoped_refptr<TaskQueue> compositor_task_queue_;
416 scoped_refptr<TaskQueue> virtual_time_control_task_queue_; 423 scoped_refptr<TaskQueue> virtual_time_control_task_queue_;
417 std::unique_ptr<TaskQueue::QueueEnabledVoter> 424 std::unique_ptr<TaskQueue::QueueEnabledVoter>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 bool have_reported_blocking_intervention_in_current_policy; 487 bool have_reported_blocking_intervention_in_current_policy;
481 bool have_reported_blocking_intervention_since_navigation; 488 bool have_reported_blocking_intervention_since_navigation;
482 bool has_visible_render_widget_with_touch_handler; 489 bool has_visible_render_widget_with_touch_handler;
483 bool begin_frame_not_expected_soon; 490 bool begin_frame_not_expected_soon;
484 bool in_idle_period_for_testing; 491 bool in_idle_period_for_testing;
485 bool use_virtual_time; 492 bool use_virtual_time;
486 bool is_audio_playing; 493 bool is_audio_playing;
487 std::set<WebViewSchedulerImpl*> web_view_schedulers; // Not owned. 494 std::set<WebViewSchedulerImpl*> web_view_schedulers; // Not owned.
488 RAILModeObserver* rail_mode_observer; // Not owned. 495 RAILModeObserver* rail_mode_observer; // Not owned.
489 WakeUpBudgetPool* wake_up_budget_pool; // Not owned. 496 WakeUpBudgetPool* wake_up_budget_pool; // Not owned.
497 std::array<base::TimeDelta,
498 static_cast<size_t>(TaskQueue::QueueType::COUNT)>
499 unreported_task_duration;
500 base::HistogramBase* task_duration_per_queue_type_histogram;
490 }; 501 };
491 502
492 struct AnyThread { 503 struct AnyThread {
493 AnyThread(); 504 AnyThread();
494 ~AnyThread(); 505 ~AnyThread();
495 506
496 base::TimeTicks last_idle_period_end_time; 507 base::TimeTicks last_idle_period_end_time;
497 base::TimeTicks fling_compositor_escalation_deadline; 508 base::TimeTicks fling_compositor_escalation_deadline;
498 UserModel user_model; 509 UserModel user_model;
499 bool awaiting_touch_start_response; 510 bool awaiting_touch_start_response;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 570
560 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_; 571 base::WeakPtrFactory<RendererSchedulerImpl> weak_factory_;
561 572
562 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl); 573 DISALLOW_COPY_AND_ASSIGN(RendererSchedulerImpl);
563 }; 574 };
564 575
565 } // namespace scheduler 576 } // namespace scheduler
566 } // namespace blink 577 } // namespace blink
567 578
568 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_IMPL_H_ 579 #endif // THIRD_PARTY_WEBKIT_SOURCE_PLATFORM_SCHEDULER_RENDERER_RENDERER_SCHEDU LER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698