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

Unified Diff: base/message_loop/message_loop.cc

Issue 445413003: Creating a framework for suppressing pollution of the profiler data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | base/profiler/scoped_profile.h » ('j') | base/tracked_objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index dd1a393ab08633514df9d6d021a1be7ff4dbd23f..3e4a4b19645694ce808f016c32812f8cf4205476 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -416,7 +416,9 @@ bool MessageLoop::ProcessNextDelayedNonNestableTask() {
void MessageLoop::RunTask(const PendingTask& pending_task) {
tracked_objects::TrackedTime start_time =
- tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally);
+ tracked_objects::ThreadData::NowForStartOfRun(pending_task.birth_tally);
+ tracked_objects::TaskStopwatch stopwatch;
+ stopwatch.Start(start_time);
TRACE_EVENT_FLOW_END1(TRACE_DISABLED_BY_DEFAULT("toplevel.flow"),
"MessageLoop::PostTask", TRACE_ID_MANGLE(GetTaskTraceID(pending_task)),
@@ -451,8 +453,9 @@ void MessageLoop::RunTask(const PendingTask& pending_task) {
FOR_EACH_OBSERVER(TaskObserver, task_observers_,
DidProcessTask(pending_task));
- tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(pending_task,
- start_time, tracked_objects::ThreadData::NowForEndOfRun());
jar (doing other things) 2014/08/08 01:34:48 It is pretty critical that NowForEndOFRun() is use
vadimt 2014/08/08 20:39:33 No, it was just a stupid mistake. I wanted to use
+ stopwatch.Stop();
+ tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(
+ pending_task, stopwatch);
nestable_tasks_allowed_ = true;
}
« no previous file with comments | « no previous file | base/profiler/scoped_profile.h » ('j') | base/tracked_objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698