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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 2838913002: memory-infra: Add SUMMARY_ONLY MemoryDumpType (Closed)
Patch Set: return true if summary only not added to trace 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_dump_manager.cc
diff --git a/base/trace_event/memory_dump_manager.cc b/base/trace_event/memory_dump_manager.cc
index 10e5d1b13f6c6e22756b73e5e4da0c73dd1533a8..d35905a7272c186afe732294374fed5a5c2b39de 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -740,10 +740,14 @@ void MemoryDumpManager::FinalizeDumpAndAddToTrace(
ProcessId pid = kv.first; // kNullProcessId for the current process.
ProcessMemoryDump* process_memory_dump = kv.second.get();
- bool added_to_trace = tracing_observer_->AddDumpToTraceIfEnabled(
- &pmd_async_state->req_args, pid, process_memory_dump);
+ // Some dumps are requested just to cacluate the summary. These shouldn't
Primiano Tucci (use gerrit) 2017/04/25 18:02:22 s/some dumps/SUMMARY_ONLY/ s/just to cacluate the
hjd 2017/04/26 11:11:57 Done.
+ // be added to the trace to avoid confusing trace consumers.
+ if (pmd_async_state->req_args.dump_type != MemoryDumpType::SUMMARY_ONLY) {
+ bool added_to_trace = tracing_observer_->AddDumpToTraceIfEnabled(
+ &pmd_async_state->req_args, pid, process_memory_dump);
- dump_successful = dump_successful && added_to_trace;
+ dump_successful = dump_successful && added_to_trace;
+ }
// TODO(hjd): Transitional until we send the full PMD. See crbug.com/704203
// Don't try to fill the struct in detailed mode since it is hard to avoid
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager_unittest.cc » ('j') | base/trace_event/memory_dump_manager_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698