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

Unified Diff: chrome/app/chrome_main.cc

Issue 2941823002: Add flags and skeleton for profiling process. (Closed)
Patch Set: Fix header Created 3 years, 6 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/app/DEPS ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main.cc
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index aec129c9bd1b72991d0c4e482c2c41e3e91b47e5..9d09439d1bf317564c813df2a1a64e700f51c3dd 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -15,6 +15,10 @@
#include "headless/public/headless_shell.h"
#include "ui/gfx/switches.h"
+#if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING)
+#include "chrome/profiling/profiling_main.h"
+#endif
+
#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
#include "services/service_manager/runner/common/client_util.h"
#endif
@@ -92,6 +96,7 @@ int ChromeMain(int argc, const char** argv) {
const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
ALLOW_UNUSED_LOCAL(command_line);
+ // Chrome-specific process modes.
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
if (command_line->HasSwitch(switches::kHeadless)) {
#if defined(OS_MACOSX)
@@ -101,6 +106,13 @@ int ChromeMain(int argc, const char** argv) {
}
#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
+#if BUILDFLAG(ENABLE_OOP_HEAP_PROFILING)
+ if (command_line->GetSwitchValueASCII(switches::kProcessType) ==
+ "profiling") {
+ return profiling::ProfilingMain(*command_line);
+ }
+#endif // ENABLE_OOP_HEAP_PROFILING
+
#if defined(OS_CHROMEOS) && BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
if (service_manager::ServiceManagerIsRemote())
params.env_mode = aura::Env::Mode::MUS;
« no previous file with comments | « chrome/app/DEPS ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698