From: ulan Date: Fri, 7 Aug 2015 09:24:21 +0000 (-0700) Subject: Sample allocation rate in memory reducer. X-Git-Tag: upstream/4.7.83~981 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddcec9f6bf50779bc23bf43b731c0699cc19c4ea;p=platform%2Fupstream%2Fv8.git 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} --- diff --git a/src/heap/memory-reducer.cc b/src/heap/memory-reducer.cc index 634c625..25378b5 100644 --- a/src/heap/memory-reducer.cc +++ b/src/heap/memory-reducer.cc @@ -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() &&