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 0cc3d59890c57884e8fe035d1afba7f6600528b1..5ece315c00f30485ee0dce9c997b83de6007f3ee 100644 |
--- a/base/trace_event/trace_event_memory_overhead.cc |
+++ b/base/trace_event/trace_event_memory_overhead.cc |
@@ -127,6 +127,13 @@ void TraceEventMemoryOverhead::AddSelf() { |
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, |