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

Unified Diff: components/discardable_memory/service/discardable_shared_memory_manager.cc

Issue 2535213002: [WIP] Add SharedMemoryTracker to dump base::SharedMemory usage
Patch Set: Implement buckets 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/service/discardable_shared_memory_manager.cc
diff --git a/components/discardable_memory/service/discardable_shared_memory_manager.cc b/components/discardable_memory/service/discardable_shared_memory_manager.cc
index a974b2d9e27d8f35d1a59a9fcc7a5e8fdfc6e0e0..81c0b1f8543ba7337d5d1738c6cc03c13118e4ee 100644
--- a/components/discardable_memory/service/discardable_shared_memory_manager.cc
+++ b/components/discardable_memory/service/discardable_shared_memory_manager.cc
@@ -16,6 +16,7 @@
#include "base/memory/discardable_memory.h"
#include "base/memory/memory_coordinator_client_registry.h"
#include "base/memory/ptr_util.h"
+#include "base/memory/shared_memory_tracker.h"
#include "base/numerics/safe_math.h"
#include "base/process/memory.h"
#include "base/strings/string_number_conversions.h"
@@ -328,6 +329,9 @@ bool DiscardableSharedMemoryManager::OnMemoryDump(
client_tracing_id, segment_id);
pmd->CreateSharedGlobalAllocatorDump(shared_segment_guid);
pmd->AddOwnershipEdge(dump->guid(), shared_segment_guid);
+ base::SharedMemoryTracker::AddOwnershipEdgeToSharedGlobalDump(
+ pmd, shared_segment_guid,
+ segment->memory()->handle(), segment->memory()->mapped_size());
#if defined(COUNT_RESIDENT_BYTES_SUPPORTED)
if (args.level_of_detail ==

Powered by Google App Engine
This is Rietveld 408576698