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

Unified Diff: gpu/command_buffer/service/buffer_manager.cc

Issue 2133743003: Use Share Group rather than Client ID in GPU memory logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: gpu/command_buffer/service/buffer_manager.cc
diff --git a/gpu/command_buffer/service/buffer_manager.cc b/gpu/command_buffer/service/buffer_manager.cc
index 1407ec8c95c61d359b2294eadb2d80ab5b749211..245739215fcff15ecf4222fdeebe3116df097aba 100644
--- a/gpu/command_buffer/service/buffer_manager.cc
+++ b/gpu/command_buffer/service/buffer_manager.cc
@@ -638,21 +638,23 @@ void BufferManager::SetPrimitiveRestartFixedIndexIfNecessary(GLenum type) {
bool BufferManager::OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
base::trace_event::ProcessMemoryDump* pmd) {
- const int client_id = memory_tracker_->ClientId();
+ const uint64_t share_group_tracing_guid =
+ memory_tracker_->ShareGroupTracingGUID();
for (const auto& buffer_entry : buffers_) {
const auto& client_buffer_id = buffer_entry.first;
const auto& buffer = buffer_entry.second;
- std::string dump_name = base::StringPrintf(
- "gpu/gl/buffers/client_%d/buffer_%d", client_id, client_buffer_id);
+ std::string dump_name =
+ base::StringPrintf("gpu/gl/buffers/share_group_%" PRIu64 "/buffer_%d",
+ share_group_tracing_guid, client_buffer_id);
base::trace_event::MemoryAllocatorDump* dump =
pmd->CreateAllocatorDump(dump_name);
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(buffer->size()));
- auto guid = gl::GetGLBufferGUIDForTracing(
- memory_tracker_->ShareGroupTracingGUID(), client_buffer_id);
+ auto guid = gl::GetGLBufferGUIDForTracing(share_group_tracing_guid,
+ client_buffer_id);
pmd->CreateSharedGlobalAllocatorDump(guid);
pmd->AddOwnershipEdge(dump->guid(), guid);
}
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | tools/perf/benchmarks/system_health_smoke_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698