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

Unified Diff: base/trace_event/memory_dump_scheduler.cc

Issue 2902413002: memory-infra: remove light dumps and increment default dump time to 5s (Closed)
Patch Set: Undo crrev.com/2815963002, fire first timer immediately Created 3 years, 7 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
« no previous file with comments | « no previous file | base/trace_event/trace_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/trace_event/memory_dump_scheduler.cc
diff --git a/base/trace_event/memory_dump_scheduler.cc b/base/trace_event/memory_dump_scheduler.cc
index b1d34d93403a5b6f9fd62b50ef3a3ff28454ef97..3ac322cfb56d424c6da8b502d0a362850cada656 100644
--- a/base/trace_event/memory_dump_scheduler.cc
+++ b/base/trace_event/memory_dump_scheduler.cc
@@ -73,11 +73,10 @@ void MemoryDumpScheduler::StartInternal(MemoryDumpScheduler::Config config) {
light_dump_rate_ = light_dump_period_ms / min_period_ms;
heavy_dump_rate_ = heavy_dump_period_ms / min_period_ms;
- // Trigger the first dump after |period_ms_| and not as soon as timer starts.
- SequencedTaskRunnerHandle::Get()->PostDelayedTask(
+ // Trigger the first dump immediately.
+ SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
- BindOnce(&MemoryDumpScheduler::Tick, Unretained(this), ++generation_),
- TimeDelta::FromMilliseconds(period_ms_));
+ BindOnce(&MemoryDumpScheduler::Tick, Unretained(this), ++generation_));
}
void MemoryDumpScheduler::StopInternal() {
« no previous file with comments | « no previous file | base/trace_event/trace_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698