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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 2903733003: memory-infra: LOG(FATAL) on unsupported heap profiler configs (Closed)
Patch Set: unicode space, AGAIN Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index 008b22a2d30be84f4e79db9b2c20de715c7c95ce..719529e45dddbc1da1ae91dcea0d846c6a7a49b6 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -201,6 +201,18 @@ void MemoryDumpManager::EnableHeapProfilingIfNeeded() {
switches::kEnableHeapProfiling))
return;
+#if !BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
Wez 2017/05/24 21:29:25 Do we ever actually set this under Windows? The W
Primiano Tucci (use gerrit) 2017/05/25 10:46:51 I thought so: From build/config/allocator.gni: i
+#if defined(OS_WIN)
+ const char kExtraErrMsg[] = "On Windows it requires release + static builds.";
+#else
+ const char kExtraErrMsg[] = "";
+#endif // defined(OS_WIN)
+ LOG(FATAL) << "--" << switches::kEnableHeapProfiling
+ << " requires building with use_experimental_allocator_shim=true "
+ "(on by default on the major platforms). "
+ << kExtraErrMsg;
+#endif // BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
+
std::string profiling_mode = CommandLine::ForCurrentProcess()
->GetSwitchValueASCII(switches::kEnableHeapProfiling);
if (profiling_mode == switches::kEnableHeapProfilingModePseudo) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698