Index: content/browser/tracing/tracing_ui.cc |
diff --git a/content/browser/tracing/tracing_ui.cc b/content/browser/tracing/tracing_ui.cc |
index 14389658a420ecb7b3f5d00d287fedeabee87753..d455be3d53d1af6b2ae33d2ef4fa7242798c74d9 100644 |
--- a/content/browser/tracing/tracing_ui.cc |
+++ b/content/browser/tracing/tracing_ui.cc |
@@ -89,6 +89,22 @@ bool GetTracingOptions(const std::string& data64, |
*trace_config = base::trace_event::TraceConfig(category_filter_string, |
record_mode); |
+ // When enabling memory-infra via tracing, use periodic dumping to trigger a |
+ // detailed dump every 5s. |
+ if (category_filter_string.find( |
+ base::trace_event::MemoryDumpManager::kTraceCategory) != |
Primiano Tucci (use gerrit)
2017/05/26 19:12:33
Iirc there is a iscategoryenabled in traceconfig t
erikchen
2017/05/26 20:31:13
Done.
|
+ std::string::npos) { |
+ base::trace_event::TraceConfig::MemoryDumpConfig::Trigger trigger = { |
+ 5000, // min_time_between_dumps_ms |
+ base::trace_event::MemoryDumpLevelOfDetail::DETAILED, |
+ base::trace_event::MemoryDumpType::PERIODIC_INTERVAL}; |
+ base::trace_event::TraceConfig::MemoryDumpConfig memory_dump_config; |
+ memory_dump_config.triggers.push_back(trigger); |
+ memory_dump_config.allowed_dump_modes.insert( |
+ base::trace_event::MemoryDumpLevelOfDetail::DETAILED); |
Primiano Tucci (use gerrit)
2017/05/26 19:12:33
Check with ssid, I don't think you need this. This
erikchen
2017/05/26 20:31:13
This is necessary, because a freshly constructed M
ssid
2017/05/26 21:56:07
Yeah we only thought about the trace config string
erikchen
2017/05/27 00:51:03
Done.
|
+ trace_config->ResetMemoryDumpConfig(memory_dump_config); |
+ } |
+ |
bool enable_systrace; |
options_ok &= options->GetBoolean("useSystemTracing", &enable_systrace); |
if (enable_systrace) |