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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2927593002: Make stack sampling profiler sample beyond startup. (Closed)
Patch Set: Remove debug log statements. Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | components/metrics/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 // BrowserMainParts ------------------------------------------------------------ 624 // BrowserMainParts ------------------------------------------------------------
625 625
626 ChromeBrowserMainParts::ChromeBrowserMainParts( 626 ChromeBrowserMainParts::ChromeBrowserMainParts(
627 const content::MainFunctionParams& parameters) 627 const content::MainFunctionParams& parameters)
628 : parameters_(parameters), 628 : parameters_(parameters),
629 parsed_command_line_(parameters.command_line), 629 parsed_command_line_(parameters.command_line),
630 result_code_(content::RESULT_CODE_NORMAL_EXIT), 630 result_code_(content::RESULT_CODE_NORMAL_EXIT),
631 startup_watcher_(new StartupTimeBomb()), 631 startup_watcher_(new StartupTimeBomb()),
632 shutdown_watcher_(new ShutdownWatcherHelper()), 632 shutdown_watcher_(new ShutdownWatcherHelper()),
633 sampling_profiler_( 633 sampling_profiler_(base::PlatformThread::CurrentId(),
634 base::PlatformThread::CurrentId(), 634 StackSamplingConfiguration::Get()
635 StackSamplingConfiguration::Get()-> 635 ->GetSamplingParamsForCurrentProcess(),
636 GetSamplingParamsForCurrentProcess(), 636 metrics::CallStackProfileMetricsProvider::
637 metrics::CallStackProfileMetricsProvider::GetProfilerCallback( 637 GetProfilerCallbackForBrowserProcessStartup()),
638 metrics::CallStackProfileParams(
639 metrics::CallStackProfileParams::BROWSER_PROCESS,
640 metrics::CallStackProfileParams::UI_THREAD,
641 metrics::CallStackProfileParams::PROCESS_STARTUP,
642 metrics::CallStackProfileParams::MAY_SHUFFLE))),
643 profile_(NULL), 638 profile_(NULL),
644 run_message_loop_(true), 639 run_message_loop_(true),
645 local_state_(NULL) { 640 local_state_(NULL) {
646 if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess()) 641 if (StackSamplingConfiguration::Get()->IsProfilerEnabledForCurrentProcess())
647 sampling_profiler_.Start(); 642 sampling_profiler_.Start();
648 643
649 // If we're running tests (ui_task is non-null). 644 // If we're running tests (ui_task is non-null).
650 if (parameters.ui_task) 645 if (parameters.ui_task)
651 browser_defaults::enable_help_app = false; 646 browser_defaults::enable_help_app = false;
652 647
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 chromeos::CrosSettings::Shutdown(); 2061 chromeos::CrosSettings::Shutdown();
2067 #endif // defined(OS_CHROMEOS) 2062 #endif // defined(OS_CHROMEOS)
2068 #endif // defined(OS_ANDROID) 2063 #endif // defined(OS_ANDROID)
2069 } 2064 }
2070 2065
2071 // Public members: 2066 // Public members:
2072 2067
2073 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2068 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2074 chrome_extra_parts_.push_back(parts); 2069 chrome_extra_parts_.push_back(parts);
2075 } 2070 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | components/metrics/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698