Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: base/profiler/scoped_tracker.h

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/profiler/scoped_profile.cc ('k') | base/profiler/scoped_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BASE_PROFILER_SCOPED_TRACKER_H_
6 #define BASE_PROFILER_SCOPED_TRACKER_H_
7
8 //------------------------------------------------------------------------------
9 // Utilities for temporarily instrumenting code to dig into issues that were
10 // found using profiler data.
11
12 #include "base/base_export.h"
13 #include "base/location.h"
14 #include "base/profiler/scoped_profile.h"
15
16 namespace tracked_objects {
17
18 // ScopedTracker instruments a region within the code if the instrumentation is
19 // enabled. It can be used, for example, to find out if a source of jankiness is
20 // inside the instrumented code region.
21 class BASE_EXPORT ScopedTracker {
22 public:
23 ScopedTracker(const Location& location);
24
25 // Enables instrumentation for the remainder of the current process' life. If
26 // this function is not called, all profiler instrumentations are no-ops.
27 static void Enable();
28
29 private:
30 const ScopedProfile scoped_profile_;
31
32 DISALLOW_COPY_AND_ASSIGN(ScopedTracker);
33 };
34
35 } // namespace tracked_objects
36
37 #endif // BASE_PROFILER_SCOPED_TRACKER_H_
OLDNEW
« no previous file with comments | « base/profiler/scoped_profile.cc ('k') | base/profiler/scoped_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698