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

Unified Diff: base/trace_event/trace_event.h

Issue 2356393002: Add ExecutionMode/SequenceToken and TaskPriority as arguments of TaskScheduler tasks in tracing (Closed)
Patch Set: Created 4 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
« no previous file with comments | « base/trace_event/common/trace_event_common.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_event.h
diff --git a/base/trace_event/trace_event.h b/base/trace_event/trace_event.h
index 1105429fd8e261495a55a3b86c3fc8b036e8b331..de06c7d4e56805eb1c632c6af2cca6b156d1df9f 100644
--- a/base/trace_event/trace_event.h
+++ b/base/trace_event/trace_event.h
@@ -437,10 +437,12 @@ TRACE_EVENT_API_CLASS_EXPORT extern \
INTERNAL_TRACE_EVENT_UID(scoped_context)(context);
// Implementation detail: internal macro to trace a task execution with the
-// location where it was posted from.
-#define INTERNAL_TRACE_TASK_EXECUTION(run_function, task) \
- TRACE_EVENT1("toplevel", run_function, "src_info", (task).GetTracingInfo()); \
- TRACE_HEAP_PROFILER_API_SCOPED_TASK_EXECUTION INTERNAL_TRACE_EVENT_UID( \
+// location where it was posted from. Additional metadata may optionally be
+// tacked on as well.
+#define INTERNAL_TRACE_TASK_EXECUTION(run_function, task, ...) \
+ INTERNAL_TRACE_EVENT_ADD_SCOPED("toplevel", run_function, "src_info", \
+ (task).GetTracingInfo(), ##__VA_ARGS__); \
+ TRACE_HEAP_PROFILER_API_SCOPED_TASK_EXECUTION INTERNAL_TRACE_EVENT_UID( \
task_event)((task).posted_from.file_name());
namespace trace_event_internal {
« no previous file with comments | « base/trace_event/common/trace_event_common.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698