Lines Matching refs:heap
49 MarkCompactCollector::MarkCompactCollector(Heap* heap) in MarkCompactCollector() argument
59 heap_(heap), in MarkCompactCollector()
74 explicit VerifyMarkingVisitor(Heap* heap) : heap_(heap) {} in VerifyMarkingVisitor() argument
106 static void VerifyMarking(Heap* heap, Address bottom, Address top) { in VerifyMarking() argument
107 VerifyMarkingVisitor visitor(heap); in VerifyMarking()
136 VerifyMarking(space->heap(), page->area_start(), limit); in VerifyMarking()
146 VerifyMarking(space->heap(), p->area_start(), p->area_end()); in VerifyMarking()
151 static void VerifyMarking(Heap* heap) { in VerifyMarking() argument
152 VerifyMarking(heap->old_space()); in VerifyMarking()
153 VerifyMarking(heap->code_space()); in VerifyMarking()
154 VerifyMarking(heap->map_space()); in VerifyMarking()
155 VerifyMarking(heap->new_space()); in VerifyMarking()
157 VerifyMarkingVisitor visitor(heap); in VerifyMarking()
159 LargeObjectIterator it(heap->lo_space()); in VerifyMarking()
166 heap->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); in VerifyMarking()
214 static void VerifyEvacuation(Heap* heap, PagedSpace* space) { in VerifyEvacuation() argument
215 if (FLAG_use_allocation_folding && (space == heap->old_space())) { in VerifyEvacuation()
228 static void VerifyEvacuation(Heap* heap) { in VerifyEvacuation() argument
229 VerifyEvacuation(heap, heap->old_space()); in VerifyEvacuation()
230 VerifyEvacuation(heap, heap->code_space()); in VerifyEvacuation()
231 VerifyEvacuation(heap, heap->map_space()); in VerifyEvacuation()
232 VerifyEvacuation(heap->new_space()); in VerifyEvacuation()
235 heap->IterateStrongRoots(&visitor, VISIT_ALL); in VerifyEvacuation()
291 CollectEvacuationCandidates(heap()->old_space()); in StartCompaction()
294 CollectEvacuationCandidates(heap()->code_space()); in StartCompaction()
296 TraceFragmentation(heap()->code_space()); in StartCompaction()
300 TraceFragmentation(heap()->map_space()); in StartCompaction()
303 heap()->old_space()->EvictEvacuationCandidatesFromLinearAllocationArea(); in StartCompaction()
304 heap()->code_space()->EvictEvacuationCandidatesFromLinearAllocationArea(); in StartCompaction()
315 GCTracer::Scope gc_scope(heap()->tracer(), in ClearInvalidStoreAndSlotsBufferEntries()
321 GCTracer::Scope gc_scope(heap()->tracer(), in ClearInvalidStoreAndSlotsBufferEntries()
338 static void VerifyValidSlotsBufferEntries(Heap* heap, PagedSpace* space) { in VerifyValidSlotsBufferEntries() argument
342 SlotsBuffer::VerifySlots(heap, p->slots_buffer()); in VerifyValidSlotsBufferEntries()
348 heap()->store_buffer()->VerifyValidStoreBufferEntries(); in VerifyValidStoreAndSlotsBufferEntries()
350 VerifyValidSlotsBufferEntries(heap(), heap()->old_space()); in VerifyValidStoreAndSlotsBufferEntries()
351 VerifyValidSlotsBufferEntries(heap(), heap()->code_space()); in VerifyValidStoreAndSlotsBufferEntries()
352 VerifyValidSlotsBufferEntries(heap(), heap()->map_space()); in VerifyValidStoreAndSlotsBufferEntries()
354 LargeObjectIterator it(heap()->lo_space()); in VerifyValidStoreAndSlotsBufferEntries()
357 SlotsBuffer::VerifySlots(heap(), chunk->slots_buffer()); in VerifyValidStoreAndSlotsBufferEntries()
427 HeapObjectIterator code_iterator(heap()->code_space()); in VerifyWeakEmbeddedObjectsInCode()
439 HeapObjectIterator iterator(heap()->map_space()); in VerifyOmittedMapChecks()
483 explicit CompactionTask(Heap* heap, CompactionSpaceCollection* spaces) in CompactionTask() argument
484 : CancelableTask(heap->isolate()), spaces_(spaces) {} in CompactionTask()
492 isolate()->heap()->mark_compact_collector(); in RunInternal()
507 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} in SweeperTask() argument
530 new SweeperTask(heap(), heap()->old_space()), in StartSweeperThreads()
533 new SweeperTask(heap(), heap()->code_space()), in StartSweeperThreads()
536 new SweeperTask(heap(), heap()->map_space()), in StartSweeperThreads()
557 SweepInParallel(heap()->paged_space(space->identity()), 0); in SweepAndRefill()
569 SweepInParallel(heap()->paged_space(OLD_SPACE), 0); in EnsureSweepingCompleted()
570 SweepInParallel(heap()->paged_space(CODE_SPACE), 0); in EnsureSweepingCompleted()
571 SweepInParallel(heap()->paged_space(MAP_SPACE), 0); in EnsureSweepingCompleted()
582 heap()->old_space()->RefillFreeList(); in EnsureSweepingCompleted()
583 heap()->code_space()->RefillFreeList(); in EnsureSweepingCompleted()
584 heap()->map_space()->RefillFreeList(); in EnsureSweepingCompleted()
604 void Marking::TransferMark(Heap* heap, Address old_start, Address new_start) { in TransferMark() argument
609 if (!heap->incremental_marking()->IsMarking()) return; in TransferMark()
629 heap->incremental_marking()->WhiteToGreyAndPush( in TransferMark()
631 heap->incremental_marking()->RestartIfNotMarking(); in TransferMark()
677 if (heap()->ShouldReduceMemory()) { in ComputeEvacuationHeuristics()
682 heap()->tracer()->CompactionSpeedInBytesPerMillisecond(); in ComputeEvacuationHeuristics()
737 const bool reduce_memory = heap()->ShouldReduceMemory(); in CollectEvacuationCandidates()
849 was_marked_incrementally_ = heap()->incremental_marking()->IsMarking(); in Prepare()
865 heap()->WaitUntilUnmappingOfFreeChunksCompleted(); in Prepare()
869 heap()->incremental_marking()->Stop(); in Prepare()
884 PagedSpaces spaces(heap()); in Prepare()
899 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_FINISH); in Finish()
902 heap()->weak_object_to_code_table()->Rehash( in Finish()
903 heap()->isolate()->factory()->undefined_value()); in Finish()
967 Object* undefined = isolate_->heap()->undefined_value(); in ProcessJSFunctionCandidates()
1000 isolate_->heap()->mark_compact_collector()->RecordCodeEntrySlot( in ProcessJSFunctionCandidates()
1005 isolate_->heap()->mark_compact_collector()->RecordSlot( in ProcessJSFunctionCandidates()
1041 isolate_->heap()->mark_compact_collector()->RecordSlot(candidate, code_slot, in ProcessSharedFunctionInfoCandidates()
1053 isolate_->heap()->incremental_marking()->RecordWrites(shared_info); in EvictCandidate()
1086 Object* undefined = isolate_->heap()->undefined_value(); in EvictCandidate()
1089 isolate_->heap()->incremental_marking()->RecordWrites(function); in EvictCandidate()
1090 isolate_->heap()->incremental_marking()->RecordWrites(function->shared()); in EvictCandidate()
1122 Heap* heap = isolate_->heap(); in IteratePointersToFromSpace() local
1127 if (heap->InFromSpace(candidate)) { in IteratePointersToFromSpace()
1141 INLINE(static void VisitPointer(Heap* heap, HeapObject* object, Object** p)) { in INLINE() argument
1142 MarkObjectByPointer(heap->mark_compact_collector(), object, p); in INLINE()
1145 INLINE(static void VisitPointers(Heap* heap, HeapObject* object, in INLINE() argument
1150 if (VisitUnmarkedObjects(heap, object, start, end)) return; in INLINE()
1153 MarkCompactCollector* collector = heap->mark_compact_collector(); in INLINE()
1160 INLINE(static void MarkObject(Heap* heap, HeapObject* object)) { in INLINE() argument
1162 heap->mark_compact_collector()->MarkObject(object, mark); in INLINE()
1167 INLINE(static bool MarkObjectWithoutPush(Heap* heap, HeapObject* object)) { in INLINE() argument
1170 heap->mark_compact_collector()->SetMark(object, mark_bit); in INLINE()
1191 DCHECK(collector->heap()->Contains(obj)); in INLINE()
1192 DCHECK(!collector->heap()->mark_compact_collector()->IsMarked(obj)); in INLINE()
1195 Heap* heap = obj->GetHeap(); in INLINE() local
1197 heap->mark_compact_collector()->SetMark(obj, mark); in INLINE()
1200 heap->mark_compact_collector()->MarkObject(map, map_mark); in INLINE()
1206 INLINE(static bool VisitUnmarkedObjects(Heap* heap, HeapObject* object, in INLINE() argument
1209 StackLimitCheck check(heap->isolate()); in INLINE()
1212 MarkCompactCollector* collector = heap->mark_compact_collector(); in INLINE()
1234 static void UpdateRegExpCodeAgeAndFlush(Heap* heap, JSRegExp* re, in UpdateRegExpCodeAgeAndFlush() argument
1258 heap->mark_compact_collector()->RecordSlot(data, slot, code); in UpdateRegExpCodeAgeAndFlush()
1262 Smi::FromInt(heap->ms_count() & 0xff)); in UpdateRegExpCodeAgeAndFlush()
1272 if (value == ((heap->ms_count() - kRegExpCodeThreshold) & 0xff)) { in UpdateRegExpCodeAgeAndFlush()
1288 Heap* heap = map->GetHeap(); in VisitRegExpAndFlushCode() local
1289 MarkCompactCollector* collector = heap->mark_compact_collector(); in VisitRegExpAndFlushCode()
1296 UpdateRegExpCodeAgeAndFlush(heap, re, true); in VisitRegExpAndFlushCode()
1297 UpdateRegExpCodeAgeAndFlush(heap, re, false); in VisitRegExpAndFlushCode()
1380 HeapObject* descriptor_array = heap()->empty_descriptor_array(); in PrepareForCodeFlushing()
1385 DCHECK(this == heap()->mark_compact_collector()); in PrepareForCodeFlushing()
1386 PrepareThreadForCodeFlushing(heap()->isolate(), in PrepareForCodeFlushing()
1387 heap()->isolate()->thread_local_top()); in PrepareForCodeFlushing()
1392 heap()->isolate()->thread_manager()->IterateArchivedThreads( in PrepareForCodeFlushing()
1396 heap()->isolate()->compilation_cache()->IterateFunctions(&visitor); in PrepareForCodeFlushing()
1397 heap()->isolate()->handle_scope_implementer()->Iterate(&visitor); in PrepareForCodeFlushing()
1406 explicit RootMarkingVisitor(Heap* heap) in RootMarkingVisitor() argument
1407 : collector_(heap->mark_compact_collector()) {} in RootMarkingVisitor()
1450 explicit StringTableCleaner(Heap* heap) : heap_(heap), pointers_removed_(0) {} in StringTableCleaner() argument
1518 Map* filler_map = heap()->one_pointer_filler_map(); in DiscoverGreyObjectsWithIterator()
1554 EvacuateVisitorBase(Heap* heap, SlotsBuffer** evacuation_slots_buffer) in EvacuateVisitorBase() argument
1555 : heap_(heap), evacuation_slots_buffer_(evacuation_slots_buffer) {} in EvacuateVisitorBase()
1583 explicit EvacuateNewSpaceVisitor(Heap* heap, in EvacuateNewSpaceVisitor() argument
1586 : EvacuateVisitorBase(heap, evacuation_slots_buffer), in EvacuateNewSpaceVisitor()
1728 EvacuateOldSpaceVisitor(Heap* heap, in EvacuateOldSpaceVisitor() argument
1731 : EvacuateVisitorBase(heap, evacuation_slots_buffer), in EvacuateOldSpaceVisitor()
1761 NewSpace* space = heap()->new_space(); in DiscoverGreyObjectsInNewSpace()
1780 bool MarkCompactCollector::IsUnmarkedHeapObjectWithHeap(Heap* heap, in IsUnmarkedHeapObjectWithHeap() argument
1791 StringTable* string_table = heap()->string_table(); in MarkStringTable()
1813 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG); in MarkRoots()
1845 mark_object(heap(), HeapObject::cast(*children[j])); in MarkImplicitRefGroups()
1871 DCHECK(heap()->Contains(object)); in EmptyMarkingDeque()
1894 DiscoverGreyObjectsInSpace(heap()->old_space()); in RefillMarkingDeque()
1897 DiscoverGreyObjectsInSpace(heap()->code_space()); in RefillMarkingDeque()
1900 DiscoverGreyObjectsInSpace(heap()->map_space()); in RefillMarkingDeque()
1903 LargeObjectIterator lo_it(heap()->lo_space()); in RefillMarkingDeque()
2043 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK); in MarkLiveObjects()
2054 GCTracer::Scope gc_scope(heap()->tracer(), in MarkLiveObjects()
2077 GCTracer::Scope gc_scope(heap()->tracer(), in MarkLiveObjects()
2082 RootMarkingVisitor root_visitor(heap()); in MarkLiveObjects()
2085 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK_ROOTS); in MarkLiveObjects()
2091 GCTracer::Scope gc_scope(heap()->tracer(), in MarkLiveObjects()
2106 heap()->isolate()->global_handles()->IdentifyWeakHandles( in MarkLiveObjects()
2109 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor); in MarkLiveObjects()
2126 heap()->object_stats_->TraceObjectStats(); in MarkLiveObjects()
2128 heap()->object_stats_->CheckpointObjectStats(); in MarkLiveObjects()
2134 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_CLEAR); in ClearNonLiveReferences()
2137 GCTracer::Scope gc_scope(heap()->tracer(), in ClearNonLiveReferences()
2143 StringTable* string_table = heap()->string_table(); in ClearNonLiveReferences()
2144 InternalizedStringTableCleaner internalized_visitor(heap()); in ClearNonLiveReferences()
2148 ExternalStringTableCleaner external_visitor(heap()); in ClearNonLiveReferences()
2149 heap()->external_string_table_.Iterate(&external_visitor); in ClearNonLiveReferences()
2150 heap()->external_string_table_.CleanUp(); in ClearNonLiveReferences()
2154 GCTracer::Scope gc_scope(heap()->tracer(), in ClearNonLiveReferences()
2158 heap()->ProcessAllWeakReferences(&mark_compact_object_retainer); in ClearNonLiveReferences()
2162 GCTracer::Scope gc_scope(heap()->tracer(), in ClearNonLiveReferences()
2166 heap()->isolate()->global_handles()->RemoveObjectGroups(); in ClearNonLiveReferences()
2167 heap()->isolate()->global_handles()->RemoveImplicitRefGroups(); in ClearNonLiveReferences()
2172 GCTracer::Scope gc_scope(heap()->tracer(), in ClearNonLiveReferences()
2183 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_CLEAR_MAPS); in ClearNonLiveReferences()
2198 GCTracer::Scope gc_scope(heap()->tracer(), in MarkDependentCodeForDeoptimization()
2231 Object* the_hole_value = heap()->the_hole_value(); in ClearSimpleMapTransitions()
2270 HeapObject* undefined = heap()->undefined_value(); in ClearFullMapTransitions()
2271 Object* obj = heap()->encountered_transition_arrays(); in ClearFullMapTransitions()
2292 heap()->set_encountered_transition_arrays(Smi::FromInt(0)); in ClearFullMapTransitions()
2395 Object* weak_collection_obj = heap()->encountered_weak_collections(); in ProcessWeakCollections()
2420 GCTracer::Scope gc_scope(heap()->tracer(), in ClearWeakCollections()
2422 Object* weak_collection_obj = heap()->encountered_weak_collections(); in ClearWeakCollections()
2437 weak_collection->set_next(heap()->undefined_value()); in ClearWeakCollections()
2439 heap()->set_encountered_weak_collections(Smi::FromInt(0)); in ClearWeakCollections()
2444 Object* weak_collection_obj = heap()->encountered_weak_collections(); in AbortWeakCollections()
2449 weak_collection->set_next(heap()->undefined_value()); in AbortWeakCollections()
2451 heap()->set_encountered_weak_collections(Smi::FromInt(0)); in AbortWeakCollections()
2457 Heap* heap = this->heap(); in ClearWeakCells() local
2458 GCTracer::Scope gc_scope(heap->tracer(), in ClearWeakCells()
2460 Object* weak_cell_obj = heap->encountered_weak_cells(); in ClearWeakCells()
2461 Object* the_hole_value = heap->the_hole_value(); in ClearWeakCells()
2463 DependentCode::cast(heap->empty_fixed_array()); in ClearWeakCells()
2525 heap->set_encountered_weak_cells(Smi::FromInt(0)); in ClearWeakCells()
2532 Object* the_hole_value = heap()->the_hole_value(); in AbortWeakCells()
2533 Object* weak_cell_obj = heap()->encountered_weak_cells(); in AbortWeakCells()
2539 heap()->set_encountered_weak_cells(Smi::FromInt(0)); in AbortWeakCells()
2544 HeapObject* undefined = heap()->undefined_value(); in AbortTransitionArrays()
2545 Object* obj = heap()->encountered_transition_arrays(); in AbortTransitionArrays()
2551 heap()->set_encountered_transition_arrays(Smi::FromInt(0)); in AbortTransitionArrays()
2693 DCHECK(heap()->AllowedToBeMigrated(src, dest)); in MigrateObject()
2700 heap()->MoveBlock(dst->address(), src->address(), size); in MigrateObject()
2704 DCHECK_CODEOBJECT_SIZE(size, heap()->code_space()); in MigrateObject()
2707 heap()->MoveBlock(dst_addr, src_addr, size); in MigrateObject()
2714 heap()->MoveBlock(dst_addr, src_addr, size); in MigrateObject()
2716 heap()->OnMoveEvent(dst, src, size); in MigrateObject()
2769 explicit PointersUpdatingVisitor(Heap* heap) : heap_(heap) {} in PointersUpdatingVisitor() argument
2828 static inline void UpdateSlot(Heap* heap, Object** slot) { in UpdateSlot() argument
2838 DCHECK(heap->InFromSpace(heap_obj) || in UpdateSlot()
2847 DCHECK(!heap->InFromSpace(target) && in UpdateSlot()
2899 static String* UpdateReferenceInExternalStringTableEntry(Heap* heap, in UpdateReferenceInExternalStringTableEntry() argument
3068 NewSpace* new_space = heap()->new_space(); in EvacuateNewSpacePrologue()
3090 EvacuateNewSpaceVisitor new_space_visitor(heap(), &migration_slots_buffer_, in EvacuateNewSpaceInParallel()
3134 heap()->tracer()->CompactionSpeedInBytesPerMillisecond(); in NumberOfParallelCompactionTasks()
3164 compaction_speed = heap()->tracer()->CompactionSpeedInBytesPerMillisecond(); in EvacuatePagesInParallel()
3172 compaction_spaces_for_tasks[i] = new CompactionSpaceCollection(heap()); in EvacuatePagesInParallel()
3175 heap()->old_space()->DivideUponCompactionSpaces(compaction_spaces_for_tasks, in EvacuatePagesInParallel()
3177 heap()->code_space()->DivideUponCompactionSpaces(compaction_spaces_for_tasks, in EvacuatePagesInParallel()
3191 heap()->old_space()->MergeCompactionSpace( in EvacuatePagesInParallel()
3193 heap()->code_space()->MergeCompactionSpace( in EvacuatePagesInParallel()
3200 heap()->tracer()->AddCompactionEvent(compaction_duration, compacted_memory); in EvacuatePagesInParallel()
3261 CompactionTask* task = new CompactionTask(heap(), compaction_spaces[i]); in StartParallelCompaction()
3279 if (!heap()->isolate()->cancelable_task_manager()->TryAbort(task_ids[i])) { in WaitUntilCompactionCompleted()
3290 EvacuateOldSpaceVisitor visitor(heap(), compaction_spaces, in EvacuatePages()
3303 double start = heap()->MonotonicallyIncreasingTimeInMs(); in EvacuatePages()
3311 heap()->MonotonicallyIncreasingTimeInMs() - start, live_bytes); in EvacuatePages()
3586 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_EVACUATE); in EvacuateNewSpaceAndCandidates()
3587 Heap::RelocationLock relocation_lock(heap()); in EvacuateNewSpaceAndCandidates()
3591 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3600 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3614 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3623 heap()->array_buffer_tracker()->FreeDead(false); in EvacuateNewSpaceAndCandidates()
3631 VerifyEvacuation(heap()); in EvacuateNewSpaceAndCandidates()
3638 GCTracer::Scope gc_scope(heap()->tracer(), in UpdatePointersAfterEvacuation()
3642 heap()->tracer(), in UpdatePointersAfterEvacuation()
3664 PointersUpdatingVisitor updating_visitor(heap()); in UpdatePointersAfterEvacuation()
3668 heap()->tracer(), GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_TO_NEW); in UpdatePointersAfterEvacuation()
3670 SemiSpaceIterator to_it(heap()->new_space()); in UpdatePointersAfterEvacuation()
3688 heap()->tracer(), in UpdatePointersAfterEvacuation()
3750 GCTracer::Scope gc_scope(heap()->tracer(), in UpdatePointersAfterEvacuation()
3759 heap()->ProcessAllWeakReferences(&evacuation_object_retainer); in UpdatePointersAfterEvacuation()
3790 heap()->FilterStoreBufferEntriesOnAboutToBeFreedPages(); in ReleaseEvacuationCandidates()
3791 heap()->FreeQueuedChunks(); in ReleaseEvacuationCandidates()
3935 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_SWEEP); in SweepSpaces()
3950 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
3952 StartSweepSpace(heap()->old_space()); in SweepSpaces()
3955 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
3957 StartSweepSpace(heap()->code_space()); in SweepSpaces()
3960 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
3962 StartSweepSpace(heap()->map_space()); in SweepSpaces()
3974 heap()->FreeQueuedChunks(); in SweepSpaces()
3998 ParallelSweepSpaceComplete(heap()->old_space()); in ParallelSweepSpacesComplete()
3999 ParallelSweepSpaceComplete(heap()->code_space()); in ParallelSweepSpacesComplete()
4000 ParallelSweepSpaceComplete(heap()->map_space()); in ParallelSweepSpacesComplete()
4063 DCHECK(heap()->gc_state() == Heap::MARK_COMPACT); in RecordCodeTargetPatch()