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

Unified Diff: components/leveldb_proto/leveldb_database.cc

Issue 2399903004: Add LevelDB database names to tracing path for easier debugging (Closed)
Patch Set: Created 4 years, 2 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 | « base/trace_event/memory_infra_background_whitelist.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/leveldb_proto/leveldb_database.cc
diff --git a/components/leveldb_proto/leveldb_database.cc b/components/leveldb_proto/leveldb_database.cc
index 5769710cb170a517364e92289b4e9aa701092aea..72937147a88eec49fe56fae2858a97a8b3668e54 100644
--- a/components/leveldb_proto/leveldb_database.cc
+++ b/components/leveldb_proto/leveldb_database.cc
@@ -187,8 +187,11 @@ bool LevelDB::OnMemoryDump(const base::trace_event::MemoryDumpArgs& dump_args,
res = base::StringToUint64(value, &size);
DCHECK(res);
+ std::string dump_name = "leveldb/leveldb_proto";
+ if (!client_name_.empty())
+ dump_name += "/" + client_name_;
Primiano Tucci (use gerrit) 2016/10/07 02:25:56 can this have weird chars or /, or is it just fixe
ssid 2016/10/07 19:02:23 All these strings are static strings defined as na
base::trace_event::MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(
- base::StringPrintf("leveldb/leveldb_proto/0x%" PRIXPTR,
+ base::StringPrintf("%s/0x%" PRIXPTR, dump_name.c_str(),
reinterpret_cast<uintptr_t>(db_.get())));
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes, size);
« no previous file with comments | « base/trace_event/memory_infra_background_whitelist.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698