Chromium Code Reviews| Index: base/tracked_objects.cc |
| diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc |
| index c45276b04d42e2588b447890fdfa9a4c8985ee06..23f877f31841c79727d45e4484d1beeac76dea98 100644 |
| --- a/base/tracked_objects.cc |
| +++ b/base/tracked_objects.cc |
| @@ -465,16 +465,6 @@ void ThreadData::TallyRunOnNamedThreadIfTracking( |
| if (!current_thread_data) |
| return; |
| - // To avoid conflating our stats with the delay duration in a PostDelayedTask, |
| - // we identify such tasks, and replace their post_time with the time they |
| - // were scheduled (requested?) to emerge from the delayed task queue. This |
| - // means that queueing delay for such tasks will show how long they went |
| - // unserviced, after they *could* be serviced. This is the same stat as we |
| - // have for non-delayed tasks, and we consistently call it queueing delay. |
| - TrackedTime effective_post_time = completed_task.delayed_run_time.is_null() |
| - ? tracked_objects::TrackedTime(completed_task.time_posted) |
| - : tracked_objects::TrackedTime(completed_task.delayed_run_time); |
| - |
| // Watch out for a race where status_ is changing, and hence one or both |
| // of start_of_run or end_of_run is zero. In that case, we didn't bother to |
| // get a time value since we "weren't tracking" and we were trying to be |
| @@ -483,7 +473,8 @@ void ThreadData::TallyRunOnNamedThreadIfTracking( |
| int32 queue_duration = 0; |
| int32 run_duration = 0; |
| if (!start_of_run.is_null()) { |
|
jar (doing other things)
2013/07/08 23:14:19
I think that start_of_run is probably now always s
Xianzhu
2013/07/09 00:39:08
Yes, we can use TRACE_EVENT_BEGIN and TRACE_EVENT_
|
| - queue_duration = (start_of_run - effective_post_time).InMilliseconds(); |
| + TrackedTime effective_time_posted(completed_task.EffectiveTimePosted()); |
| + queue_duration = (start_of_run - effective_time_posted).InMilliseconds(); |
| if (!end_of_run.is_null()) |
| run_duration = (end_of_run - start_of_run).InMilliseconds(); |
| } |