Chromium Code Reviews| Index: base/debug/task_annotator.h |
| diff --git a/base/debug/task_annotator.h b/base/debug/task_annotator.h |
| index 443c71bf30169ded3042c90d07343710b4cdab42..5bbce8b11c191aeb5b5bb737207cc4f6c036f21b 100644 |
| --- a/base/debug/task_annotator.h |
| +++ b/base/debug/task_annotator.h |
| @@ -9,6 +9,7 @@ |
| #include "base/base_export.h" |
| #include "base/macros.h" |
| +#include "base/trace_event/heap_profiler_allocation_context_tracker.h" |
| namespace base { |
| struct PendingTask; |
| @@ -39,10 +40,12 @@ class BASE_EXPORT TaskAnnotator { |
| DISALLOW_COPY_AND_ASSIGN(TaskAnnotator); |
| }; |
| -#define TRACE_TASK_EXECUTION(run_function, task) \ |
| - TRACE_EVENT2("toplevel", (run_function), "src_file", \ |
| - (task).posted_from.file_name(), "src_func", \ |
| - (task).posted_from.function_name()); |
| +#define TRACE_TASK_EXECUTION(run_function, task) \ |
| + TRACE_EVENT2("toplevel", (run_function), "src_file", \ |
| + (task).posted_from.file_name(), "src_func", \ |
| + (task).posted_from.function_name()); \ |
| + base::trace_event::AllocationContextTracker::ScopedTaskExecutionEvent event( \ |
|
Primiano Tucci (use gerrit)
2016/03/25 01:56:31
I'd use a name which tries to avoid conflics.
Also
ssid
2016/03/28 18:14:49
yes I think its a good idea to move it to trace_ev
|
| + (task).posted_from.file_name(), (task).posted_from.function_name()); |
|
Primiano Tucci (use gerrit)
2016/03/25 01:56:31
Looks like you never use the second argument. Why
ssid
2016/03/28 18:14:49
I was hoping I will need it soon and I will have t
|
| } // namespace debug |
| } // namespace base |