Commit c5f7441b authored by ssid's avatar ssid Committed by Commit bot

Revert of Add LevelDB database names to tracing path for easier debugging...

Revert of Add LevelDB database names to tracing path for easier debugging (patchset #2 id:40001 of https://codereview.chromium.org/2399903004/ )

Reason for revert:
We identified the largest consumer of memory in leveldb_proto databases and fixed it crbug.com/662019.
It is not safe to add dumps with database names since new clients of leveldb_proto might not update the whitelist and we will miss the memory usage.

Original issue's description:
> Add LevelDB database names to tracing path for easier debugging
>
> The data from field trials show large databases, but not sure what are
> their names. So, adding names to the path.
>
> BUG=645126
>
> Committed: https://crrev.com/279f8d702e8b2fffda1b7f50b311c5202331e121
> Cr-Commit-Position: refs/heads/master@{#424055}

TBR=primiano@chromium.org,nyquist@chromium.org,mathp@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=645126

Review-Url: https://codereview.chromium.org/2601233002
Cr-Commit-Position: refs/heads/master@{#442782}
parent c2db8815
...@@ -51,12 +51,6 @@ const char* const kAllocatorDumpNameWhitelist[] = { ...@@ -51,12 +51,6 @@ const char* const kAllocatorDumpNameWhitelist[] = {
"java_heap/allocated_objects", "java_heap/allocated_objects",
"leveldb/index_db/0x?", "leveldb/index_db/0x?",
"leveldb/leveldb_proto/0x?", "leveldb/leveldb_proto/0x?",
"leveldb/leveldb_proto/BudgetManager/0x?",
"leveldb/leveldb_proto/DomDistillerStore/0x?",
"leveldb/leveldb_proto/GCMKeyStore/0x?",
"leveldb/leveldb_proto/ImageManager/0x?",
"leveldb/leveldb_proto/NTPSnippetImages/0x?",
"leveldb/leveldb_proto/NTPSnippets/0x?",
"leveldb/value_store/Extensions.Database.Open.Settings/0x?", "leveldb/value_store/Extensions.Database.Open.Settings/0x?",
"leveldb/value_store/Extensions.Database.Open.Rules/0x?", "leveldb/value_store/Extensions.Database.Open.Rules/0x?",
"leveldb/value_store/Extensions.Database.Open.State/0x?", "leveldb/value_store/Extensions.Database.Open.State/0x?",
......
...@@ -194,14 +194,16 @@ bool LevelDB::OnMemoryDump(const base::trace_event::MemoryDumpArgs& dump_args, ...@@ -194,14 +194,16 @@ bool LevelDB::OnMemoryDump(const base::trace_event::MemoryDumpArgs& dump_args,
res = base::StringToUint64(value, &size); res = base::StringToUint64(value, &size);
DCHECK(res); DCHECK(res);
std::string dump_name = "leveldb/leveldb_proto";
if (!client_name_.empty())
dump_name += "/" + client_name_;
base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump( base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(
base::StringPrintf("%s/0x%" PRIXPTR, dump_name.c_str(), base::StringPrintf("leveldb/leveldb_proto/0x%" PRIXPTR,
reinterpret_cast<uintptr_t>(db_.get()))); reinterpret_cast<uintptr_t>(db_.get())));
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize, dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes, size); base::trace_event::MemoryAllocatorDump::kUnitsBytes, size);
if (!client_name_.empty() &&
dump_args.level_of_detail !=
base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND) {
dump->AddString("client_name", "", client_name_);
}
// Memory is allocated from system allocator (malloc). // Memory is allocated from system allocator (malloc).
const char* system_allocator_pool_name = const char* system_allocator_pool_name =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment