| Index: gpu/command_buffer/client/mapped_memory.cc
|
| diff --git a/gpu/command_buffer/client/mapped_memory.cc b/gpu/command_buffer/client/mapped_memory.cc
|
| index 708e121f39c0c24a9593b0714bb14f3b28b5c210..bf6765d5bba142609fe3cf8b49525772494a84fb 100644
|
| --- a/gpu/command_buffer/client/mapped_memory.cc
|
| +++ b/gpu/command_buffer/client/mapped_memory.cc
|
| @@ -13,6 +13,7 @@
|
| #include "base/atomic_sequence_num.h"
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| +#include "base/memory/shared_memory_tracker.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "base/trace_event/memory_dump_manager.h"
|
| @@ -186,11 +187,16 @@ bool MappedMemoryManager::OnMemoryDump(
|
| dump->AddScalar("free_size", MemoryAllocatorDump::kUnitsBytes,
|
| chunk->GetFreeSize());
|
|
|
| - auto guid = GetBufferGUIDForTracing(tracing_process_id, chunk->shm_id());
|
| + auto shared_memory = chunk->buffer()->backing()->shared_memory();
|
| + if (shared_memory) {
|
| + auto guid = GetBufferGUIDForTracing(tracing_process_id, chunk->shm_id());
|
|
|
| - const int kImportance = 2;
|
| - pmd->CreateSharedGlobalAllocatorDump(guid);
|
| - pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
|
| + const int kImportance = 2;
|
| + pmd->CreateSharedGlobalAllocatorDump(guid);
|
| + pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
|
| + base::SharedMemoryTracker::AddOwnershipEdgeToSharedGlobalDump(pmd, guid,
|
| + shared_memory->handle(), shared_memory->mapped_size());
|
| + }
|
| }
|
|
|
| return true;
|
|
|