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

Unified Diff: base/trace_event/trace_log.cc

Issue 2857543002: tracing: Simplify TraceEventMemoryOverhead, use an enum insted of a map (Closed)
Patch Set: Fix compiler issues + omit empty values Created 3 years, 8 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
« no previous file with comments | « base/trace_event/trace_event_memory_overhead.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/trace_log.cc
diff --git a/base/trace_event/trace_log.cc b/base/trace_event/trace_log.cc
index 5cdf53539231e22a877c1933f96f3a42e28b4152..d1e0fc3839bec77c7ea07f97269fc9b79bf6eb8f 100644
--- a/base/trace_event/trace_log.cc
+++ b/base/trace_event/trace_log.cc
@@ -398,7 +398,7 @@ bool TraceLog::OnMemoryDump(const MemoryDumpArgs& args,
// TODO(ssid): Use MemoryDumpArgs to create light dumps when requested
// (crbug.com/499731).
TraceEventMemoryOverhead overhead;
- overhead.Add("TraceLog", sizeof(*this));
+ overhead.Add(TraceEventMemoryOverhead::kOther, sizeof(*this));
{
AutoLock lock(lock_);
if (logged_events_)
@@ -1678,7 +1678,8 @@ void TraceLog::UpdateETWCategoryGroupEnabledFlags() {
void ConvertableToTraceFormat::EstimateTraceMemoryOverhead(
TraceEventMemoryOverhead* overhead) {
- overhead->Add("ConvertableToTraceFormat(Unknown)", sizeof(*this));
+ overhead->Add(TraceEventMemoryOverhead::kConvertableToTraceFormat,
+ sizeof(*this));
}
void TraceLog::AddAsyncEnabledStateObserver(
« no previous file with comments | « base/trace_event/trace_event_memory_overhead.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698