Lines Matching full:heap
37 #include "heap-profiler.h"
81 explicit VerifyMarkingVisitor(Heap* heap) : heap_(heap) {}
102 Heap* heap_;
106 static void VerifyMarking(Heap* heap, Address bottom, Address top) {
107 VerifyMarkingVisitor visitor(heap);
135 VerifyMarking(space->heap(), page->area_start(), limit);
145 VerifyMarking(space->heap(), p->area_start(), p->area_end());
150 static void VerifyMarking(Heap* heap) {
151 VerifyMarking(heap->old_pointer_space());
152 VerifyMarking(heap->old_data_space());
153 VerifyMarking(heap->code_space());
154 VerifyMarking(heap->cell_space());
155 VerifyMarking(heap->property_cell_space());
156 VerifyMarking(heap->map_space());
157 VerifyMarking(heap->new_space());
159 VerifyMarkingVisitor visitor(heap);
161 LargeObjectIterator it(heap->lo_space());
168 heap->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
232 static void VerifyEvacuation(Heap* heap) {
233 VerifyEvacuation(heap->old_pointer_space());
234 VerifyEvacuation(heap->old_data_space());
235 VerifyEvacuation(heap->code_space());
236 VerifyEvacuation(heap->cell_space());
237 VerifyEvacuation(heap->property_cell_space());
238 VerifyEvacuation(heap->map_space());
239 VerifyEvacuation(heap->new_space());
242 heap->IterateStrongRoots(&visitor, VISIT_ALL);
332 static void VerifyNativeContextSeparation(Heap* heap) {
333 HeapObjectIterator it(heap->code_space());
375 CollectEvacuationCandidates(heap()->old_pointer_space());
376 CollectEvacuationCandidates(heap()->old_data_space());
381 CollectEvacuationCandidates(heap()->code_space());
383 TraceFragmentation(heap()->code_space());
387 TraceFragmentation(heap()->map_space());
388 TraceFragmentation(heap()->cell_space());
389 TraceFragmentation(heap()->property_cell_space());
392 heap()->old_pointer_space()->EvictEvacuationCandidatesFromFreeLists();
393 heap()->old_data_space()->EvictEvacuationCandidatesFromFreeLists();
394 heap()->code_space()->EvictEvacuationCandidatesFromFreeLists();
433 if (heap()->weak_embedded_objects_verification_enabled()) {
496 HeapObjectIterator code_iterator(heap()->code_space());
509 HeapObjectIterator iterator(heap()->map_space());
572 StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE));
573 StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE));
574 heap()->paged_space(OLD_DATA_SPACE)->ResetUnsweptFreeBytes();
575 heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
804 unsigned int counter = space->heap()->ms_count();
894 was_marked_incrementally_ = heap()->incremental_marking()->IsMarking();
914 heap()->incremental_marking()->Abort();
926 PagedSpaces spaces(heap());
965 // Marking all live objects in the heap as part of mark-sweep or mark-compact
984 // the heap looking for objects marked as overflowed, push them on the stack,
990 Object* undefined = isolate_->heap()->undefined_value();
1018 isolate_->heap()->mark_compact_collector()->
1023 isolate_->heap()->mark_compact_collector()->
1055 isolate_->heap()->mark_compact_collector()->
1095 isolate_->heap()->mark_compact_collector()->
1104 isolate_->heap()->mark_compact_collector()->
1113 isolate_->heap()->mark_compact_collector()->
1131 isolate_->heap()->incremental_marking()->RecordWrites(shared_info);
1164 Object* undefined = isolate_->heap()->undefined_value();
1167 isolate_->heap()->incremental_marking()->RecordWrites(function);
1168 isolate_->heap()->incremental_marking()->RecordWrites(function->shared());
1204 isolate_->heap()->incremental_marking()->RecordWrites(code_map_holder);
1272 Heap* heap = isolate_->heap();
1277 if (heap->InFromSpace(candidate)) {
1295 // Optimization: If the heap object pointed to by p is a non-internalized
1296 // cons string whose right substring is HEAP->empty_string, update
1299 // Here we assume that if we change *p, we replace it with a heap object
1300 // (i.e., the left substring of a cons string is always a heap object).
1304 // (ConsString::cast(object)->second() == HEAP->empty_string())
1314 Heap* heap = map->GetHeap();
1315 if (second != heap->empty_string()) {
1323 if (!heap->InNewSpace(object) && heap->InNewSpace(first)) return object;
1349 INLINE(static void VisitPointer(Heap* heap, Object** p)) {
1350 MarkObjectByPointer(heap->mark_compact_collector(), p, p);
1353 INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) {
1357 if (VisitUnmarkedObjects(heap, start, end)) return;
1360 MarkCompactCollector* collector = heap->mark_compact_collector();
1367 INLINE(static void MarkObject(Heap* heap, HeapObject* object)) {
1369 heap->mark_compact_collector()->MarkObject(object, mark);
1374 INLINE(static bool MarkObjectWithoutPush(Heap* heap, HeapObject* object)) {
1377 heap->mark_compact_collector()->SetMark(object, mark_bit);
1399 ASSERT(collector->heap()->Contains(obj));
1400 ASSERT(!collector->heap()->mark_compact_collector()->IsMarked(obj));
1403 Heap* heap = obj->GetHeap();
1405 heap->mark_compact_collector()->SetMark(obj, mark);
1408 heap->mark_compact_collector()->MarkObject(map, map_mark);
1414 INLINE(static bool VisitUnmarkedObjects(Heap* heap,
1418 StackLimitCheck check(heap->isolate());
1421 MarkCompactCollector* collector = heap->mark_compact_collector();
1486 static void UpdateRegExpCodeAgeAndFlush(Heap* heap,
1509 heap->mark_compact_collector()->
1514 Smi::FromInt(heap->sweep_generation() & 0xff));
1524 if (value == ((heap->sweep_generation() - kRegExpCodeThreshold) & 0xff)) {
1540 Heap* heap = map->GetHeap();
1541 MarkCompactCollector* collector = heap->mark_compact_collector();
1548 UpdateRegExpCodeAgeAndFlush(heap, re, true);
1549 UpdateRegExpCodeAgeAndFlush(heap, re, false);
1562 Heap* heap = fixed_array->map()->GetHeap();
1563 if (fixed_array->map() != heap->fixed_cow_array_map() &&
1564 fixed_array->map() != heap->fixed_double_array_map() &&
1565 fixed_array != heap->empty_fixed_array()) {
1567 heap->RecordFixedArraySubTypeStats(dictionary_type,
1570 heap->RecordFixedArraySubTypeStats(fast_type,
1579 Heap* heap = map->GetHeap();
1581 heap->RecordObjectStats(map->instance_type(), object_size);
1607 Heap* heap = map->GetHeap();
1612 array != heap->empty_descriptor_array()) {
1614 heap->RecordFixedArraySubTypeStats(DESCRIPTOR_ARRAY_SUB_TYPE,
1619 heap->RecordFixedArraySubTypeStats(TRANSITION_ARRAY_SUB_TYPE,
1624 heap->RecordFixedArraySubTypeStats(MAP_CODE_CACHE_SUB_TYPE,
1627 heap->RecordFixedArraySubTypeStats(
1642 Heap* heap = map->GetHeap();
1646 heap->RecordCodeSubTypeStats(code_obj->kind(), code_obj->GetRawAge(),
1658 Heap* heap = map->GetHeap();
1660 if (sfi->scope_info() != heap->empty_fixed_array()) {
1661 heap->RecordFixedArraySubTypeStats(
1675 Heap* heap = map->GetHeap();
1677 if (fixed_array == heap->string_table()) {
1678 heap->RecordFixedArraySubTypeStats(
1759 MarkCompactMarkingVisitor::MarkInlinedFunctionsCode(heap(),
1777 HeapObject* descriptor_array = heap()->empty_descriptor_array();
1782 ASSERT(this == heap()->mark_compact_collector());
1783 PrepareThreadForCodeFlushing(heap()->isolate(),
1784 heap()->isolate()->thread_local_top());
1789 heap()->isolate()->thread_manager()->IterateArchivedThreads(
1793 heap()->isolate()->compilation_cache()->IterateFunctions(&visitor);
1794 heap()->isolate()->handle_scope_implementer()->Iterate(&visitor);
1800 // Visitor class for marking heap roots.
1803 explicit RootMarkingVisitor(Heap* heap)
1804 : collector_(heap->mark_compact_collector()) { }
1833 // overflowed objects in the heap.
1844 explicit StringTableCleaner(Heap* heap)
1845 : heap_(heap), pointers_removed_(0) { }
1873 Heap* heap_;
1904 static void DiscoverGreyObjectsWithIterator(Heap* heap,
1911 Map* filler_map = heap->one_pointer_filler_map();
2004 Heap::UpdateAllocationSiteFeedback(object);
2038 static void DiscoverGreyObjectsInSpace(Heap* heap,
2043 DiscoverGreyObjectsWithIterator(heap, marking_deque, &it);
2055 static void DiscoverGreyObjectsInNewSpace(Heap* heap,
2057 NewSpace* space = heap->new_space();
2076 bool MarkCompactCollector::IsUnmarkedHeapObjectWithHeap(Heap* heap,
2087 StringTable* string_table = heap()->string_table();
2104 // Mark the heap roots including global variables, stack variables,
2106 heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG);
2113 // There may be overflowed objects in the heap. Visit them now.
2136 // A parent object is marked, so mark all child heap objects.
2155 HeapObject::cast(heap()->weak_object_to_code_table());
2164 // Before: the marking stack contains zero or more heap object pointers.
2166 // marking stack have been marked, or are overflowed in the heap.
2171 ASSERT(heap()->Contains(object));
2183 // Sweep the heap for overflowed objects, clear their overflow bits, and
2186 // overflowed objects in the heap so the overflow flag on the markings stack
2191 DiscoverGreyObjectsInNewSpace(heap(), &marking_deque_);
2194 DiscoverGreyObjectsInSpace(heap(),
2196 heap()->old_pointer_space());
2199 DiscoverGreyObjectsInSpace(heap(),
2201 heap()->old_data_space());
2204 DiscoverGreyObjectsInSpace(heap(),
2206 heap()->code_space());
2209 DiscoverGreyObjectsInSpace(heap(),
2211 heap()->map_space());
2214 DiscoverGreyObjectsInSpace(heap(),
2216 heap()->cell_space());
2219 DiscoverGreyObjectsInSpace(heap(),
2221 heap()->property_cell_space());
2224 LargeObjectIterator lo_it(heap()->lo_space());
2225 DiscoverGreyObjectsWithIterator(heap(),
2235 // stack. Before: the marking stack contains zero or more heap object
2237 // objects in the heap.
2312 Address marking_deque_start = heap()->new_space()->FromSpacePageLow();
2313 Address marking_deque_end = heap()->new_space()->FromSpacePageHigh();
2322 // There are overflowed objects left in the heap after incremental marking.
2332 HeapObjectIterator cell_iterator(heap()->cell_space());
2339 heap(),
2346 heap()->property_cell_space());
2357 RootMarkingVisitor root_visitor(heap());
2373 heap()->isolate()->global_handles()->IdentifyWeakHandles(
2376 heap()->isolate()->global_handles()->IterateWeakRoots(&root_visitor);
2400 StringTable* string_table = heap()->string_table();
2401 StringTableCleaner v(heap());
2404 heap()->external_string_table_.Iterate(&v);
2405 heap()->external_string_table_.CleanUp();
2409 heap()->ProcessWeakReferences(&mark_compact_object_retainer);
2412 heap()->isolate()->global_handles()->RemoveObjectGroups();
2413 heap()->isolate()->global_handles()->RemoveImplicitRefGroups();
2427 heap()->isolate()->runtime_profiler()->RemoveDeadSamples();
2431 heap()->CheckpointObjectStats();
2437 Object* raw_context = heap()->native_contexts_list_;
2438 while (raw_context != heap()->undefined_value()) {
2447 raw_map_cache != heap()->undefined_value()) {
2455 if (raw_key == heap()->undefined_value() ||
2456 raw_key == heap()->the_hole_value()) continue;
2469 context->set(Context::MAP_CACHE_INDEX, heap()->undefined_value());
2488 HeapObjectIterator map_iterator(heap()->map_space());
2508 HeapObjectIterator map_iterator(heap()->map_space());
2531 map->set_dependent_code(DependentCode::cast(heap()->empty_fixed_array()));
2548 Object* undefined = heap()->undefined_value();
2549 for (Object* site = heap()->allocation_sites_list();
2642 parent->ClearNonLiveTransitions(heap());
2771 HeapProfiler* heap_profiler = heap()->isolate()->heap_profiler();
2775 ASSERT(heap()->AllowedToBeMigrated(HeapObject::FromAddress(src), dest));
2814 heap()->MoveBlock(dst, src, size);
2823 heap()->MoveBlock(dst, src, size);
2833 explicit PointersUpdatingVisitor(Heap* heap) : heap_(heap) { }
2885 static inline void UpdateSlot(Heap* heap, Object** slot) {
2894 ASSERT(heap->InFromSpace(heap_obj) ||
2898 ASSERT(!heap->InFromSpace(target) &&
2908 Heap* heap_;
2926 // and then we have to scan the entire heap and we don't want to find
2935 static String* UpdateReferenceInExternalStringTableEntry(Heap* heap,
2952 OldSpace* target_space = heap()->TargetSpace(object);
2954 ASSERT(target_space == heap()->old_pointer_space() ||
2955 target_space == heap()->old_data_space());
2964 heap()->mark_compact_collector()->tracer()->
2978 heap()->CheckNewSpaceExpansionCriteria();
2980 NewSpace* new_space = heap()->new_space();
3229 space->heap()->AddSweepingTime(OS::TimeCurrentMillis() - start_time);
3357 Heap::RelocationLock relocation_lock(heap());
3370 heap());
3375 SemiSpaceIterator to_it(heap()->new_space()->bottom(),
3376 heap()->new_space()->top());
3397 &Heap::ScavengeStoreBufferCallback);
3502 // Update the head of the native contexts list in the heap.
3520 heap()->isolate()->runtime_profiler()->UpdateSamplesAfterCompact(
3525 heap()->ProcessWeakReferences(&evacuation_object_retainer);
3570 heap()->FreeQueuedChunks();
4108 heap()->FreeQueuedChunks();
4136 SweepSpace(heap()->old_pointer_space(), how_to_sweep);
4137 SweepSpace(heap()->old_data_space(), how_to_sweep);
4150 SweepSpace(heap()->code_space(), PRECISE);
4152 SweepSpace(heap()->cell_space(), PRECISE);
4153 SweepSpace(heap()->property_cell_space(), PRECISE);
4160 SweepSpace(heap()->map_space(), PRECISE);
4294 ASSERT(heap()->gc_state() == Heap::MARK_COMPACT);
4313 void SlotsBuffer::UpdateSlots(Heap* heap) {
4314 PointersUpdatingVisitor v(heap);
4319 PointersUpdatingVisitor::UpdateSlot(heap, slot);
4323 UpdateSlot(heap->isolate(),
4332 void SlotsBuffer::UpdateSlotsWithFilter(Heap* heap) {
4333 PointersUpdatingVisitor v(heap);
4339 PointersUpdatingVisitor::UpdateSlot(heap, slot);
4346 UpdateSlot(heap->isolate(),