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

Unified Diff: content/renderer/scheduler/renderer_scheduler_impl.h

Issue 681793003: scheduler: Add support for tracing scheduler state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/scheduler/renderer_scheduler_impl.h
diff --git a/content/renderer/scheduler/renderer_scheduler_impl.h b/content/renderer/scheduler/renderer_scheduler_impl.h
index 555573d19f3a4dc0cada0bc4f2cdc8764065ad34..72a7ce7c794a0ef575d5e78c48b5e04dcd8aa114 100644
--- a/content/renderer/scheduler/renderer_scheduler_impl.h
+++ b/content/renderer/scheduler/renderer_scheduler_impl.h
@@ -12,6 +12,12 @@
#include "content/renderer/scheduler/single_thread_idle_task_runner.h"
#include "content/renderer/scheduler/task_queue_manager.h"
+namespace base {
+namespace debug {
+class ConvertableToTraceFormat;
+}
+}
+
namespace content {
class RendererSchedulerSelector;
@@ -76,6 +82,11 @@ class RendererSchedulerImpl : public RendererScheduler,
kCompositorPriorityPolicy,
};
+ // Returns the serialized scheduler state for tracing.
+ scoped_refptr<base::debug::ConvertableToTraceFormat> AsValueLocked() const;
+ static const char* TaskQueueIdToString(QueueId queue_id);
+ static const char* PolicyToString(Policy policy);
+
// The time we should stay in CompositorPriority mode for after a touch event.
static const int kCompositorPriorityAfterTouchMillis = 100;
@@ -111,7 +122,7 @@ class RendererSchedulerImpl : public RendererScheduler,
// The incoming_signals_lock_ mutex protects access to last_input_time_
// and write access to policy_may_need_update_.
- base::Lock incoming_signals_lock_;
+ mutable base::Lock incoming_signals_lock_;
alexclarke 2014/10/27 17:58:11 Hmm I thought that AssertAcquired was const: http
Sami 2014/10/28 12:57:47 Oops, I added this since I was taking the lock ear
base::TimeTicks last_input_time_;
base::WeakPtr<RendererSchedulerImpl> weak_renderer_scheduler_ptr_;

Powered by Google App Engine
This is Rietveld 408576698