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

Unified Diff: cc/tiles/gpu_image_decode_controller.cc

Issue 2067543003: [tracing] Replace %p with %PRIXPTR in the memory dump names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix include. Created 4 years, 6 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: cc/tiles/gpu_image_decode_controller.cc
diff --git a/cc/tiles/gpu_image_decode_controller.cc b/cc/tiles/gpu_image_decode_controller.cc
index 8a76daf9cd20278e89c9aed82e6aeb61f9fe6846..21c73e9d89b802bf2756a5259b84a192c9667ad1 100644
--- a/cc/tiles/gpu_image_decode_controller.cc
+++ b/cc/tiles/gpu_image_decode_controller.cc
@@ -4,6 +4,8 @@
#include "cc/tiles/gpu_image_decode_controller.h"
+#include <inttypes.h>
+
#include "base/memory/discardable_memory_allocator.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
@@ -465,7 +467,8 @@ bool GpuImageDecodeController::OnMemoryDump(
// If we have discardable decoded data, dump this here.
if (image_data->decode.data()) {
std::string discardable_dump_name = base::StringPrintf(
- "cc/image_memory/controller_%p/discardable/image_%d", this, image_id);
+ "cc/image_memory/controller_0x%" PRIXPTR "/discardable/image_%d",
+ reinterpret_cast<uintptr_t>(this), image_id);
base::trace_event::MemoryAllocatorDump* dump =
image_data->decode.data()->CreateMemoryAllocatorDump(
discardable_dump_name.c_str(), pmd);
@@ -485,7 +488,8 @@ bool GpuImageDecodeController::OnMemoryDump(
if (image_data->upload.image() &&
image_data->mode == DecodedDataMode::GPU) {
std::string gpu_dump_name = base::StringPrintf(
- "cc/image_memory/controller_%p/gpu/image_%d", this, image_id);
+ "cc/image_memory/controller_0x%" PRIXPTR "/gpu/image_%d",
+ reinterpret_cast<uintptr_t>(this), image_id);
base::trace_event::MemoryAllocatorDump* dump =
pmd->CreateAllocatorDump(gpu_dump_name);
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
« no previous file with comments | « no previous file | cc/tiles/software_image_decode_controller.cc » ('j') | content/browser/dom_storage/dom_storage_area.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698