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

Unified Diff: base/trace_event/memory_dump_manager.cc

Issue 2542853002: [tracing] Introduce config to setup memory-infra peak detection (Closed)
Patch Set: Fixes. 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 e9a9f34dc2e0355209f503993150e7f24a3d8a41..5e34147063662d016ddb8ef003eb21928801a03d 100644
--- a/base/trace_event/memory_dump_manager.cc
+++ b/base/trace_event/memory_dump_manager.cc
@@ -842,7 +842,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)
Primiano Tucci (use gerrit) 2016/12/16 12:13:55 just double checking, this is something that will
ssid 2016/12/16 19:19:52 yes this will be removed in next cls.
+ << "Only periodic_interval triggers are suppported";
switch (config.level_of_detail) {
case MemoryDumpLevelOfDetail::BACKGROUND:
DCHECK(mdm->IsDumpModeAllowed(MemoryDumpLevelOfDetail::BACKGROUND));
@@ -850,16 +852,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/trace_config_memory_test_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698