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

Side by Side Diff: Source/platform/scheduler/TracedTask.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 unified diff | Download patch
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | Source/platform/scheduler/TracedTask.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TracedTask_h
6 #define TracedTask_h
7
8 #include "platform/Task.h"
9 #include "platform/TraceEvent.h"
10 #include "platform/TraceLocation.h"
11
12 namespace blink {
13
14 #ifdef MANGLE_COMPILES_ON_WIN_OK
15 // TODO: Once win version compiles correctly when using TRACE_ID_MANGLE remove
16 // the ifdef to always mangle
17 #define MANGLE(id) TRACE_ID_MANGLE(id)
18 #else
19 #define MANGLE(id) (id)
20 #endif
21
22 class TracedTask {
23 public:
24 typedef Function<void()> Task;
25
26 void run() const;
27
28 private:
29 friend class Scheduler;
30 TracedTask(const Task&, const TraceLocation&, const char* traceName);
31
32 // Declared volatile as it is atomically incremented.
33 static volatile int s_nextFlowTraceID;
34
35 uint64_t m_flowTraceID;
36 Task m_task;
37 TraceLocation m_location;
38 const char* m_traceName;
39 };
40
41 } // namespace blink
42
43 #endif // TracedTask_h
OLDNEW
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | Source/platform/scheduler/TracedTask.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698