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

Unified Diff: chrome/common/stack_sampling_configuration.h

Issue 2927593002: Make stack sampling profiler sample beyond startup. (Closed)
Patch Set: Address some comments. Created 3 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
Index: chrome/common/stack_sampling_configuration.h
diff --git a/chrome/common/stack_sampling_configuration.h b/chrome/common/stack_sampling_configuration.h
index 452c4eee9e62c0987d62c74dccabc1793135f31f..cd1f170bd541020879c6451051edfe6f97b74805 100644
--- a/chrome/common/stack_sampling_configuration.h
+++ b/chrome/common/stack_sampling_configuration.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/profiler/stack_sampling_profiler.h"
+#include "components/metrics/call_stack_profile_metrics_provider.h"
namespace base {
class CommandLine;
@@ -25,7 +26,11 @@ class StackSamplingConfiguration {
// Get the stack sampling params to use for this process.
base::StackSamplingProfiler::SamplingParams
- GetSamplingParamsForCurrentProcess() const;
+ GetSamplingParamsForCurrentProcess() const;
+
+ // Returns the profiler callback to use for this process.
+ base::StackSamplingProfiler::CompletedCallback
+ GetProfilerCallbackForCurrentProcess();
// Returns true if the profiler should be started for the current process.
bool IsProfilerEnabledForCurrentProcess() const;
@@ -81,6 +86,10 @@ class StackSamplingConfiguration {
// PROFILE_FROM_COMMAND_LINE.
const ProfileConfiguration configuration_;
+ // The current profiling params. Not const since these may be changed when
+ // transitioning from start-up profiling to periodic profiling.
+ metrics::CallStackProfileParams profile_params_;
+
DISALLOW_COPY_AND_ASSIGN(StackSamplingConfiguration);
};

Powered by Google App Engine
This is Rietveld 408576698