| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 8d34738dae81757b9e5918875d6adf41cecf98bb..1fbe0a0bdabb3b170a486d4b80cdf3aea7587e80 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -907,6 +907,13 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason,
|
| if (collector == MARK_COMPACTOR && FLAG_track_detached_contexts) {
|
| isolate()->CheckDetachedContextsAfterGC();
|
| }
|
| +
|
| + if (collector == MARK_COMPACTOR) {
|
| + gc_idle_time_handler_.NotifyMarkCompact();
|
| + } else {
|
| + gc_idle_time_handler_.NotifyScavenge();
|
| + }
|
| +
|
| tracer()->Stop(collector);
|
| }
|
|
|
| @@ -1634,8 +1641,6 @@ void Heap::Scavenge() {
|
| LOG(isolate_, ResourceEvent("scavenge", "end"));
|
|
|
| gc_state_ = NOT_IN_GC;
|
| -
|
| - gc_idle_time_handler_.NotifyScavenge();
|
| }
|
|
|
|
|
| @@ -4562,6 +4567,7 @@ bool Heap::TryFinalizeIdleIncrementalMarking(
|
| static_cast<size_t>(idle_time_in_ms), size_of_objects,
|
| final_incremental_mark_compact_speed_in_bytes_per_ms))) {
|
| CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental");
|
| + gc_idle_time_handler_.NotifyIdleMarkCompact();
|
| ReduceNewSpaceSize(is_long_idle_notification);
|
| return true;
|
| }
|
|
|