diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-08 17:09:21 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-08 17:09:21 +0000 |
commit | dbe5d207423cafcd99684cef2f119a7e197798d3 (patch) | |
tree | 2e19e0b01436955084b24f5ad701d3bf6abda538 /base/tracked_objects.cc | |
parent | 1fd253983318446dcaebb317d7767ba0c403bd58 (diff) | |
download | chromium_src-dbe5d207423cafcd99684cef2f119a7e197798d3.zip chromium_src-dbe5d207423cafcd99684cef2f119a7e197798d3.tar.gz chromium_src-dbe5d207423cafcd99684cef2f119a7e197798d3.tar.bz2 |
Revert of Revert 108752 - Support tracking of IPC messages as tasks in profiler
This is a relanding of all the cleanup found in the
original CL, without the hooks to actually monitor the
IPC calls. I'm trying to find out what caused the
ASAN bot failures by landing piecemeal (per discussion
with Joi).
The original CL was:
Support tracking of IPC messages as tasks in profiler
Also started to do more cleanup, including creating
a base/profiler directory, and moving parts of the
over-sized tracked_objects.* into that directory.
r=rtenneti
Review URL: http://codereview.chromium.org/8480014
But this CL is:
TBR=joi
Review URL: http://codereview.chromium.org/8499022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracked_objects.cc')
-rw-r--r-- | base/tracked_objects.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index 2885eb0..5403af58 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -509,6 +509,31 @@ void ThreadData::TallyRunOnWorkerThreadIfTracking( } // static +void ThreadData::TallyRunInAScopedRegionIfTracking( + const Births* birth, + const TrackedTime& start_of_run, + const TrackedTime& end_of_run) { + if (!kTrackAllTaskObjects) + return; // Not compiled in. + + // Even if we have been DEACTIVATED, we will process any pending births so + // that our data structures (which counted the outstanding births) remain + // consistent. + if (!birth) + return; + + ThreadData* current_thread_data = Get(); + if (!current_thread_data) + return; + + Duration queue_duration = Duration(); + Duration run_duration = end_of_run - start_of_run; + current_thread_data->TallyADeath(*birth, queue_duration, run_duration); +} + + + +// static ThreadData* ThreadData::first() { base::AutoLock lock(*list_lock_); return all_thread_data_list_head_; |