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

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: 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 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.
« 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