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

Unified Diff: sql/connection_memory_dump_provider.cc

Issue 2545173002: [tracing] Remove MemoryAllocatorDump::process_memory_dump (Closed)
Patch Set: Fix include. Created 4 years 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 | « sql/connection_memory_dump_provider.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sql/connection_memory_dump_provider.cc
diff --git a/sql/connection_memory_dump_provider.cc b/sql/connection_memory_dump_provider.cc
index 23a90450eba44d53c7bbaa8a6032d51677134385..5eecf71cb647ab960703bb4efaa4d04129d2cb22 100644
--- a/sql/connection_memory_dump_provider.cc
+++ b/sql/connection_memory_dump_provider.cc
@@ -55,18 +55,19 @@ bool ConnectionMemoryDumpProvider::OnMemoryDump(
}
bool ConnectionMemoryDumpProvider::ReportMemoryUsage(
- base::trace_event::MemoryAllocatorDump* mad) {
+ base::trace_event::ProcessMemoryDump* pmd,
+ const std::string& dump_name) {
int cache_size = 0;
int schema_size = 0;
int statement_size = 0;
- if (!GetDbMemoryUsage(&cache_size, &schema_size, &statement_size)) {
+ if (!GetDbMemoryUsage(&cache_size, &schema_size, &statement_size))
return false;
- }
+ auto* mad = pmd->CreateAllocatorDump(dump_name);
mad->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes,
cache_size + schema_size + statement_size);
- mad->process_memory_dump()->AddSuballocation(mad->guid(), FormatDumpName());
+ pmd->AddSuballocation(mad->guid(), FormatDumpName());
return true;
}
« no previous file with comments | « sql/connection_memory_dump_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698