diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-14 05:24:07 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-14 05:24:07 +0000 |
commit | dda9768527c079b27944528570a825e31ac18b54 (patch) | |
tree | 3ac740ef9c87b70dfd9ee69e0f65c3a44a40dad2 /base/tracked_objects.h | |
parent | 94e334dcb4d70f9ec917e0303128b04bfa3d3f1f (diff) | |
download | chromium_src-dda9768527c079b27944528570a825e31ac18b54.zip chromium_src-dda9768527c079b27944528570a825e31ac18b54.tar.gz chromium_src-dda9768527c079b27944528570a825e31ac18b54.tar.bz2 |
Adjust interfaces to indicate when tracking is in progress
This should have no change whatever in function,
but simply changes the names of calls for
tracking time so that the ThreadData can know if
a new trackig has started or ended.
This will be helpful in (a future CL) measuring
when the thread is doing something that is not
tracked at all (e.g., processing UI events, etc.)
r=rtenneti
Review URL: http://codereview.chromium.org/8548005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracked_objects.h')
-rw-r--r-- | base/tracked_objects.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/base/tracked_objects.h b/base/tracked_objects.h index 5068e6a..806934f 100644 --- a/base/tracked_objects.h +++ b/base/tracked_objects.h @@ -26,7 +26,7 @@ // across a series of objects so that the counts and times can be rapidly // updated without (usually) having to lock the data, and hence there is usually // very little contention caused by the tracking. The data can be viewed via -// the about:tracking URL, with a variety of sorting and filtering choices. +// the about:profiler URL, with a variety of sorting and filtering choices. // // These classes serve as the basis of a profiler of sorts for the Tasks system. // As a result, design decisions were made to maximize speed, by minimizing @@ -118,7 +118,7 @@ // // The above description tries to define the high performance (run time) // portions of these classes. After gathering statistics, calls instigated -// by visiting about:tracking will assemble and aggregate data for display. The +// by visiting about:profiler will assemble and aggregate data for display. The // following data structures are used for producing such displays. They are // not performance critical, and their only major constraint is that they should // be able to run concurrently with ongoing augmentation of the birth and death @@ -153,7 +153,7 @@ // (example: how many threads are in a specific consecutive set of Snapshots? // What was the total birth count for that set? etc.). Aggregation instances // collect running sums of any set of snapshot instances, and are used to print -// sub-totals in an about:tracking page. +// sub-totals in an about:profiler page. // // TODO(jar): I need to store DataCollections, and provide facilities for taking // the difference between two gathered DataCollections. For now, I'm just @@ -663,6 +663,13 @@ class BASE_EXPORT ThreadData { static bool InitializeAndSetTrackingStatus(bool status); static bool tracking_status(); + // Special versions of Now() for getting times at start and end of a tracked + // run. They are super fast when tracking is disabled, and have some internal + // side effects when we are tracking, so that we can deduce the amount of time + // accumulated outside of execution of tracked runs. + static TrackedTime NowForStartOfRun(); + static TrackedTime NowForEndOfRun(); + // Provide a time function that does nothing (runs fast) when we don't have // the profiler enabled. It will generally be optimized away when it is // ifdef'ed to be small enough (allowing the profiler to be "compiled out" of @@ -722,7 +729,7 @@ class BASE_EXPORT ThreadData { static base::ThreadLocalStorage::Slot tls_index_; // Link to the most recently created instance (starts a null terminated list). - // The list is traversed by about:tracking when it needs to snapshot data. + // The list is traversed by about:profiler when it needs to snapshot data. // This is only accessed while list_lock_ is held. static ThreadData* all_thread_data_list_head_; // Set of ThreadData instances for use with worker threads. When a worker |