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

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: Clarifying terminology 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/profiler/scoped_profile.cc » ('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..efc7397c37272b00ec979aaf8dc62b70264ec473 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());
+ stopwatch.Stop(tracked_objects::ThreadData::NowForEndOfRun());
+ 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/profiler/scoped_profile.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698