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

Unified Diff: base/profiler/stack_sampling_profiler.h

Issue 2530043002: Set process phases in the StackSamplingProfiler. (Closed)
Patch Set: improved comment Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/profiler/stack_sampling_profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/stack_sampling_profiler.h
diff --git a/base/profiler/stack_sampling_profiler.h b/base/profiler/stack_sampling_profiler.h
index 83e974767327b908dbfea7ec73bc893c00b99a36..622f6e5764a5b4e59fbf0a6eed6c7d328d737fc3 100644
--- a/base/profiler/stack_sampling_profiler.h
+++ b/base/profiler/stack_sampling_profiler.h
@@ -121,13 +121,13 @@ class BASE_EXPORT StackSamplingProfiler {
// The entire stack frame when the sample is taken.
std::vector<Frame> frames;
- // A bit-field indicating which process phases have passed. This can be
+ // A bit-field indicating which process milestones have passed. This can be
// used to tell where in the process lifetime the samples are taken. Just
- // as a "lifetime" can only move forward, these bits mark the phases of
+ // as a "lifetime" can only move forward, these bits mark the milestones of
// the processes life as they occur. Bits can be set but never reset. The
// actual definition of the individual bits is left to the user of this
// module.
- uint32_t process_phases = 0;
+ uint32_t process_milestones = 0;
};
// CallStackProfile represents a set of samples.
@@ -225,9 +225,9 @@ class BASE_EXPORT StackSamplingProfiler {
// frame. This is thread-safe so can be called from anywhere. The parameter
// value should be from an enumeration of the appropriate type with values
// ranging from 0 to 31, inclusive. This sets bits within Sample field of
- // |process_phases|. The actual meanings of these bits are defined (globally)
- // by the caller(s).
- static void SetProcessPhase(int phase);
+ // |process_milestones|. The actual meanings of these bits are defined
+ // (globally) by the caller(s).
+ static void SetProcessMilestone(int milestone);
static void ResetAnnotationsForTesting();
private:
@@ -280,7 +280,7 @@ class BASE_EXPORT StackSamplingProfiler {
// this must be atomic. A PostTask to move the the updates to that thread
// would skew the timing and a lock could result in deadlock if the thread
// making a change was also being profiled and got stopped.
- static subtle::Atomic32 process_phases_;
+ static subtle::Atomic32 process_milestones_;
// The thread whose stack will be sampled.
PlatformThreadId thread_id_;
« no previous file with comments | « no previous file | base/profiler/stack_sampling_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698