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

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: Removing segment dump from base. 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
« no previous file with comments | « content/common/discardable_shared_memory_heap.cc ('k') | skia/ext/skia_memory_dump_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b33bc8f3596b92163dda18a13b80317b11a3213b 100644
--- a/content/common/host_discardable_shared_memory_manager.cc
+++ b/content/common/host_discardable_shared_memory_manager.cc
@@ -155,6 +155,13 @@ HostDiscardableSharedMemoryManager::AllocateLockedDiscardableMemory(
bool HostDiscardableSharedMemoryManager::OnMemoryDump(
base::trace_event::ProcessMemoryDump* pmd) {
+ base::trace_event::MemoryAllocatorDump* objects_dump =
+ pmd->CreateAllocatorDump(GetMemoryPoolNameForTracing());
+ base::trace_event::MemoryAllocatorDump* discardable_segments_dump =
+ pmd->CreateAllocatorDump("discardable/segments");
+ pmd->AddOwnershipEdge(objects_dump->guid(),
+ discardable_segments_dump->guid());
+
base::AutoLock lock(lock_);
for (const auto& process_entry : processes_) {
const int child_process_id = process_entry.first;
@@ -162,8 +169,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,
« no previous file with comments | « content/common/discardable_shared_memory_heap.cc ('k') | skia/ext/skia_memory_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698