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

Unified Diff: base/task_scheduler/task_tracker.cc

Issue 1937323002: TaskScheduler: Add TRACE_TASK_EXECUTION to TaskTracker::RunTask. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR robliao #7 (add comment) Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/task_scheduler/task_tracker.cc
diff --git a/base/task_scheduler/task_tracker.cc b/base/task_scheduler/task_tracker.cc
index f38ec06130e6bebfd77d469478a34dea93b34951..85ca67f43b2aff007c158ac3eae21e703bfd097f 100644
--- a/base/task_scheduler/task_tracker.cc
+++ b/base/task_scheduler/task_tracker.cc
@@ -10,6 +10,7 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "base/threading/thread_restrictions.h"
+#include "base/trace_event/trace_event.h"
namespace base {
namespace internal {
@@ -18,6 +19,10 @@ namespace {
const char kQueueFunctionName[] = "base::PostTask";
+// This name conveys that a Task is run by the task scheduler without revealing
+// its implementation details.
+const char kRunFunctionName[] = "TaskSchedulerRunTask";
+
// Upper bound for the
// TaskScheduler.BlockShutdownTasksPostedDuringShutdown histogram.
const HistogramBase::Sample kMaxBlockShutdownTasksPostedDuringShutdown = 1000;
@@ -102,6 +107,8 @@ void TaskTracker::RunTask(const Task* task) {
new ThreadTaskRunnerHandle(task->single_thread_task_runner_ref));
}
+ TRACE_TASK_EXECUTION(kRunFunctionName, *task);
+
debug::TaskAnnotator task_annotator;
task_annotator.RunTask(kQueueFunctionName, *task);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698