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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 2535213002: [WIP] Add SharedMemoryTracker to dump base::SharedMemory usage
Patch Set: (rebase) Created 3 years, 7 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: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index aab62d820de3bac55fa60803a9cc6246165e1294..44642570cef9e86d8c28fa4f2402b981a2a8e6df 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -25,7 +25,6 @@
#include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h"
#include "gpu/ipc/common/gpu_memory_buffer_support.h"
#include "ui/gfx/buffer_format_util.h"
-#include "ui/gfx/gpu_memory_buffer_tracing.h"
#include "ui/gl/gl_switches.h"
namespace content {
@@ -175,14 +174,16 @@ bool BrowserGpuMemoryBufferManager::OnMemoryDump(
base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid;
if (buffer.second.type == gfx::SHARED_MEMORY_BUFFER) {
- shared_buffer_guid = gfx::GetSharedMemoryGUIDForTracing(
- client_tracing_process_id, buffer_id);
+ // TODO: Fix this! Get shared memroy here!
+ shared_buffer_guid = base::trace_event::
+ MemoryAllocatorDumpGuid(); // GetGUIDForTracing();
+ // SharedMemoryTracker::AddOwnershipEdges(pmd, );
} else {
shared_buffer_guid = gfx::GetGenericSharedGpuMemoryGUIDForTracing(
client_tracing_process_id, buffer_id);
+ pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
+ pmd->AddOwnershipEdge(dump->guid(), shared_buffer_guid);
}
- pmd->CreateSharedGlobalAllocatorDump(shared_buffer_guid);
- pmd->AddOwnershipEdge(dump->guid(), shared_buffer_guid);
}
}
« no previous file with comments | « components/viz/display_compositor/host_shared_bitmap_manager.cc ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698