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

Unified Diff: content/common/host_discardable_shared_memory_manager.cc

Issue 1259333003: [tracing] Add SkResourceCache as suballocation to avoid double counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@skia_v1
Patch Set: Nits. Created 5 years, 5 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
Index: content/common/host_discardable_shared_memory_manager.cc
diff --git a/content/common/host_discardable_shared_memory_manager.cc b/content/common/host_discardable_shared_memory_manager.cc
index d2afe38f1497de74b5d54d440600a75057005c71..098beebc38cdd3dcab05e281fa5c795432a1ef0f 100644
--- a/content/common/host_discardable_shared_memory_manager.cc
+++ b/content/common/host_discardable_shared_memory_manager.cc
@@ -155,6 +155,8 @@ HostDiscardableSharedMemoryManager::AllocateLockedDiscardableMemory(
bool HostDiscardableSharedMemoryManager::OnMemoryDump(
base::trace_event::ProcessMemoryDump* pmd) {
+ DiscardableMemoryAllocator::CreateMemoryPoolDumpForTracing(pmd);
+
base::AutoLock lock(lock_);
for (const auto& process_entry : processes_) {
const int child_process_id = process_entry.first;
@@ -162,8 +164,9 @@ bool HostDiscardableSharedMemoryManager::OnMemoryDump(
for (const auto& segment_entry : process_segments) {
const int segment_id = segment_entry.first;
const MemorySegment* segment = segment_entry.second.get();
- std::string dump_name = base::StringPrintf(
- "discardable/process_%x/segment_%d", child_process_id, segment_id);
+ std::string dump_name =
+ base::StringPrintf("discardable/segments/process_%x/segment_%d",
+ child_process_id, segment_id);
base::trace_event::MemoryAllocatorDump* dump =
pmd->CreateAllocatorDump(dump_name);
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,

Powered by Google App Engine
This is Rietveld 408576698