Index: base/trace_event/trace_event_memory_overhead.cc |
diff --git a/base/trace_event/trace_event_memory_overhead.cc b/base/trace_event/trace_event_memory_overhead.cc |
index 2b4ed35e74b3bc9c763df5a1143cb61156838efa..b685d7183f2e4a2411cc212ed3b3987780dee85f 100644 |
--- a/base/trace_event/trace_event_memory_overhead.cc |
+++ b/base/trace_event/trace_event_memory_overhead.cc |
@@ -122,6 +122,13 @@ |
Add("TraceEventMemoryOverhead", estimated_size); |
} |
+size_t TraceEventMemoryOverhead::GetCount(const char* object_type) const { |
+ const auto& it = allocated_objects_.find(object_type); |
+ if (it == allocated_objects_.end()) |
+ return 0u; |
+ return it->second.count; |
+} |
+ |
void TraceEventMemoryOverhead::Update(const TraceEventMemoryOverhead& other) { |
for (const auto& it : other.allocated_objects_) { |
AddOrCreateInternal(it.first, it.second.count, |