Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index 31b93e71991e219b5c6050bd0f17bd890f6018ec..96f249a1fababce93a2e20f375ea09cac030d89b 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -779,6 +779,11 @@ void Heap::HandleGCRequest() { |
| } |
| +void Heap::ScheduleIdleScavenge(int bytes_allocated) { |
| + scavenge_job_.ScheduleIdleTask(this, bytes_allocated); |
| +} |
| + |
| + |
| void Heap::OverApproximateWeakClosure(const char* gc_reason) { |
| if (FLAG_trace_incremental_marking) { |
| PrintF("[IncrementalMarking] Overapproximate weak closure (%s).\n", |
| @@ -4100,12 +4105,6 @@ GCIdleTimeHandler::HeapState Heap::ComputeHeapState() { |
| heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); |
| heap_state.mark_compact_speed_in_bytes_per_ms = |
| static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); |
| - heap_state.scavenge_speed_in_bytes_per_ms = |
| - static_cast<size_t>(tracer()->ScavengeSpeedInBytesPerMillisecond()); |
| - heap_state.used_new_space_size = new_space_.Size(); |
| - heap_state.new_space_capacity = new_space_.Capacity(); |
| - heap_state.new_space_allocation_throughput_in_bytes_per_ms = |
| - tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond(); |
| return heap_state; |
| } |
| @@ -4162,9 +4161,6 @@ bool Heap::PerformIdleTimeAction(GCIdleTimeAction action, |
| CollectAllGarbage(kNoGCFlags, "idle notification: contexts disposed"); |
| break; |
| } |
| - case DO_SCAVENGE: |
| - CollectGarbage(NEW_SPACE, "idle notification: scavenge"); |
| - break; |
| case DO_NOTHING: |
| break; |
| } |
| @@ -4991,6 +4987,17 @@ void Heap::DisableInlineAllocation() { |
| } |
| +void Heap::LowerInlineAllocationLimit(intptr_t step) { |
| + new_space()->LowerInlineAllocationLimit(step); |
| +} |
| + |
| + |
| +void Heap::ResetInlineAllocationLimit() { |
|
Hannes Payer (out of office)
2015/09/21 09:00:56
For consistency, you have to call this method also
ulan
2015/09/23 09:58:38
Yup, I call it in Heap::SetUp below (line 5100)
Hannes Payer (out of office)
2015/09/23 14:16:39
Acknowledged.
|
| + new_space()->LowerInlineAllocationLimit( |
| + ScavengeJob::kBytesAllocatedBeforeNextIdleTask); |
| +} |
| + |
| + |
| V8_DECLARE_ONCE(initialize_gc_once); |
| static void InitializeGCOnce() { |
| @@ -5090,6 +5097,8 @@ bool Heap::SetUp() { |
| mark_compact_collector()->SetUp(); |
| + ResetInlineAllocationLimit(); |
| + |
| return true; |
| } |