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

Unified Diff: ui/gl/gl_image_ref_counted_memory.cc

Issue 1323593003: Log both GL and cpu-side memory in GLImage*Memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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: ui/gl/gl_image_ref_counted_memory.cc
diff --git a/ui/gl/gl_image_ref_counted_memory.cc b/ui/gl/gl_image_ref_counted_memory.cc
index ee289754cbab404d4b6dd9e0b14cef79ca3e61d3..fe4d1158c86f5eb79ce3c4d0ce036d3feb525be1 100644
--- a/ui/gl/gl_image_ref_counted_memory.cc
+++ b/ui/gl/gl_image_ref_counted_memory.cc
@@ -41,11 +41,15 @@ void GLImageRefCountedMemory::OnMemoryDump(
// Log size 0 if |ref_counted_memory_| has been released.
size_t size_in_bytes = ref_counted_memory_ ? ref_counted_memory_->size() : 0;
+ // Dump under "/ref_counted_memory", as DumpGLTexture may also dump to
+ // "/gl_texture".
base::trace_event::MemoryAllocatorDump* dump =
- pmd->CreateAllocatorDump(dump_name);
+ pmd->CreateAllocatorDump(dump_name + "/ref_counted_memory");
reveman 2015/08/28 18:18:44 nit: /private_memory ? although it doesn't matter
ericrk 2015/08/31 17:19:32 sgtm
dump->AddScalar(base::trace_event::MemoryAllocatorDump::kNameSize,
base::trace_event::MemoryAllocatorDump::kUnitsBytes,
static_cast<uint64_t>(size_in_bytes));
reveman 2015/08/28 18:18:43 We should also add an add ownership edge to the sy
ericrk 2015/08/31 17:19:32 done.
+
+ DumpGLTexture(pmd, dump_name);
}
} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698