| 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 35b27d9a03a0a0212b0f807e83068881f3d4395b..9bfb3bc333c14244bad205036da7dbe1e04158c1 100644
|
| --- a/base/trace_event/memory_dump_manager.cc
|
| +++ b/base/trace_event/memory_dump_manager.cc
|
| @@ -169,7 +169,13 @@ void MemoryDumpManager::EnableHeapProfilingIfNeeded() {
|
| switches::kEnableHeapProfiling))
|
| return;
|
|
|
| - AllocationContextTracker::SetCaptureEnabled(true);
|
| + std::string profiling_mode = CommandLine::ForCurrentProcess()
|
| + ->GetSwitchValueASCII(switches::kEnableHeapProfiling);
|
| + AllocationContextTracker::SetCaptureMode(
|
| + profiling_mode == switches::kEnableHeapProfilingModeNative ?
|
| + AllocationContextTracker::CAPTURE_NATIVE_STACK :
|
| + AllocationContextTracker::CAPTURE_PSEUDO_STACK);
|
| +
|
| for (auto mdp : dump_providers_)
|
| mdp->dump_provider->OnHeapProfilingEnabled(true);
|
| heap_profiling_enabled_ = true;
|
|
|