Commit ddcec9f6 authored by ulan's avatar ulan Committed by Commit bot

Sample allocation rate in memory reducer.

Otherwise, if there is no GC and no idle notification,
memory reducer will use old allocation rate.

BUG=chromium:515873
LOG=NO

Review URL: https://codereview.chromium.org/1280623002

Cr-Commit-Position: refs/heads/master@{#30059}
parent 9d5c5712
......@@ -25,8 +25,11 @@ MemoryReducer::TimerTask::TimerTask(MemoryReducer* memory_reducer)
void MemoryReducer::TimerTask::RunInternal() {
Heap* heap = memory_reducer_->heap();
Event event;
double time_ms = heap->MonotonicallyIncreasingTimeInMs();
heap->tracer()->SampleAllocation(time_ms, heap->NewSpaceAllocationCounter(),
heap->OldGenerationAllocationCounter());
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() &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment