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

Unified Diff: base/trace_event/memory_tracing_observer.cc

Issue 2838913002: memory-infra: Add SUMMARY_ONLY MemoryDumpType (Closed)
Patch Set: 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
Index: base/trace_event/memory_tracing_observer.cc
diff --git a/base/trace_event/memory_tracing_observer.cc b/base/trace_event/memory_tracing_observer.cc
index 3130b205f89c25f70f30c8dd11e0c02558dd3a1c..85d7e98684d71cde902a5677e3a1efb2ce48ed1b 100644
--- a/base/trace_event/memory_tracing_observer.cc
+++ b/base/trace_event/memory_tracing_observer.cc
@@ -71,6 +71,10 @@ bool MemoryTracingObserver::AddDumpToTraceIfEnabled(
// dump then ignoring the result.
if (!IsMemoryInfraTracingEnabled())
return false;
+ // Some dumps are requested just to cacluate the summary. These shouldn't be
+ // added to the trace to avoid confusing trace consumers.
+ if (req_args->dump_type == MemoryDumpType::SUMMARY_ONLY)
+ return false;
const uint64_t dump_guid = req_args->dump_guid;
« base/trace_event/memory_dump_request_args.h ('K') | « base/trace_event/memory_dump_request_args.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698