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

Unified Diff: chrome/browser/about_flags.cc

Issue 2847823004: [tracing] Allow enabling heap profiling from chrome://flags (Closed)
Patch Set: Rebase Created 3 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
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 5fcb4239f351221a9d1ed96adab5c4a3cc05bd52..a979408c53d0a550542a606f9430980288c10e6a 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -913,6 +913,16 @@ const FeatureEntry::FeatureVariation kDataReductionMainMenuFeatureVariations[] =
arraysize(kPersistentMenuItemEnabled), nullptr}};
#endif // OS_ANDROID
+const FeatureEntry::Choice kEnableHeapProfilingChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
+ {flag_descriptions::kEnableHeapProfilingModePseudo,
+ switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModePseudo},
+ {flag_descriptions::kEnableHeapProfilingModeNative,
+ switches::kEnableHeapProfiling, switches::kEnableHeapProfilingModeNative},
+ {flag_descriptions::kEnableHeapProfilingTaskProfiler,
+ switches::kEnableHeapProfiling,
+ switches::kEnableHeapProfilingTaskProfiler}};
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
@@ -2759,6 +2769,10 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAutoplayPolicyDescription, kOsAll,
MULTI_VALUE_TYPE(kAutoplayPolicyChoices)},
+ {"enable-heap-profiling", flag_descriptions::kEnableHeapProfilingName,
+ flag_descriptions::kEnableHeapProfilingDescription, kOsAll,
+ MULTI_VALUE_TYPE(kEnableHeapProfilingChoices)},
+
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | chrome/browser/flag_descriptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698