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

Unified Diff: base/message_loop.cc

Issue 8429009: Enable tracking of objects by default (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « base/message_loop.h ('k') | base/threading/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
===================================================================
--- base/message_loop.cc (revision 107970)
+++ base/message_loop.cc (working copy)
@@ -486,21 +486,17 @@
HistogramEvent(kTaskRunEvent);
-#if defined(TRACK_ALL_TASK_OBJECTS)
- TimeTicks start_of_run = tracked_objects::ThreadData::Now();
-#endif // defined(TRACK_ALL_TASK_OBJECTS)
+ tracked_objects::TrackedTime start_time = tracked_objects::ThreadData::Now();
FOR_EACH_OBSERVER(TaskObserver, task_observers_,
WillProcessTask(pending_task.time_posted));
pending_task.task.Run();
FOR_EACH_OBSERVER(TaskObserver, task_observers_,
DidProcessTask(pending_task.time_posted));
-#if defined(TRACK_ALL_TASK_OBJECTS)
- tracked_objects::ThreadData::TallyADeathIfActive(pending_task.post_births,
- pending_task.time_posted, pending_task.delayed_run_time, start_of_run,
- tracked_objects::ThreadData::Now());
-#endif // defined(TRACK_ALL_TASK_OBJECTS)
+ tracked_objects::ThreadData::TallyRunOnNamedThreadIfTracking(pending_task,
+ start_time, tracked_objects::ThreadData::Now());
+
nestable_tasks_allowed_ = true;
}
@@ -779,15 +775,11 @@
const tracked_objects::Location& posted_from,
TimeTicks delayed_run_time,
bool nestable)
- : task(task),
- time_posted(TimeTicks::Now()),
- delayed_run_time(delayed_run_time),
+ : base::TrackingInfo(posted_from, delayed_run_time),
+ task(task),
posted_from(posted_from),
sequence_num(0),
nestable(nestable) {
-#if defined(TRACK_ALL_TASK_OBJECTS)
- post_births = tracked_objects::ThreadData::TallyABirthIfActive(posted_from);
-#endif // defined(TRACK_ALL_TASK_OBJECTS)
}
MessageLoop::PendingTask::~PendingTask() {
« no previous file with comments | « base/message_loop.h ('k') | base/threading/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698