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

Unified Diff: chrome/common/stack_sampling_configuration.h

Issue 2927593002: Make stack sampling profiler sample beyond startup. (Closed)
Patch Set: rebase + PROFILER_TEST_F 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
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/stack_sampling_configuration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
Mike Wittman 2017/06/21 14:49:06 If we have a unified function for getting the call
Alexei Svitkine (slow) 2017/06/29 20:51:04 Did you have some thoughts on how to organize this
Mike Wittman 2017/07/01 02:44:06 I'd recommend creating a function here like base::
Alexei Svitkine (slow) 2017/07/06 15:51:09 So if we go with this approach, then we need to ch
Mike Wittman 2017/07/06 17:25:52 Good point. Perhaps we should move both the wrappe
Alexei Svitkine (slow) 2017/07/06 19:36:25 It gets a bit messy: - We'll need to also expose
Mike Wittman 2017/07/06 22:14:01 Leaving for a later CL sgtm if it's going to be in
Alexei Svitkine (slow) 2017/07/07 16:18:48 The changes to StackSamplingConfiguration are need
Mike Wittman 2017/07/07 18:15:17 How about storing the CallStackProfileParams along
Alexei Svitkine (slow) 2017/07/07 19:04:14 Done. I still think it would be nice to move some
// 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);
};
« no previous file with comments | « chrome/common/DEPS ('k') | chrome/common/stack_sampling_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698