Chromium Code Reviews| 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 67797d42937129b8dcc17254764621bb84db3316..b210c2cde9aec7f593a5065f6d49bb84f8ce70b8 100644 |
| --- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc |
| +++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc |
| @@ -294,8 +294,19 @@ bool BrowserGpuMemoryBufferManager::OnMemoryDump( |
| // corresponding dump for the same buffer, this will avoid to |
| // double-count them in tracing. If, instead, no other process will emit a |
| // dump with the same guid, the segment will be accounted to the browser. |
| - const uint64 client_tracing_process_id = base::trace_event:: |
| - MemoryDumpManager::ChildProcessIdToTracingProcessId(client_id); |
| + uint64 client_tracing_process_id = base::trace_event::MemoryDumpManager:: |
| + ChildProcessIdToTracingProcessId(client_id); |
| + |
| + if (client_id == gpu_client_id_) { |
|
ericrk
2015/07/28 21:02:33
A bit of a hack... we're hitting a similar issue t
reveman
2015/07/28 21:38:49
Can you add a GpuClientIdToTracingProcessId functi
ericrk
2015/07/29 18:46:46
Added a function ClientIdToTracingProcessId which
|
| + // The browser process doesn't use a client ID to generate its tracing |
| + // ID. Instead it uses a fixed tracing ID. If client_id == |
| + // gpu_client_id_, then this surface is owned by the browser, so get our |
| + // current tracing ID. |
| + client_tracing_process_id = |
| + base::trace_event::MemoryDumpManager::GetInstance() |
| + ->tracing_process_id(); |
| + } |
| + |
| base::trace_event::MemoryAllocatorDumpGuid shared_buffer_guid = |
| gfx::GetGpuMemoryBufferGUIDForTracing(client_tracing_process_id, |
| buffer_id); |