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

Unified Diff: content/browser/tracing/background_tracing_manager_impl.cc

Issue 2041583003: [tracing] Introduce "allowed_dump_modes" for memory dump config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_config
Patch Set: rebase on 2049143002 Created 4 years, 6 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: content/browser/tracing/background_tracing_manager_impl.cc
diff --git a/content/browser/tracing/background_tracing_manager_impl.cc b/content/browser/tracing/background_tracing_manager_impl.cc
index 610b01881c2570af6b78c2ead730d16f4c2d7571..536624022f28758557e30fe643acbf22a8c0e24a 100644
--- a/content/browser/tracing/background_tracing_manager_impl.cc
+++ b/content/browser/tracing/background_tracing_manager_impl.cc
@@ -47,8 +47,6 @@ void RecordBackgroundTracingMetric(BackgroundTracingMetrics metric) {
}
// Tracing enabled callback for BENCHMARK_MEMORY_LIGHT category preset.
-// TODO(ssid): Remove this when background tracing supports trace config strings
-// and memory-infra supports peak detection crbug.com/609935.
void BenchmarkMemoryLight_TracingEnabledCallback() {
base::trace_event::MemoryDumpManager::GetInstance()->RequestGlobalDump(
base::trace_event::MemoryDumpType::EXPLICITLY_TRIGGERED,
@@ -409,6 +407,12 @@ void BackgroundTracingManagerImpl::StartTracing(
BENCHMARK_MEMORY_LIGHT) {
// On memory light mode, the periodic memory dumps are disabled and a single
// memory dump is requested after tracing is enabled in all the processes.
+ // TODO(ssid): Remove this when background tracing supports trace config
+ // strings and memory-infra supports peak detection crbug.com/609935.
+ base::trace_event::TraceConfig::MemoryDumpConfig memory_config;
+ memory_config.allowed_dump_modes =
+ std::set<base::trace_event::MemoryDumpLevelOfDetail>(
+ {base::trace_event::MemoryDumpLevelOfDetail::BACKGROUND});
trace_config.ResetMemoryDumpConfig(
base::trace_event::TraceConfig::MemoryDumpConfig());
Primiano Tucci (use gerrit) 2016/06/09 18:46:39 ehm don't you have to pass memory_config here inst
ssid 2016/06/09 21:34:15 Done. Yeah I think this should be fixed when we ca
tracing_enabled_callback =

Powered by Google App Engine
This is Rietveld 408576698