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

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

Issue 2473983003: Use share group tracing ID for renderbuffer memory dump (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/renderbuffer_manager.cc
diff --git a/gpu/command_buffer/service/renderbuffer_manager.cc b/gpu/command_buffer/service/renderbuffer_manager.cc
index b28f04571fc6fa84a12a34f60e977c17b34d5e0e..5bc8e0ed544b9a58bf4e3c5a2a7b5f0ee9c64300 100644
--- a/gpu/command_buffer/service/renderbuffer_manager.cc
+++ b/gpu/command_buffer/service/renderbuffer_manager.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -252,10 +253,13 @@ bool RenderbufferManager::OnMemoryDump(
base::trace_event::ProcessMemoryDump* pmd) {
using base::trace_event::MemoryAllocatorDump;
using base::trace_event::MemoryDumpLevelOfDetail;
+ const uint64_t share_group_tracing_guid =
+ memory_tracker_->ShareGroupTracingGUID();
if (args.level_of_detail == MemoryDumpLevelOfDetail::BACKGROUND) {
- std::string dump_name = base::StringPrintf(
- "gpu/gl/renderbuffers/client_%d/", memory_tracker_->ClientId());
+ std::string dump_name =
+ base::StringPrintf("gpu/gl/renderbuffers/share_group_%" PRIu64 "/",
+ share_group_tracing_guid);
MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(dump_name);
dump->AddScalar(MemoryAllocatorDump::kNameSize,
MemoryAllocatorDump::kUnitsBytes, mem_represented());
@@ -264,21 +268,20 @@ bool RenderbufferManager::OnMemoryDump(
return true;
}
- int client_id = memory_tracker_->ClientId();
for (const auto& renderbuffer_entry : renderbuffers_) {
const auto& client_renderbuffer_id = renderbuffer_entry.first;
const auto& renderbuffer = renderbuffer_entry.second;
- std::string dump_name =
- base::StringPrintf("gpu/gl/renderbuffers/client_%d/renderbuffer_%d",
- client_id, client_renderbuffer_id);
+ std::string dump_name = base::StringPrintf(
+ "gpu/gl/renderbuffers/share_group_%" PRIu64 "/renderbuffer_%d",
+ share_group_tracing_guid, client_renderbuffer_id);
MemoryAllocatorDump* dump = pmd->CreateAllocatorDump(dump_name);
dump->AddScalar(MemoryAllocatorDump::kNameSize,
MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(renderbuffer->EstimatedSize()));
- auto guid = gl::GetGLRenderbufferGUIDForTracing(
- memory_tracker_->ShareGroupTracingGUID(), client_renderbuffer_id);
+ auto guid = gl::GetGLRenderbufferGUIDForTracing(share_group_tracing_guid,
+ client_renderbuffer_id);
pmd->CreateSharedGlobalAllocatorDump(guid);
pmd->AddOwnershipEdge(dump->guid(), guid);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698