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

Unified Diff: components/discardable_memory/common/discardable_shared_memory_heap.cc

Issue 2535213002: [WIP] Add SharedMemoryTracker to dump base::SharedMemory usage
Patch Set: Remove unneeded calls Created 4 years, 1 month 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: components/discardable_memory/common/discardable_shared_memory_heap.cc
diff --git a/components/discardable_memory/common/discardable_shared_memory_heap.cc b/components/discardable_memory/common/discardable_shared_memory_heap.cc
index 12d8eb6cfcc1737ff64376c2fad81f2037aa86ad..981f3f33943f5158a571ca695de1407095503e12 100644
--- a/components/discardable_memory/common/discardable_shared_memory_heap.cc
+++ b/components/discardable_memory/common/discardable_shared_memory_heap.cc
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/discardable_shared_memory.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/shared_memory_dump_provider.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/memory_dump_manager.h"
@@ -440,6 +441,8 @@ void DiscardableSharedMemoryHeap::OnMemoryDump(
// client.
const int kImportance = 2;
pmd->AddOwnershipEdge(segment_dump->guid(), shared_segment_guid, kImportance);
+ base::SharedMemoryDumpProvider::GetInstance()->AddSuballocation(
+ pmd, segment_dump->guid());
}
// static

Powered by Google App Engine
This is Rietveld 408576698