diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 22:36:21 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 22:36:21 +0000 |
commit | b2a9bbd42c6d5215c43067582fa2bca3cfc5e20e (patch) | |
tree | 3a19dea8153c354505ede0d67f4dd20fb03c4326 /base/tracking_info.h | |
parent | daf82f8e54e875ad6e97aef6952ef181de65caeb (diff) | |
download | chromium_src-b2a9bbd42c6d5215c43067582fa2bca3cfc5e20e.zip chromium_src-b2a9bbd42c6d5215c43067582fa2bca3cfc5e20e.tar.gz chromium_src-b2a9bbd42c6d5215c43067582fa2bca3cfc5e20e.tar.bz2 |
Enable tracking of objects by default
This is a reland of accumulated patches including CLs
8414036, 8425010, 8425013, 8424013.
It fully enables tracking of objects, as seen in about:tracking
in teh release build.
The problem this had in its initaial landing centered on
Mac instability in base_unittest. We were encountering crash
on exit of the tests, with a stack dump involving pthreads.
r=rtenneti
BUG=101856
Review URL: http://codereview.chromium.org/8429009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracking_info.h')
-rw-r--r-- | base/tracking_info.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/base/tracking_info.h b/base/tracking_info.h new file mode 100644 index 0000000..0886fdf --- /dev/null +++ b/base/tracking_info.h @@ -0,0 +1,41 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This is a simple struct with tracking information that is stored +// with a PendingTask (when message_loop is handling the task). +// Only the information that is shared with the profiler in tracked_objects +// are included in this structure. + + +#ifndef BASE_TRACKING_INFO_H_ +#define BASE_TRACKING_INFO_H_ + +#include "base/time.h" + +namespace tracked_objects { +class Location; +class Births; +} + +namespace base { + +// This structure is copied around by value. +struct BASE_EXPORT TrackingInfo { + TrackingInfo(const tracked_objects::Location& posted_from, + base::TimeTicks delayed_run_time); + ~TrackingInfo(); + + // Record of location and thread that the task came from. + tracked_objects::Births* birth_tally; + + // Time when the related task was posted. + base::TimeTicks time_posted; + + // The time when the task should be run. + base::TimeTicks delayed_run_time; +}; + +} // namespace base + +#endif // BASE_TRACKING_INFO_H_ |