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

Unified Diff: content/browser/indexed_db/leveldb/leveldb_database.cc

Issue 2880973002: memory-infra: skip IndexedDB file name in BACKGROUND dumps (Closed)
Patch Set: add comment Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/leveldb/leveldb_database.cc
diff --git a/content/browser/indexed_db/leveldb/leveldb_database.cc b/content/browser/indexed_db/leveldb/leveldb_database.cc
index f157f5ef29d708506f8e6f00677732f1f23d56d3..ca777c7614115c9b938e3fd00ad537ae2d713960 100644
--- a/content/browser/indexed_db/leveldb/leveldb_database.cc
+++ b/content/browser/indexed_db/leveldb/leveldb_database.cc
@@ -481,6 +481,14 @@ bool LevelDBDatabase::OnMemoryDump(
"leveldb/index_db/0x%" PRIXPTR, reinterpret_cast<uintptr_t>(db_.get())));
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes, size);
+
+ // Dumps in BACKGROUND mode cannot have strings or edges in order to minimize
+ // trace size and instrumentation overhead.
+ if (args.level_of_detail ==
+ base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND) {
+ return true;
+ }
+
dump->AddString("file_name", "", file_name_for_tracing);
// Memory is allocated from system allocator (malloc).
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698