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

Unified Diff: chrome/common/stack_sampling_configuration.h

Issue 2409953004: Stack sampling profiler: enable at 10% for GPU process on canary (Closed)
Patch Set: . Created 4 years, 2 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 1400d741590863a1f036beff661c890c14b2c598..d26d3286b39ea7583df170c36450a2b284a7386f 100644
--- a/chrome/common/stack_sampling_configuration.h
+++ b/chrome/common/stack_sampling_configuration.h
@@ -46,6 +46,7 @@ class StackSamplingConfiguration {
static StackSamplingConfiguration* Get();
private:
+ // Configuration to use for this Chrome instance.
enum ProfileConfiguration {
// Chrome-wide configurations set in the browser process.
PROFILE_DISABLED,
@@ -59,6 +60,18 @@ class StackSamplingConfiguration {
PROFILE_FROM_COMMAND_LINE
};
+ // Configuration variations, along with weights to use when randomly choosing
+ // one of a set of variations.
+ struct Variation {
+ ProfileConfiguration config;
+ int weight;
+ };
+
+ // Randomly chooses a configuration from the weighted variations. Weights must
+ // sum to 100.
Ilya Sherman 2016/10/12 20:52:31 Why are weights required to sum to 100? What if y
Mike Wittman 2016/10/12 21:50:41 It's not strictly needed, but is a small sanity ch
Ilya Sherman 2016/10/12 22:16:17 Got it, that makes sense. Would be nice to briefl
Mike Wittman 2016/10/12 23:00:32 Done.
+ static ProfileConfiguration ChooseConfiguration(
+ const std::vector<Variation>& variations);
+
// Generates sampling profiler configurations for all processes.
static ProfileConfiguration GenerateConfiguration();
« no previous file with comments | « no previous file | chrome/common/stack_sampling_configuration.cc » ('j') | chrome/common/stack_sampling_configuration.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698