diff options
author | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 17:50:22 +0000 |
---|---|---|
committer | wangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-10 17:50:22 +0000 |
commit | e1a38d600ac88e2b70a50f1a95416ccfcb2de858 (patch) | |
tree | a40d0f20dadc3a0ac7aed507a81e179920ee4e84 /base/tracking_info.h | |
parent | e7537bbb3170fa60eb28b3e39a95afbefac22fd3 (diff) | |
download | chromium_src-e1a38d600ac88e2b70a50f1a95416ccfcb2de858.zip chromium_src-e1a38d600ac88e2b70a50f1a95416ccfcb2de858.tar.gz chromium_src-e1a38d600ac88e2b70a50f1a95416ccfcb2de858.tar.bz2 |
Add queued_time_ms trace for events in message loop
These trace can be useful for examining the status of message loop
queues when debugging some performance issues.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/18083015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracking_info.h')
-rw-r--r-- | base/tracking_info.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/base/tracking_info.h b/base/tracking_info.h index dacbcea..ba9585e 100644 --- a/base/tracking_info.h +++ b/base/tracking_info.h @@ -11,6 +11,7 @@ #ifndef BASE_TRACKING_INFO_H_ #define BASE_TRACKING_INFO_H_ +#include "base/profiler/tracked_time.h" #include "base/time/time.h" namespace tracked_objects { @@ -27,6 +28,17 @@ struct BASE_EXPORT TrackingInfo { base::TimeTicks delayed_run_time); ~TrackingInfo(); + // 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 queuing 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 queuing delay. + tracked_objects::TrackedTime EffectiveTimePosted() const { + return tracked_objects::TrackedTime( + delayed_run_time.is_null() ? time_posted : delayed_run_time); + } + // Record of location and thread that the task came from. tracked_objects::Births* birth_tally; |