summaryrefslogtreecommitdiffstats
path: root/base/tracked_objects.h
diff options
context:
space:
mode:
authorvadimt <vadimt@chromium.org>2014-10-28 13:14:20 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-28 20:14:53 +0000
commit20175533a430be7798d031992b83a0b4f043e939 (patch)
treefce212f2f308fadcc66e13d19e2bd49d948e27f1 /base/tracked_objects.h
parentefc205007b618ce5fbd2c2a0f98e9bff0a2a19c1 (diff)
downloadchromium_src-20175533a430be7798d031992b83a0b4f043e939.zip
chromium_src-20175533a430be7798d031992b83a0b4f043e939.tar.gz
chromium_src-20175533a430be7798d031992b83a0b4f043e939.tar.bz2
Creating infrastructure for profiler instrumentation only in developer build and Canary channel.
This introduces TrackingProfile class that is equivalent to ScopedProfile what tracking is enabled and does nothing otherwise. There is an idea to remove the single-parametered ScopedProfile constructor, but for this CL, I’m leaving it. Otherwise, I’d have to replace ~100 ScopedProfile instantiations throughout the code with TrackingProfile, and the substantial changes would be lost in these changes. I’ll do this in a separate CL. I replaced one ScopedProfile just to make sure this will compile. BUG=401560 TBR=asanka@chromium.org Review URL: https://codereview.chromium.org/663093005 Cr-Commit-Position: refs/heads/master@{#301695}
Diffstat (limited to 'base/tracked_objects.h')
-rw-r--r--base/tracked_objects.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/tracked_objects.h b/base/tracked_objects.h
index 055cf19..222f581 100644
--- a/base/tracked_objects.h
+++ b/base/tracked_objects.h
@@ -709,6 +709,9 @@ class BASE_EXPORT TaskStopwatch {
TaskStopwatch();
~TaskStopwatch();
+ // Starts stopwatch.
+ void Start();
+
// Stops stopwatch.
void Stop();
@@ -744,12 +747,9 @@ class BASE_EXPORT TaskStopwatch {
TaskStopwatch* parent_;
#if DCHECK_IS_ON
- // State of the stopwatch. Stopwatch is first constructed in a running state,
- // then stopped, then destructed.
- enum {
- RUNNING,
- STOPPED
- } state_;
+ // State of the stopwatch. Stopwatch is first constructed in a created state
+ // state, then is optionally started/stopped, then destructed.
+ enum { CREATED, RUNNING, STOPPED } state_;
// Currently running stopwatch that is directly nested in this one, if such
// stopwatch exists. NULL otherwise.