summaryrefslogtreecommitdiffstats
path: root/base/tracked_objects.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 03:41:04 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 03:41:04 +0000
commit7ceb4448df82ced9a4a311923d0465e33444effe (patch)
tree1b7ea12dc1a90acc1431ba19d1cfe941c86785f6 /base/tracked_objects.h
parent356dc759f225c84ed45075d87f3358936abaac36 (diff)
downloadchromium_src-7ceb4448df82ced9a4a311923d0465e33444effe.zip
chromium_src-7ceb4448df82ced9a4a311923d0465e33444effe.tar.gz
chromium_src-7ceb4448df82ced9a4a311923d0465e33444effe.tar.bz2
Minor cleanup preparing for recording parent-child data
I removed the branch-free macro. I really need to use a profiler to see if such changes are valuable. I cleaned up the placement of slots, putting the rare-to-use values together (so they'll probably get better handled by cache lines. r=rtenneti Review URL: http://codereview.chromium.org/8888004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113749 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracked_objects.h')
-rw-r--r--base/tracked_objects.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/base/tracked_objects.h b/base/tracked_objects.h
index 1eca68b..404306c 100644
--- a/base/tracked_objects.h
+++ b/base/tracked_objects.h
@@ -164,9 +164,6 @@
// upload via UMA (where correctness of data may be more significant than for a
// single screen of about:profiler).
//
-// TODO(jar): We need to save a single sample in each DeathData instance of the
-// times recorded. This sample should be selected in a uniformly random way.
-//
// TODO(jar): We should support (optionally) the recording of parent-child
// relationships for tasks. This should be done by detecting what tasks are
// Born during the running of a parent task. The resulting data can be used by
@@ -281,15 +278,20 @@ class BASE_EXPORT DeathData {
void Clear();
private:
- // Number of runs seen.
+ // Members are ordered from most regularly read and updated, to least
+ // frequently used. This might help a bit with cache lines.
+ // Number of runs seen (divisor for calculating averages).
int count_;
- // Data about run time durations.
+ // Basic tallies, used to compute averages.
DurationInt run_duration_sum_;
- DurationInt run_duration_max_;
- DurationInt run_duration_sample_;
- // Data about queueing times durations.
DurationInt queue_duration_sum_;
+ // Max values, used by local visualization routines. These are often read,
+ // but rarely updated.
+ DurationInt run_duration_max_;
DurationInt queue_duration_max_;
+ // Samples, used by by crowd sourcing gatherers. These are almost never read,
+ // and rarely updated.
+ DurationInt run_duration_sample_;
DurationInt queue_duration_sample_;
};