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

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: Add missing #include for windows 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4183359102c254d114e16a348b0eb93be899d60b 100644
--- a/gpu/command_buffer/service/buffer_manager.cc
+++ b/gpu/command_buffer/service/buffer_manager.cc
@@ -8,6 +8,7 @@
#include <limits>
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -638,21 +639,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698