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

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

Issue 2956683002: chrome://profiler infrastructure uses base time types. (Closed)
Patch Set: Address nit. Created 3 years, 5 months 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/debug/task_annotator.cc ('k') | base/profiler/tracked_time.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #ifndef BASE_PROFILER_SCOPED_PROFILE_H_ 6 #ifndef BASE_PROFILER_SCOPED_PROFILE_H_
7 #define BASE_PROFILER_SCOPED_PROFILE_H_ 7 #define BASE_PROFILER_SCOPED_PROFILE_H_
8 8
9 //------------------------------------------------------------------------------ 9 //------------------------------------------------------------------------------
10 // ScopedProfile provides basic helper functions for profiling a short 10 // ScopedProfile provides basic helper functions for profiling a short
11 // region of code within a scope. It is separate from the related ThreadData 11 // region of code within a scope. It is separate from the related ThreadData
12 // class so that it can be included without much other cruft, and provide the 12 // class so that it can be included without much other cruft, and provide the
13 // macros listed below. 13 // macros listed below.
14 14
15 #include "base/base_export.h" 15 #include "base/base_export.h"
16 #include "base/location.h" 16 #include "base/location.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/profiler/tracked_time.h"
19 #include "base/trace_event/heap_profiler.h" 18 #include "base/trace_event/heap_profiler.h"
20 #include "base/tracked_objects.h" 19 #include "base/tracked_objects.h"
21 20
22 // Two level indirection is required for correct macro substitution. 21 // Two level indirection is required for correct macro substitution.
23 #define PASTE_COUNTER_ON_NAME2(name, counter) name##counter 22 #define PASTE_COUNTER_ON_NAME2(name, counter) name##counter
24 #define PASTE_COUNTER_ON_NAME(name, counter) \ 23 #define PASTE_COUNTER_ON_NAME(name, counter) \
25 PASTE_COUNTER_ON_NAME2(name, counter) 24 PASTE_COUNTER_ON_NAME2(name, counter)
26 25
27 #define COUNTER_BASED_VARIABLE_NAME_FOR_PROFILING \ 26 #define COUNTER_BASED_VARIABLE_NAME_FOR_PROFILING \
28 PASTE_COUNTER_ON_NAME(some_profiler_variable_, __COUNTER__) 27 PASTE_COUNTER_ON_NAME(some_profiler_variable_, __COUNTER__)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 private: 66 private:
68 Births* birth_; // Place in code where tracking started. 67 Births* birth_; // Place in code where tracking started.
69 TaskStopwatch stopwatch_; 68 TaskStopwatch stopwatch_;
70 69
71 DISALLOW_COPY_AND_ASSIGN(ScopedProfile); 70 DISALLOW_COPY_AND_ASSIGN(ScopedProfile);
72 }; 71 };
73 72
74 } // namespace tracked_objects 73 } // namespace tracked_objects
75 74
76 #endif // BASE_PROFILER_SCOPED_PROFILE_H_ 75 #endif // BASE_PROFILER_SCOPED_PROFILE_H_
OLDNEW
« no previous file with comments | « base/debug/task_annotator.cc ('k') | base/profiler/tracked_time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698