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

Unified Diff: media/video/gpu_memory_buffer_video_frame_pool.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: media/video/gpu_memory_buffer_video_frame_pool.cc
diff --git a/media/video/gpu_memory_buffer_video_frame_pool.cc b/media/video/gpu_memory_buffer_video_frame_pool.cc
index d75f7aaa690b4b5a2442be1d1797cb642a86eb92..b09c48a9090afb08fc2161f52c88ce0a30354178 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool.cc
@@ -19,6 +19,7 @@
#include "base/containers/stack_container.h"
#include "base/location.h"
#include "base/macros.h"
+#include "base/memory/shared_memory_tracker.h"
#include "base/strings/stringprintf.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/memory_dump_provider.h"
@@ -477,6 +478,11 @@ bool GpuMemoryBufferVideoFramePool::PoolImpl::OnMemoryDump(
buffer_id);
pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
pmd->AddOwnershipEdge(dump->guid(), shared_buffer_guid, kImportance);
+ base::SharedMemoryHandle shared_memory_handle =
+ plane_resource.gpu_memory_buffer->GetHandle().handle;
+ base::SharedMemoryTracker::AddOwnershipEdgeToSharedGlobalDump(
+ pmd, shared_buffer_guid, shared_memory_handle,
+ buffer_size_in_bytes);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698