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

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

Issue 2535213002: [WIP] Add SharedMemoryTracker to dump base::SharedMemory usage
Patch Set: Address on primiano's review Created 3 years, 11 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: 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..2a1aad3c958b47db6f2e68e76a1fbca62f3e2391 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_tracker.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/memory_dump_manager.h"
@@ -440,6 +441,9 @@ void DiscardableSharedMemoryHeap::OnMemoryDump(
// client.
const int kImportance = 2;
pmd->AddOwnershipEdge(segment_dump->guid(), shared_segment_guid, kImportance);
+ base::SharedMemoryTracker::AddOwnershipEdgeToSharedGlobalDump(
+ pmd, shared_segment_guid,
+ shared_memory->handle(), shared_memory->mapped_size());
ssid 2017/01/24 04:39:50 Okay the right thing to do here is to keep the hie
}
// static

Powered by Google App Engine
This is Rietveld 408576698