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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 2542853002: [tracing] Introduce config to setup memory-infra peak detection (Closed)
Patch Set: fix devtools test. Created 4 years 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 28d5d56c59d4346a9cb740d55fbbeca5aef6b603..5fe9c8506790bb51ef8e7dde780dfff63a435ea4 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -841,7 +841,9 @@ void MemoryDumpManager::PeriodicGlobalDumpTimer::Start(
DCHECK_LE(triggers_list.size(), 3u);
auto* mdm = MemoryDumpManager::GetInstance();
for (const TraceConfig::MemoryDumpConfig::Trigger& config : triggers_list) {
- DCHECK_NE(0u, config.periodic_interval_ms);
+ DCHECK_NE(0u, config.min_time_between_dumps_ms);
+ DCHECK_EQ(MemoryDumpType::PERIODIC_INTERVAL, config.trigger_type)
+ << "Only periodic_interval triggers are suppported";
switch (config.level_of_detail) {
case MemoryDumpLevelOfDetail::BACKGROUND:
DCHECK(mdm->IsDumpModeAllowed(MemoryDumpLevelOfDetail::BACKGROUND));
@@ -849,16 +851,16 @@ void MemoryDumpManager::PeriodicGlobalDumpTimer::Start(
case MemoryDumpLevelOfDetail::LIGHT:
DCHECK_EQ(0u, light_dump_period_ms);
DCHECK(mdm->IsDumpModeAllowed(MemoryDumpLevelOfDetail::LIGHT));
- light_dump_period_ms = config.periodic_interval_ms;
+ light_dump_period_ms = config.min_time_between_dumps_ms;
break;
case MemoryDumpLevelOfDetail::DETAILED:
DCHECK_EQ(0u, heavy_dump_period_ms);
DCHECK(mdm->IsDumpModeAllowed(MemoryDumpLevelOfDetail::DETAILED));
- heavy_dump_period_ms = config.periodic_interval_ms;
+ heavy_dump_period_ms = config.min_time_between_dumps_ms;
break;
}
min_timer_period_ms =
- std::min(min_timer_period_ms, config.periodic_interval_ms);
+ std::min(min_timer_period_ms, config.min_time_between_dumps_ms);
}
DCHECK_EQ(0u, light_dump_period_ms % min_timer_period_ms);
« no previous file with comments | « no previous file | base/trace_event/memory_dump_request_args.h » ('j') | base/trace_event/memory_dump_request_args.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698