| Index: gpu/command_buffer/client/gles2_implementation.cc
|
| diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
|
| index fde1339e7f578cf12ab79fbbca90c78acff92b50..250f4d70979449e59dc0cc6b2e9ff037f8d26471 100644
|
| --- a/gpu/command_buffer/client/gles2_implementation.cc
|
| +++ b/gpu/command_buffer/client/gles2_implementation.cc
|
| @@ -20,6 +20,7 @@
|
| #include "base/atomic_sequence_num.h"
|
| #include "base/bits.h"
|
| #include "base/compiler_specific.h"
|
| +#include "base/memory/shared_memory_tracker.h"
|
| #include "base/numerics/safe_math.h"
|
| #include "base/strings/string_split.h"
|
| #include "base/strings/stringprintf.h"
|
| @@ -442,10 +443,6 @@ bool GLES2Implementation::OnMemoryDump(
|
| if (!transfer_buffer_->HaveBuffer())
|
| return true;
|
|
|
| - const uint64_t tracing_process_id =
|
| - base::trace_event::MemoryDumpManager::GetInstance()
|
| - ->GetTracingProcessId();
|
| -
|
| MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(base::StringPrintf(
|
| "gpu/transfer_buffer_memory/buffer_%d", transfer_buffer_->GetShmId()));
|
| dump->AddScalar(MemoryAllocatorDump::kNameSize,
|
| @@ -455,11 +452,12 @@ bool GLES2Implementation::OnMemoryDump(
|
| if (args.level_of_detail != MemoryDumpLevelOfDetail::BACKGROUND) {
|
| dump->AddScalar("free_size", MemoryAllocatorDump::kUnitsBytes,
|
| transfer_buffer_->GetFreeSize());
|
| - auto guid = GetBufferGUIDForTracing(tracing_process_id,
|
| - transfer_buffer_->GetShmId());
|
| - const int kImportance = 2;
|
| - pmd->CreateSharedGlobalAllocatorDump(guid);
|
| - pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
|
| + auto* shared_memory = transfer_buffer_->GetSharedMemory();
|
| + if (shared_memory) {
|
| + base::SharedMemoryTracker::AddOwnershipEdges(
|
| + pmd, dump->guid(), shared_memory->handle(),
|
| + shared_memory->mapped_size());
|
| + }
|
| }
|
|
|
| return true;
|
|
|