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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 2360143006: Stack sampling profiler: run the profiler in the GPU process on trunk builds (Closed)
Patch Set: . Created 4 years, 3 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/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 332491bdc5ec700d5bbdf3606b11f4a79c1b98dc..416f2c2c38af78e70a0da3dec859c27d86ca0e3c 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -120,6 +120,7 @@
#include "chrome/common/net/net_resource_provider.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/profiling.h"
+#include "chrome/common/stack_sampling_configuration.h"
#include "chrome/common/variations/variations_util.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/installer/util/google_update_settings.h"
@@ -763,7 +764,8 @@ ChromeBrowserMainParts::ChromeBrowserMainParts(
browser_field_trials_(parameters.command_line),
sampling_profiler_(
base::PlatformThread::CurrentId(),
- sampling_profiler_config_.GetSamplingParams(),
+ StackSamplingConfiguration::Get()->
+ GetSamplingParamsForCurrentProcess(),
metrics::CallStackProfileMetricsProvider::GetProfilerCallback(
metrics::CallStackProfileParams(
metrics::CallStackProfileParams::BROWSER_PROCESS,
@@ -773,7 +775,7 @@ ChromeBrowserMainParts::ChromeBrowserMainParts(
profile_(NULL),
run_message_loop_(true),
local_state_(NULL) {
- if (sampling_profiler_config_.IsProfilerEnabled())
+ if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess())
sampling_profiler_.Start();
// If we're running tests (ui_task is non-null).
@@ -892,7 +894,7 @@ void ChromeBrowserMainParts::SetupFieldTrials() {
// Register a synthetic field trial for the sampling profiler configuration
// that was already chosen.
- sampling_profiler_config_.RegisterSyntheticFieldTrial(
+ StackSamplingConfiguration::Get()->RegisterSyntheticFieldTrial(
base::Bind(&ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial));
#if defined(OS_WIN) || defined(OS_MACOSX) || \

Powered by Google App Engine
This is Rietveld 408576698