Chromium Code Reviews| Index: base/threading/worker_pool_posix.cc |
| =================================================================== |
| --- base/threading/worker_pool_posix.cc (revision 104925) |
| +++ base/threading/worker_pool_posix.cc (working copy) |
| @@ -87,7 +87,13 @@ |
| UNSHIPPED_TRACE_EVENT2("task", "WorkerThread::ThreadMain::Run", |
| "src_file", pending_task.posted_from.file_name(), |
| "src_func", pending_task.posted_from.function_name()); |
| + |
| + TimeTicks start_of_run = tracked_objects::ThreadData::Now(); |
| pending_task.task.Run(); |
| + tracked_objects::ThreadData::TallyADeathIfActive(pending_task.post_births, |
|
awong
2011/10/14 16:54:50
if the #define is false, won't pending_task.post_b
jar (doing other things)
2011/10/14 22:15:53
Look in this CL... in tracked_objects.cc .... you'
jar (doing other things)
2011/10/14 22:18:23
Doh.... I' misread.... your question is about the
jar (doing other things)
2011/10/14 22:59:57
Sorry about that... until I modify the PendingTask
|
| + pending_task.time_posted, |
| + start_of_run, |
| + NULL); |
| } |
| // The WorkerThread is non-joinable, so it deletes itself. |
| @@ -113,6 +119,10 @@ |
| const base::Closure& task) |
| : posted_from(posted_from), |
| task(task) { |
| +#if defined(TRACK_ALL_TASK_OBJECTS) |
| + post_births = tracked_objects::ThreadData::TallyABirthIfActive(posted_from); |
| + time_posted = tracked_objects::ThreadData::Now(); |
| +#endif // defined(TRACK_ALL_TASK_OBJECTS) |
| } |
| PosixDynamicThreadPool::PendingTask::~PendingTask() { |