| Index: components/leveldb/leveldb_database_impl.cc
|
| diff --git a/components/leveldb/leveldb_database_impl.cc b/components/leveldb/leveldb_database_impl.cc
|
| index 02b1a2d83cc70f4c49b5f5e8680fd6bc80acafbb..d7ff2298de7eaf7b14553021fb4c0eb9b19ea9a9 100644
|
| --- a/components/leveldb/leveldb_database_impl.cc
|
| +++ b/components/leveldb/leveldb_database_impl.cc
|
| @@ -16,6 +16,7 @@
|
| #include "base/trace_event/memory_dump_manager.h"
|
| #include "components/leveldb/env_mojo.h"
|
| #include "components/leveldb/public/cpp/util.h"
|
| +#include "third_party/leveldatabase/env_chromium.h"
|
| #include "third_party/leveldatabase/src/include/leveldb/db.h"
|
| #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
|
|
|
| @@ -308,11 +309,10 @@ bool LevelDBDatabaseImpl::OnMemoryDump(
|
| cache_->TotalCharge());
|
| }
|
|
|
| - const char* system_allocator_name =
|
| - base::trace_event::MemoryDumpManager::GetInstance()
|
| - ->system_allocator_pool_name();
|
| - if (system_allocator_name)
|
| - pmd->AddSuballocation(mad->guid(), system_allocator_name);
|
| + // All leveldb databases are already dumped by leveldb_env::DBTracker. Add
|
| + // an edge to avoid double counting.
|
| + pmd->AddSuballocation(mad->guid(),
|
| + leveldb_env::DBTracker::GetMemoryDumpName(db_.get()));
|
|
|
| if (memory_dump_id_) {
|
| auto* global_dump = pmd->CreateSharedGlobalAllocatorDump(*memory_dump_id_);
|
|
|