Index: base/debug/task_annotator.h |
diff --git a/base/debug/task_annotator.h b/base/debug/task_annotator.h |
index aa5f17b11fee10e7c6ed47de0b3497571583640a..74068d920403eb0de6723be86e56ad6b4729ac4d 100644 |
--- a/base/debug/task_annotator.h |
+++ b/base/debug/task_annotator.h |
@@ -25,11 +25,8 @@ class BASE_EXPORT TaskAnnotator { |
const PendingTask& pending_task); |
// Run a previously queued task. |queue_function| should match what was |
- // passed into |DidQueueTask| for this task. |run_function| is used as the |
- // name for the trace event that surrounds the task's execution. |
- void RunTask(const char* queue_function, |
- const char* run_function, |
- const PendingTask& pending_task); |
+ // passed into |DidQueueTask| for this task. |
+ void RunTask(const char* queue_function, const PendingTask& pending_task); |
private: |
// Creates a process-wide unique ID to represent this task in trace events. |
@@ -40,6 +37,13 @@ class BASE_EXPORT TaskAnnotator { |
DISALLOW_COPY_AND_ASSIGN(TaskAnnotator); |
}; |
+#define TRACE_TASK_EXECUTION(run_function, task) \ |
+ TRACE_EVENT_WITH_MEMORY_TAG2( \ |
+ "toplevel", (run_function), \ |
+ (task).posted_from.function_name(), /* Name for memory tracking. */ \ |
+ "src_file", (task).posted_from.file_name(), "src_func", \ |
+ (task).posted_from.function_name()); |
+ |
} // namespace debug |
} // namespace base |