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

Unified Diff: src/heap/memory-reducer.cc

Issue 1268933003: Memory reducer should use the current allocation rate instead of the overall allocation rate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/heap/heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/memory-reducer.cc
diff --git a/src/heap/memory-reducer.cc b/src/heap/memory-reducer.cc
index 7063fc4b2eb5c549ad6c1ba26e350461a4c824da..252b9737253acc7d62ff1d58ab39120a664cda5d 100644
--- a/src/heap/memory-reducer.cc
+++ b/src/heap/memory-reducer.cc
@@ -24,9 +24,12 @@ MemoryReducer::TimerTask::TimerTask(MemoryReducer* memory_reducer)
void MemoryReducer::TimerTask::RunInternal() {
Heap* heap = memory_reducer_->heap();
+ double time_ms = heap->MonotonicallyIncreasingTimeInMs();
+ heap->tracer()->SampleAllocation(time_ms, heap->NewSpaceAllocationCounter(),
+ heap->OldGenerationAllocationCounter());
Event event;
event.type = kTimer;
- event.time_ms = heap->MonotonicallyIncreasingTimeInMs();
+ event.time_ms = time_ms;
event.low_allocation_rate = heap->HasLowAllocationRate();
event.can_start_incremental_gc =
heap->incremental_marking()->IsStopped() &&
« no previous file with comments | « src/heap/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698