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

Unified Diff: profiler/stack_sampling_profiler.h

Issue 2045303002: Update to Chromium //base at Chromium commit 3e81715e6d3a4324362635aea46ce1f1a163cca1. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/base@master
Patch Set: Created 4 years, 6 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 | « prefs/OWNERS ('k') | profiler/stack_sampling_profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: profiler/stack_sampling_profiler.h
diff --git a/profiler/stack_sampling_profiler.h b/profiler/stack_sampling_profiler.h
index 5a6c3d0514d00a337d462f06e79c0e89ced5a249..4514cbe0427d6cab92524758001d95d0a75c3969 100644
--- a/profiler/stack_sampling_profiler.h
+++ b/profiler/stack_sampling_profiler.h
@@ -51,8 +51,7 @@ class NativeStackSampler;
//
// When all call stack profiles are complete, or the profiler is stopped, the
// completed callback is called from a thread created by the profiler with the
-// completed profiles. A profile is considered complete if all requested samples
-// were recorded for the profile (i.e. it was not stopped prematurely).
+// collected profiles.
//
// The results of the profiling are passed to the completed callback and consist
// of a vector of CallStackProfiles. Each CallStackProfile corresponds to a
@@ -195,14 +194,16 @@ class BASE_EXPORT StackSamplingProfiler {
void Stop();
private:
- // Collects a call stack profile from a single burst. Returns true if the
- // profile was collected, or false if collection was stopped before it
- // completed.
- bool CollectProfile(CallStackProfile* profile, TimeDelta* elapsed_time);
+ // Collects |profile| from a single burst. If the profiler was stopped
+ // during collection, sets |was_stopped| and provides the set of samples
+ // collected up to that point.
+ void CollectProfile(CallStackProfile* profile,
+ TimeDelta* elapsed_time,
+ bool* was_stopped);
// Collects call stack profiles from all bursts, or until the sampling is
- // stopped. If stopped before complete, |call_stack_profiles| will contain
- // only full bursts.
+ // stopped. If stopped before complete, the last profile in
+ // |call_stack_profiles| may contain a partial burst.
void CollectProfiles(CallStackProfiles* profiles);
scoped_ptr<NativeStackSampler> native_sampler_;
« no previous file with comments | « prefs/OWNERS ('k') | profiler/stack_sampling_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698