| 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 eed070a78292a4b045724d519c3c0a293ade377d..2eea04a4775c02dbc0d4d5aa7c22644b717cc034 100644
|
| --- a/base/trace_event/memory_dump_manager.cc
|
| +++ b/base/trace_event/memory_dump_manager.cc
|
| @@ -7,6 +7,7 @@
|
| #include <algorithm>
|
| #include <utility>
|
|
|
| +#include "base/allocator/features.h"
|
| #include "base/atomic_sequence_num.h"
|
| #include "base/base_switches.h"
|
| #include "base/command_line.h"
|
| @@ -111,7 +112,12 @@ const char* const MemoryDumpManager::kSystemAllocatorPoolName =
|
| #if defined(MALLOC_MEMORY_TRACING_SUPPORTED)
|
| MallocDumpProvider::kAllocatedObjects;
|
| #elif defined(OS_WIN)
|
| +// If the allocator shim is enabled, the malloc provider will do.
|
| +#if BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
|
| + MallocDumpProvider::kAllocatedObjects;
|
| +#else
|
| WinHeapDumpProvider::kAllocatedObjects;
|
| +#endif
|
| #else
|
| nullptr;
|
| #endif
|
| @@ -207,8 +213,13 @@ void MemoryDumpManager::Initialize(MemoryDumpManagerDelegate* delegate,
|
| #endif
|
|
|
| #if defined(OS_WIN)
|
| +// If the allocator shim is enabled, the malloc provider will do.
|
| +#if BUILDFLAG(USE_EXPERIMENTAL_ALLOCATOR_SHIM)
|
| + RegisterDumpProvider(MallocDumpProvider::GetInstance(), "Malloc", nullptr);
|
| +#else
|
| RegisterDumpProvider(WinHeapDumpProvider::GetInstance(), "WinHeap", nullptr);
|
| #endif
|
| +#endif
|
|
|
| // If tracing was enabled before initializing MemoryDumpManager, we missed the
|
| // OnTraceLogEnabled() event. Synthetize it so we can late-join the party.
|
|
|