Chromium Code Reviews| 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..ac40d50c355341dc6a30669fc98e56e57d900a84 100644 |
| --- a/content/browser/tracing/tracing_ui.cc |
| +++ b/content/browser/tracing/tracing_ui.cc |
| @@ -89,6 +89,21 @@ 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 (trace_config->category_filter().IsCategoryEnabled( |
|
ssid
2017/05/26 21:56:07
This should just be trace/config->IsCategoryGroupE
erikchen
2017/05/27 00:51:03
Done.
|
| + base::trace_event::MemoryDumpManager::kTraceCategory)) { |
| + 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); |
| + trace_config->ResetMemoryDumpConfig(memory_dump_config); |
| + } |
| + |
| bool enable_systrace; |
| options_ok &= options->GetBoolean("useSystemTracing", &enable_systrace); |
| if (enable_systrace) |