Chromium Code Reviews| Index: base/task_scheduler/task_tracker.cc |
| diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc |
| index 29951a60f4b51020142ffb8fe32f2860b1af1a3d..460fa519435dc48f61574301c53cc5f0114ed2fc 100644 |
| --- a/base/task_scheduler/task_tracker.cc |
| +++ b/base/task_scheduler/task_tracker.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/debug/task_annotator.h" |
| #include "base/metrics/histogram_macros.h" |
| #include "base/threading/thread_restrictions.h" |
| +#include "base/trace_event/trace_event.h" |
| namespace base { |
| namespace internal { |
| @@ -15,6 +16,7 @@ namespace internal { |
| namespace { |
| const char kQueueFunctionName[] = "base::PostTask"; |
| +const char kRunFunctionName[] = "base::RunTask"; |
|
fdoray
2016/05/02 19:50:08
I don't want to call this TaskTracker::RunTask bec
gab
2016/05/02 20:31:22
Okay but base::RunTask isn't a thing... Maybe just
fdoray
2016/05/03 14:06:36
Done.
|
| // Upper bound for the |
| // TaskScheduler.BlockShutdownTasksPostedDuringShutdown histogram. |
| @@ -79,6 +81,8 @@ void TaskTracker::RunTask(const Task* task) { |
| if (!BeforeRunTask(shutdown_behavior)) |
| return; |
| + TRACE_TASK_EXECUTION(kRunFunctionName, *task); |
|
gab
2016/05/02 20:31:22
https://codereview.chromium.org/1911023002/ is sco
robliao
2016/05/02 20:32:34
Should this occur right after we SetSingletonAllow
fdoray
2016/05/03 14:06:36
I initially included SetSingletonAllowed into TRAC
|
| + |
| // All tasks run through here and the scheduler itself doesn't use singletons. |
| // Therefore, it isn't necessary to reset the singleton allowed bit after |
| // running the task. |