• Home
  • Raw
  • Download

Lines Matching refs:heap

39 MarkCompactCollector::MarkCompactCollector(Heap* heap)  in MarkCompactCollector()  argument
53 heap_(heap), in MarkCompactCollector()
61 explicit VerifyMarkingVisitor(Heap* heap) : heap_(heap) {} in VerifyMarkingVisitor() argument
93 static void VerifyMarking(Heap* heap, Address bottom, Address top) { in VerifyMarking() argument
94 VerifyMarkingVisitor visitor(heap); in VerifyMarking()
120 VerifyMarking(space->heap(), page->area_start(), limit); in VerifyMarking()
130 VerifyMarking(space->heap(), p->area_start(), p->area_end()); in VerifyMarking()
135 static void VerifyMarking(Heap* heap) { in VerifyMarking() argument
136 VerifyMarking(heap->old_pointer_space()); in VerifyMarking()
137 VerifyMarking(heap->old_data_space()); in VerifyMarking()
138 VerifyMarking(heap->code_space()); in VerifyMarking()
139 VerifyMarking(heap->cell_space()); in VerifyMarking()
140 VerifyMarking(heap->property_cell_space()); in VerifyMarking()
141 VerifyMarking(heap->map_space()); in VerifyMarking()
142 VerifyMarking(heap->new_space()); in VerifyMarking()
144 VerifyMarkingVisitor visitor(heap); in VerifyMarking()
146 LargeObjectIterator it(heap->lo_space()); in VerifyMarking()
153 heap->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); in VerifyMarking()
201 static void VerifyEvacuation(Heap* heap, PagedSpace* space) { in VerifyEvacuation() argument
203 (space == heap->old_pointer_space() || space == heap->old_data_space())) { in VerifyEvacuation()
216 static void VerifyEvacuation(Heap* heap) { in VerifyEvacuation() argument
217 VerifyEvacuation(heap, heap->old_pointer_space()); in VerifyEvacuation()
218 VerifyEvacuation(heap, heap->old_data_space()); in VerifyEvacuation()
219 VerifyEvacuation(heap, heap->code_space()); in VerifyEvacuation()
220 VerifyEvacuation(heap, heap->cell_space()); in VerifyEvacuation()
221 VerifyEvacuation(heap, heap->property_cell_space()); in VerifyEvacuation()
222 VerifyEvacuation(heap, heap->map_space()); in VerifyEvacuation()
223 VerifyEvacuation(heap->new_space()); in VerifyEvacuation()
226 heap->IterateStrongRoots(&visitor, VISIT_ALL); in VerifyEvacuation()
317 static void VerifyNativeContextSeparation(Heap* heap) { in VerifyNativeContextSeparation() argument
318 HeapObjectIterator it(heap->code_space()); in VerifyNativeContextSeparation()
362 CollectEvacuationCandidates(heap()->old_pointer_space()); in StartCompaction()
363 CollectEvacuationCandidates(heap()->old_data_space()); in StartCompaction()
367 CollectEvacuationCandidates(heap()->code_space()); in StartCompaction()
369 TraceFragmentation(heap()->code_space()); in StartCompaction()
373 TraceFragmentation(heap()->map_space()); in StartCompaction()
374 TraceFragmentation(heap()->cell_space()); in StartCompaction()
375 TraceFragmentation(heap()->property_cell_space()); in StartCompaction()
378 heap()->old_pointer_space()->EvictEvacuationCandidatesFromFreeLists(); in StartCompaction()
379 heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists(); in StartCompaction()
380 heap()->code_space()->EvictEvacuationCandidatesFromFreeLists(); in StartCompaction()
416 if (heap()->weak_embedded_objects_verification_enabled()) { in CollectGarbage()
477 HeapObjectIterator code_iterator(heap()->code_space()); in VerifyWeakEmbeddedObjectsInCode()
489 HeapObjectIterator iterator(heap()->map_space()); in VerifyOmittedMapChecks()
538 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} in SweeperTask() argument
565 new SweeperTask(heap(), heap()->old_data_space()), in StartSweeperThreads()
568 new SweeperTask(heap(), heap()->old_pointer_space()), in StartSweeperThreads()
581 SweepInParallel(heap()->paged_space(OLD_DATA_SPACE), 0); in EnsureSweepingCompleted()
582 SweepInParallel(heap()->paged_space(OLD_POINTER_SPACE), 0); in EnsureSweepingCompleted()
595 RefillFreeList(heap()->paged_space(OLD_DATA_SPACE)); in EnsureSweepingCompleted()
596 RefillFreeList(heap()->paged_space(OLD_POINTER_SPACE)); in EnsureSweepingCompleted()
597 heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes(); in EnsureSweepingCompleted()
598 heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes(); in EnsureSweepingCompleted()
630 if (space == heap()->old_pointer_space()) { in RefillFreeList()
632 } else if (space == heap()->old_data_space()) { in RefillFreeList()
848 unsigned int counter = space->heap()->ms_count(); in CollectEvacuationCandidates()
936 was_marked_incrementally_ = heap()->incremental_marking()->IsMarking(); in Prepare()
952 heap()->incremental_marking()->Abort(); in Prepare()
965 PagedSpaces spaces(heap()); in Prepare()
1028 Object* undefined = isolate_->heap()->undefined_value(); in ProcessJSFunctionCandidates()
1056 isolate_->heap()->mark_compact_collector()->RecordCodeEntrySlot(slot, in ProcessJSFunctionCandidates()
1061 isolate_->heap()->mark_compact_collector()->RecordSlot( in ProcessJSFunctionCandidates()
1093 isolate_->heap()->mark_compact_collector()->RecordSlot(code_slot, code_slot, in ProcessSharedFunctionInfoCandidates()
1133 isolate_->heap()->mark_compact_collector()->RecordSlot(slot, slot, in ProcessOptimizedCodeMaps()
1153 isolate_->heap()->incremental_marking()->RecordWrites(shared_info); in EvictCandidate()
1186 Object* undefined = isolate_->heap()->undefined_value(); in EvictCandidate()
1189 isolate_->heap()->incremental_marking()->RecordWrites(function); in EvictCandidate()
1190 isolate_->heap()->incremental_marking()->RecordWrites(function->shared()); in EvictCandidate()
1227 isolate_->heap()->incremental_marking()->RecordWrites(code_map_holder); in EvictOptimizedCodeMap()
1295 Heap* heap = isolate_->heap(); in IteratePointersToFromSpace() local
1300 if (heap->InFromSpace(candidate)) { in IteratePointersToFromSpace()
1337 Heap* heap = map->GetHeap(); in ShortCircuitConsString() local
1338 if (second != heap->empty_string()) { in ShortCircuitConsString()
1346 if (!heap->InNewSpace(object) && heap->InNewSpace(first)) return object; in ShortCircuitConsString()
1371 INLINE(static void VisitPointer(Heap* heap, Object** p)) { in INLINE() argument
1372 MarkObjectByPointer(heap->mark_compact_collector(), p, p); in INLINE()
1375 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) { in INLINE() argument
1379 if (VisitUnmarkedObjects(heap, start, end)) return; in INLINE()
1382 MarkCompactCollector* collector = heap->mark_compact_collector(); in INLINE()
1389 INLINE(static void MarkObject(Heap* heap, HeapObject* object)) { in INLINE() argument
1391 heap->mark_compact_collector()->MarkObject(object, mark); in INLINE()
1396 INLINE(static bool MarkObjectWithoutPush(Heap* heap, HeapObject* object)) { in INLINE() argument
1399 heap->mark_compact_collector()->SetMark(object, mark_bit); in INLINE()
1420 DCHECK(collector->heap()->Contains(obj)); in INLINE()
1421 DCHECK(!collector->heap()->mark_compact_collector()->IsMarked(obj)); in INLINE()
1424 Heap* heap = obj->GetHeap(); in INLINE() local
1426 heap->mark_compact_collector()->SetMark(obj, mark); in INLINE()
1429 heap->mark_compact_collector()->MarkObject(map, map_mark); in INLINE()
1435 INLINE(static bool VisitUnmarkedObjects(Heap* heap, Object** start, in INLINE() argument
1438 StackLimitCheck check(heap->isolate()); in INLINE()
1441 MarkCompactCollector* collector = heap->mark_compact_collector(); in INLINE()
1463 static void UpdateRegExpCodeAgeAndFlush(Heap* heap, JSRegExp* re, in UpdateRegExpCodeAgeAndFlush() argument
1487 heap->mark_compact_collector()->RecordSlot(slot, slot, code); in UpdateRegExpCodeAgeAndFlush()
1491 Smi::FromInt(heap->sweep_generation() & 0xff)); in UpdateRegExpCodeAgeAndFlush()
1501 if (value == ((heap->sweep_generation() - kRegExpCodeThreshold) & 0xff)) { in UpdateRegExpCodeAgeAndFlush()
1517 Heap* heap = map->GetHeap(); in VisitRegExpAndFlushCode() local
1518 MarkCompactCollector* collector = heap->mark_compact_collector(); in VisitRegExpAndFlushCode()
1525 UpdateRegExpCodeAgeAndFlush(heap, re, true); in VisitRegExpAndFlushCode()
1526 UpdateRegExpCodeAgeAndFlush(heap, re, false); in VisitRegExpAndFlushCode()
1538 Heap* heap = fixed_array->map()->GetHeap(); in ObjectStatsCountFixedArray() local
1539 if (fixed_array->map() != heap->fixed_cow_array_map() && in ObjectStatsCountFixedArray()
1540 fixed_array->map() != heap->fixed_double_array_map() && in ObjectStatsCountFixedArray()
1541 fixed_array != heap->empty_fixed_array()) { in ObjectStatsCountFixedArray()
1543 heap->RecordFixedArraySubTypeStats(dictionary_type, fixed_array->Size()); in ObjectStatsCountFixedArray()
1545 heap->RecordFixedArraySubTypeStats(fast_type, fixed_array->Size()); in ObjectStatsCountFixedArray()
1553 Heap* heap = map->GetHeap(); in ObjectStatsVisitBase() local
1555 heap->RecordObjectStats(map->instance_type(), object_size); in ObjectStatsVisitBase()
1580 Heap* heap = map->GetHeap(); in Visit() local
1585 array != heap->empty_descriptor_array()) { in Visit()
1587 heap->RecordFixedArraySubTypeStats(DESCRIPTOR_ARRAY_SUB_TYPE, in Visit()
1592 heap->RecordFixedArraySubTypeStats(TRANSITION_ARRAY_SUB_TYPE, in Visit()
1597 heap->RecordFixedArraySubTypeStats(MAP_CODE_CACHE_SUB_TYPE, in Visit()
1600 heap->RecordFixedArraySubTypeStats( in Visit()
1615 Heap* heap = map->GetHeap(); in Visit() local
1619 heap->RecordCodeSubTypeStats(code_obj->kind(), code_obj->GetRawAge(), in Visit()
1631 Heap* heap = map->GetHeap(); in Visit() local
1633 if (sfi->scope_info() != heap->empty_fixed_array()) { in Visit()
1634 heap->RecordFixedArraySubTypeStats( in Visit()
1647 Heap* heap = map->GetHeap(); in Visit() local
1649 if (fixed_array == heap->string_table()) { in Visit()
1650 heap->RecordFixedArraySubTypeStats(STRING_TABLE_SUB_TYPE, in Visit()
1729 MarkCompactMarkingVisitor::MarkInlinedFunctionsCode(heap(), in PrepareThreadForCodeFlushing()
1747 HeapObject* descriptor_array = heap()->empty_descriptor_array(); in PrepareForCodeFlushing()
1752 DCHECK(this == heap()->mark_compact_collector()); in PrepareForCodeFlushing()
1753 PrepareThreadForCodeFlushing(heap()->isolate(), in PrepareForCodeFlushing()
1754 heap()->isolate()->thread_local_top()); in PrepareForCodeFlushing()
1759 heap()->isolate()->thread_manager()->IterateArchivedThreads( in PrepareForCodeFlushing()
1763 heap()->isolate()->compilation_cache()->IterateFunctions(&visitor); in PrepareForCodeFlushing()
1764 heap()->isolate()->handle_scope_implementer()->Iterate(&visitor); in PrepareForCodeFlushing()
1773 explicit RootMarkingVisitor(Heap* heap) in RootMarkingVisitor() argument
1774 : collector_(heap->mark_compact_collector()) {} in RootMarkingVisitor()
1817 explicit StringTableCleaner(Heap* heap) : heap_(heap), pointers_removed_(0) {} in StringTableCleaner() argument
1878 static void DiscoverGreyObjectsWithIterator(Heap* heap, in DiscoverGreyObjectsWithIterator() argument
1885 Map* filler_map = heap->one_pointer_filler_map(); in DiscoverGreyObjectsWithIterator()
1981 if (heap()->ShouldBePromoted(object->address(), size) && in DiscoverAndEvacuateBlackObjectsOnPage()
2000 heap()->IncrementSemiSpaceCopiedObjectSize(size); in DiscoverAndEvacuateBlackObjectsOnPage()
2008 static void DiscoverGreyObjectsInSpace(Heap* heap, MarkingDeque* marking_deque, in DiscoverGreyObjectsInSpace() argument
2019 static void DiscoverGreyObjectsInNewSpace(Heap* heap, in DiscoverGreyObjectsInNewSpace() argument
2021 NewSpace* space = heap->new_space(); in DiscoverGreyObjectsInNewSpace()
2040 bool MarkCompactCollector::IsUnmarkedHeapObjectWithHeap(Heap* heap, in IsUnmarkedHeapObjectWithHeap() argument
2051 StringTable* string_table = heap()->string_table(); in MarkStringTable()
2073 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG); in MarkRoots()
2122 HeapObject::cast(heap()->weak_object_to_code_table()); in MarkWeakObjectToCodeTable()
2138 DCHECK(heap()->Contains(object)); in EmptyMarkingDeque()
2158 DiscoverGreyObjectsInNewSpace(heap(), &marking_deque_); in RefillMarkingDeque()
2161 DiscoverGreyObjectsInSpace(heap(), &marking_deque_, in RefillMarkingDeque()
2162 heap()->old_pointer_space()); in RefillMarkingDeque()
2165 DiscoverGreyObjectsInSpace(heap(), &marking_deque_, heap()->old_data_space()); in RefillMarkingDeque()
2168 DiscoverGreyObjectsInSpace(heap(), &marking_deque_, heap()->code_space()); in RefillMarkingDeque()
2171 DiscoverGreyObjectsInSpace(heap(), &marking_deque_, heap()->map_space()); in RefillMarkingDeque()
2174 DiscoverGreyObjectsInSpace(heap(), &marking_deque_, heap()->cell_space()); in RefillMarkingDeque()
2177 DiscoverGreyObjectsInSpace(heap(), &marking_deque_, in RefillMarkingDeque()
2178 heap()->property_cell_space()); in RefillMarkingDeque()
2181 LargeObjectIterator lo_it(heap()->lo_space()); in RefillMarkingDeque()
2182 DiscoverGreyObjectsWithIterator(heap(), &marking_deque_, &lo_it); in RefillMarkingDeque()
2237 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK); in MarkLiveObjects()
2271 Address marking_deque_start = heap()->new_space()->FromSpacePageLow(); in MarkLiveObjects()
2272 Address marking_deque_end = heap()->new_space()->FromSpacePageHigh(); in MarkLiveObjects()
2290 HeapObjectIterator cell_iterator(heap()->cell_space()); in MarkLiveObjects()
2297 heap(), reinterpret_cast<Object**>(cell->address() + offset)); in MarkLiveObjects()
2303 heap()->property_cell_space()); in MarkLiveObjects()
2314 RootMarkingVisitor root_visitor(heap()); in MarkLiveObjects()
2330 heap()->isolate()->global_handles()->IdentifyWeakHandles( in MarkLiveObjects()
2333 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor); in MarkLiveObjects()
2361 StringTable* string_table = heap()->string_table(); in AfterMarking()
2362 InternalizedStringTableCleaner internalized_visitor(heap()); in AfterMarking()
2366 ExternalStringTableCleaner external_visitor(heap()); in AfterMarking()
2367 heap()->external_string_table_.Iterate(&external_visitor); in AfterMarking()
2368 heap()->external_string_table_.CleanUp(); in AfterMarking()
2372 heap()->ProcessWeakReferences(&mark_compact_object_retainer); in AfterMarking()
2375 heap()->isolate()->global_handles()->RemoveObjectGroups(); in AfterMarking()
2376 heap()->isolate()->global_handles()->RemoveImplicitRefGroups(); in AfterMarking()
2389 heap()->CheckpointObjectStats(); in AfterMarking()
2395 Object* raw_context = heap()->native_contexts_list(); in ProcessMapCaches()
2396 while (raw_context != heap()->undefined_value()) { in ProcessMapCaches()
2405 raw_map_cache != heap()->undefined_value()) { in ProcessMapCaches()
2412 if (raw_key == heap()->undefined_value() || in ProcessMapCaches()
2413 raw_key == heap()->the_hole_value()) in ProcessMapCaches()
2427 context->set(Context::MAP_CACHE_INDEX, heap()->undefined_value()); in ProcessMapCaches()
2449 HeapObjectIterator map_iterator(heap()->map_space()); in ClearNonLiveReferences()
2464 map->set_dependent_code(DependentCode::cast(heap()->empty_fixed_array())); in ClearNonLiveReferences()
2480 Object* undefined = heap()->undefined_value(); in ClearNonLiveReferences()
2481 for (Object* site = heap()->allocation_sites_list(); site != undefined; in ClearNonLiveReferences()
2693 Object* undefined = heap()->undefined_value(); in ClearDependentICList()
2747 Object* head = VisitWeakList<Code>(heap(), old_head, &retainer); in ClearNonLiveDependentCodeInGroup()
2795 GCTracer::Scope gc_scope(heap()->tracer(), in ProcessWeakCollections()
2797 Object* weak_collection_obj = heap()->encountered_weak_collections(); in ProcessWeakCollections()
2823 GCTracer::Scope gc_scope(heap()->tracer(), in ClearWeakCollections()
2825 Object* weak_collection_obj = heap()->encountered_weak_collections(); in ClearWeakCollections()
2840 weak_collection->set_next(heap()->undefined_value()); in ClearWeakCollections()
2842 heap()->set_encountered_weak_collections(Smi::FromInt(0)); in ClearWeakCollections()
2847 GCTracer::Scope gc_scope(heap()->tracer(), in AbortWeakCollections()
2849 Object* weak_collection_obj = heap()->encountered_weak_collections(); in AbortWeakCollections()
2854 weak_collection->set_next(heap()->undefined_value()); in AbortWeakCollections()
2856 heap()->set_encountered_weak_collections(Smi::FromInt(0)); in AbortWeakCollections()
2889 DCHECK(heap()->AllowedToBeMigrated(src, dest)); in MigrateObject()
2945 heap()->MoveBlock(dst_addr, src_addr, size); in MigrateObject()
2952 heap()->MoveBlock(dst_addr, src_addr, size); in MigrateObject()
2954 heap()->OnMoveEvent(dst, src, size); in MigrateObject()
2963 explicit PointersUpdatingVisitor(Heap* heap) : heap_(heap) {} in PointersUpdatingVisitor() argument
3013 static inline void UpdateSlot(Heap* heap, Object** slot) { in UpdateSlot() argument
3022 DCHECK(heap->InFromSpace(heap_obj) || in UpdateSlot()
3026 DCHECK(!heap->InFromSpace(target) && in UpdateSlot()
3056 static String* UpdateReferenceInExternalStringTableEntry(Heap* heap, in UpdateReferenceInExternalStringTableEntry() argument
3072 OldSpace* target_space = heap()->TargetSpace(object); in TryPromoteObject()
3074 DCHECK(target_space == heap()->old_pointer_space() || in TryPromoteObject()
3075 target_space == heap()->old_data_space()); in TryPromoteObject()
3080 heap()->IncrementPromotedObjectsSize(object_size); in TryPromoteObject()
3094 NewSpace* new_space = heap()->new_space(); in EvacuateNewSpace()
3203 PagedSpaces spaces(heap()); in EvacuatePages()
3509 Heap::RelocationLock relocation_lock(heap()); in EvacuateNewSpaceAndCandidates()
3513 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3520 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3526 PointersUpdatingVisitor updating_visitor(heap()); in EvacuateNewSpaceAndCandidates()
3529 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3532 SemiSpaceIterator to_it(heap()->new_space()->bottom(), in EvacuateNewSpaceAndCandidates()
3533 heap()->new_space()->top()); in EvacuateNewSpaceAndCandidates()
3543 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3550 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3559 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3588 heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3646 GCTracer::Scope gc_scope(heap()->tracer(), in EvacuateNewSpaceAndCandidates()
3681 heap()->ProcessWeakReferences(&evacuation_object_retainer); in EvacuateNewSpaceAndCandidates()
3720 heap()->FreeQueuedChunks(); in ReleaseEvacuationCandidates()
4140 FreeList* free_list = space == heap()->old_pointer_space() in SweepInParallel()
4244 heap()->FreeQueuedChunks(); in SweepSpace()
4261 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_SWEEP); in SweepSpaces()
4282 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
4286 SweepSpace(heap()->old_pointer_space(), how_to_sweep); in SweepSpaces()
4287 SweepSpace(heap()->old_data_space(), how_to_sweep); in SweepSpaces()
4301 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
4303 SweepSpace(heap()->code_space(), SEQUENTIAL_SWEEPING); in SweepSpaces()
4307 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
4309 SweepSpace(heap()->cell_space(), SEQUENTIAL_SWEEPING); in SweepSpaces()
4310 SweepSpace(heap()->property_cell_space(), SEQUENTIAL_SWEEPING); in SweepSpaces()
4319 GCTracer::Scope sweep_scope(heap()->tracer(), in SweepSpaces()
4321 SweepSpace(heap()->map_space(), SEQUENTIAL_SWEEPING); in SweepSpaces()
4351 ParallelSweepSpaceComplete(heap()->old_pointer_space()); in ParallelSweepSpacesComplete()
4352 ParallelSweepSpaceComplete(heap()->old_data_space()); in ParallelSweepSpacesComplete()
4483 DCHECK(heap()->gc_state() == Heap::MARK_COMPACT); in RecordCodeTargetPatch()
4503 void SlotsBuffer::UpdateSlots(Heap* heap) { in UpdateSlots() argument
4504 PointersUpdatingVisitor v(heap); in UpdateSlots()
4509 PointersUpdatingVisitor::UpdateSlot(heap, slot); in UpdateSlots()
4513 UpdateSlot(heap->isolate(), &v, DecodeSlotType(slot), in UpdateSlots()
4520 void SlotsBuffer::UpdateSlotsWithFilter(Heap* heap) { in UpdateSlotsWithFilter() argument
4521 PointersUpdatingVisitor v(heap); in UpdateSlotsWithFilter()
4527 PointersUpdatingVisitor::UpdateSlot(heap, slot); in UpdateSlotsWithFilter()
4534 UpdateSlot(heap->isolate(), &v, DecodeSlotType(slot), in UpdateSlotsWithFilter()