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

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: address comments 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
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 426d19ada52e7d3ebae8f225bb70475dd68ed57f..f8848ef1c54c377076d8afb4d582279dafca91c7 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).
@@ -893,8 +895,8 @@ void ChromeBrowserMainParts::SetupFieldTrials() {
// Register a synthetic field trial for the sampling profiler configuration
// that was already chosen.
std::string trial_name, group_name;
- if (sampling_profiler_config_.GetSyntheticFieldTrial(&trial_name,
- &group_name)) {
+ if (StackSamplingConfiguration::Get()->GetSyntheticFieldTrial(&trial_name,
+ &group_name)) {
ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(trial_name,
group_name);
}
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698