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

Unified Diff: chrome/browser/chrome_browser_main.h

Issue 1029653002: Enable startup profiling by Win x64 stack sampling profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@statprof-metrics-provider
Patch Set: do IsSamplingProfilingReportingEnabled() check when appending profiles Created 5 years, 8 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.h
diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h
index 1258b75605e29bbd9b23eaf750f406033623ec22..4ce3238ba7c6268b65b90e04a7c5dbc932009a2b 100644
--- a/chrome/browser/chrome_browser_main.h
+++ b/chrome/browser/chrome_browser_main.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/field_trial.h"
+#include "base/profiler/stack_sampling_profiler.h"
#include "base/tracked_objects.h"
#include "chrome/browser/chrome_browser_field_trials.h"
#include "chrome/browser/chrome_process_singleton.h"
@@ -109,10 +110,8 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
// Record time from process startup to present time in an UMA histogram.
void RecordBrowserStartupTime();
- // Records a time value to an UMA histogram in the context of the
- // PreReadExperiment field-trial. This also reports to the appropriate
- // sub-histogram (_PreRead(Enabled|Disabled)).
- void RecordPreReadExperimentTime(const char* name, base::TimeDelta time);
+ // Create parameters for sampling stacks during startup.
+ static base::StackSamplingProfiler::SamplingParams GetStartupSamplingParams();
// Methods for Main Message Loop -------------------------------------------
@@ -148,6 +147,10 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
// Parts are deleted in the inverse order they are added.
std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_;
+ // A profiler that periodically samples stack traces. Used to sample startup
+ // behavior.
+ base::StackSamplingProfiler sampling_profiler_;
+
// Members initialized after / released before main_message_loop_ ------------
scoped_ptr<BrowserProcessImpl> browser_process_;

Powered by Google App Engine
This is Rietveld 408576698