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

Unified Diff: Source/platform/scheduler/Scheduler.h

Issue 490913002: Adding flow traces for blink scheduler events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merge with master and disable mangle Created 6 years, 3 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
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scheduler/Scheduler.h
diff --git a/Source/platform/scheduler/Scheduler.h b/Source/platform/scheduler/Scheduler.h
index 91fe5384fa7b53e548efb0558ee76b3386a93810..44cc0ef5567e0a6b06538b633266340364f1f8ae 100644
--- a/Source/platform/scheduler/Scheduler.h
+++ b/Source/platform/scheduler/Scheduler.h
@@ -6,7 +6,7 @@
#define Scheduler_h
#include "platform/PlatformExport.h"
-#include "platform/TraceLocation.h"
+#include "platform/scheduler/TracedTask.h"
#include "wtf/DoubleBufferedDeque.h"
#include "wtf/Functional.h"
#include "wtf/Noncopyable.h"
@@ -69,24 +69,13 @@ protected:
CompositorPriority,
};
- class TracedTask {
- public:
- TracedTask(const Task& task, const TraceLocation& location)
- : m_task(task)
- , m_location(location) { }
-
- void run();
-
- private:
- Task m_task;
- TraceLocation m_location;
- };
-
Scheduler();
virtual ~Scheduler();
- static void sharedTimerAdapter();
+ void scheduleIdleTask(const TraceLocation&, const IdleTask&);
+ void postHighPriorityTaskInternal(const TraceLocation&, const Task&, const char* traceName);
+ static void sharedTimerAdapter();
// Start of main thread only members -----------------------------------
@@ -115,9 +104,6 @@ protected:
// End of main thread only members -------------------------------------
-
- void scheduleIdleTask(const TraceLocation&, const IdleTask&);
-
bool hasPendingHighPriorityWork() const;
void enterSchedulerPolicyLocked(SchedulerPolicy);
@@ -134,7 +120,9 @@ protected:
DoubleBufferedDeque<TracedTask> m_pendingHighPriorityTasks;
double m_compositorPriorityPolicyEndTimeSeconds;
+ // Declared volatile as it is atomically incremented.
volatile int m_highPriorityTaskCount;
+
bool m_highPriorityTaskRunnerPosted;
// Don't access m_schedulerPolicy directly, use enterSchedulerPolicyLocked and SchedulerPolicy instead.
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/scheduler/Scheduler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698