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

Unified Diff: base/trace_event/process_memory_dump.cc

Issue 1383733002: [tracing] Add graphics memory dump provider for Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: base/trace_event/process_memory_dump.cc
diff --git a/base/trace_event/process_memory_dump.cc b/base/trace_event/process_memory_dump.cc
index 67118f10e8c0604d6586b0c54e29497ef08c2242..df26ef5993fcd6736ee547c8ac6928fdc0fea156 100644
--- a/base/trace_event/process_memory_dump.cc
+++ b/base/trace_event/process_memory_dump.cc
@@ -56,6 +56,14 @@ MemoryAllocatorDump* ProcessMemoryDump::GetAllocatorDump(
return it == allocator_dumps_.end() ? nullptr : it->second;
}
+MemoryAllocatorDump* ProcessMemoryDump::GetOrCreateAllocatorDump(
+ const std::string& absolute_name) {
+ MemoryAllocatorDump* mad = GetAllocatorDump(absolute_name);
+ if (mad)
+ return mad;
+ return CreateAllocatorDump(absolute_name);
+}
+
MemoryAllocatorDump* ProcessMemoryDump::CreateSharedGlobalAllocatorDump(
const MemoryAllocatorDumpGuid& guid) {
// A shared allocator dump can be shared within a process and the guid could

Powered by Google App Engine
This is Rietveld 408576698