v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <incremental-marking.h>
Public Types | |
enum | State { STOPPED, SWEEPING, MARKING, COMPLETE } |
enum | CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD } |
Static Public Member Functions | |
static void | Initialize () |
static void | RecordWriteFromCode (HeapObject *obj, Object *value, Isolate *isolate) |
static void | RecordWriteForEvacuationFromCode (HeapObject *obj, Object **slot, Isolate *isolate) |
Static Public Attributes | |
static const intptr_t | kAllocatedThreshold = 65536 |
static const intptr_t | kWriteBarriersInvokedThreshold = 65536 |
static const intptr_t | kInitialMarkingSpeed = 1 |
static const intptr_t | kFastMarking = 3 |
static const intptr_t | kMarkingSpeedAccellerationInterval = 1024 |
static const intptr_t | kMarkingSpeedAccelleration = 2 |
static const intptr_t | kMaxMarkingSpeed = 1000 |
Definition at line 40 of file incremental-marking.h.
enum CompletionAction |
Enumerator | |
---|---|
GC_VIA_STACK_GUARD | |
NO_GC_VIA_STACK_GUARD |
Definition at line 49 of file incremental-marking.h.
enum State |
Enumerator | |
---|---|
STOPPED | |
SWEEPING | |
MARKING | |
COMPLETE |
Definition at line 42 of file incremental-marking.h.
|
explicit |
Definition at line 42 of file incremental-marking.cc.
void Abort | ( | ) |
Definition at line 690 of file incremental-marking.cc.
References MemoryChunk::ClearFlag(), StackGuard::Continue(), MemoryChunk::FromAddress(), v8::internal::GC_REQUEST, MemoryChunk::IsFlagSet(), Heap::isolate(), IncrementalMarking::IsStopped(), Heap::lo_space(), NewSpace::LowerInlineAllocationLimit(), Heap::new_space(), v8::internal::NULL, v8::internal::PrintF(), MemoryChunk::RESCAN_ON_EVACUATION, IncrementalMarking::set_should_hurry(), Isolate::stack_guard(), IncrementalMarking::STOPPED, and RecordWriteStub::STORE_BUFFER_ONLY.
Referenced by MarkCompactCollector::Prepare(), and TEST().
void ActivateGeneratedStub | ( | Code * | stub | ) |
Definition at line 411 of file incremental-marking.cc.
References ASSERT, RecordWriteStub::GetMode(), RecordWriteStub::INCREMENTAL, RecordWriteStub::INCREMENTAL_COMPACTION, IncrementalMarking::IsCompacting(), RecordWriteStub::Patch(), and RecordWriteStub::STORE_BUFFER_ONLY.
|
inline |
Definition at line 93 of file incremental-marking-inl.h.
References HeapObject::address(), ASSERT, Marking::BlackToGrey(), MemoryChunk::IncrementLiveBytesFromGC(), IncrementalMarking::kMaxMarkingSpeed, v8::internal::kPointerSize, Marking::MarkBitFrom(), v8::internal::PrintPID(), Heap::PromotedSpaceSizeOfObjects(), HeapObject::Size(), and MarkingDeque::UnshiftGrey().
Referenced by IncrementalMarking::RecordWriteIntoCodeSlow(), and IncrementalMarking::RecordWrites().
|
inline |
Definition at line 227 of file incremental-marking.h.
Referenced by DescriptorArray::WhitenessWitness::WhitenessWitness().
void Finalize | ( | ) |
Definition at line 719 of file incremental-marking.cc.
References ASSERT, StackGuard::Continue(), v8::internal::GC_REQUEST, IncrementalMarking::Hurry(), MarkingDeque::IsEmpty(), Heap::isolate(), NewSpace::LowerInlineAllocationLimit(), Heap::new_space(), IncrementalMarking::set_should_hurry(), Isolate::stack_guard(), IncrementalMarking::STOPPED, and RecordWriteStub::STORE_BUFFER_ONLY.
void Hurry | ( | ) |
Definition at line 622 of file incremental-marking.cc.
References HeapObject::address(), ASSERT, Context::cast(), HeapObject::cast(), IncrementalMarking::COMPLETE, FixedArray::get(), Marking::GreyToBlack(), MemoryChunk::IncrementLiveBytesFromGC(), Marking::IsBlack(), MarkingDeque::IsEmpty(), Marking::IsGrey(), Marking::IsWhite(), StaticMarkingVisitor< IncrementalMarkingMarkingVisitor >::IterateBody(), PolymorphicCodeCache::kSize, HeapObject::map(), Marking::MarkBitFrom(), Marking::MarkBlack(), IncrementalMarking::MARKING, Heap::native_contexts_list(), Context::NEXT_CONTEXT_LINK, Context::NORMALIZED_MAP_CACHE_INDEX, MarkingDeque::Pop(), v8::internal::PrintF(), HeapObject::Size(), IncrementalMarking::state(), OS::TimeCurrentMillis(), StaticMarkingVisitor< IncrementalMarkingMarkingVisitor >::VisitNativeContext(), and IncrementalMarking::WhiteToGreyAndPush().
Referenced by IncrementalMarking::Finalize().
|
static |
Definition at line 284 of file incremental-marking.cc.
References IncrementalMarkingMarkingVisitor::Initialize().
Referenced by MarkCompactCollector::Initialize().
|
inline |
Definition at line 70 of file incremental-marking.h.
References IncrementalMarking::MARKING, and IncrementalMarking::state().
INLINE | ( | bool | BaseRecordWriteHeapObject *obj, Object **slot, Object *value | ) |
INLINE | ( | void | RecordWriteHeapObject *obj, Object **slot, Object *value | ) |
INLINE | ( | void | RecordWriteIntoCodeHeapObject *obj, RelocInfo *rinfo, Object *value | ) |
INLINE | ( | void | RecordWriteOfCodeEntryJSFunction *host, Object **slot, Code *value | ) |
|
inline |
Definition at line 210 of file incremental-marking.h.
Referenced by IncrementalMarking::ActivateGeneratedStub(), MarkCompactCollector::InvalidateCode(), and IncrementalMarking::SetOldSpacePageFlags().
|
inline |
Definition at line 74 of file incremental-marking.h.
References IncrementalMarking::COMPLETE, and IncrementalMarking::state().
|
inline |
Definition at line 72 of file incremental-marking.h.
References IncrementalMarking::MARKING, and IncrementalMarking::state().
|
inline |
Definition at line 68 of file incremental-marking.h.
References IncrementalMarking::state(), and IncrementalMarking::STOPPED.
Referenced by IncrementalMarking::Abort(), MarkCompactCollector::CollectGarbage(), LargeObjectSpace::ReserveSpace(), and TEST().
|
inline |
Definition at line 231 of file incremental-marking.h.
|
inline |
Definition at line 188 of file incremental-marking.h.
|
inline |
Definition at line 169 of file incremental-marking.h.
References ASSERT, MarkBit::Get(), Marking::IsBlack(), Marking::IsImpossible(), and MarkBit::Set().
Referenced by IncrementalMarkingMarkingVisitor::INLINE().
|
inline |
Definition at line 208 of file incremental-marking.h.
void MarkingComplete | ( | CompletionAction | action | ) |
Definition at line 734 of file incremental-marking.cc.
References IncrementalMarking::COMPLETE, IncrementalMarking::GC_VIA_STACK_GUARD, Heap::isolate(), v8::internal::PrintF(), StackGuard::RequestGC(), IncrementalMarking::set_should_hurry(), and Isolate::stack_guard().
Referenced by IncrementalMarking::Step().
|
inline |
Definition at line 214 of file incremental-marking.h.
References IncrementalMarking::kFastMarking, and v8::internal::PrintPID().
|
inline |
Definition at line 113 of file incremental-marking.h.
References IncrementalMarking::GC_VIA_STACK_GUARD, IncrementalMarking::kFastMarking, IncrementalMarking::kInitialMarkingSpeed, and IncrementalMarking::Step().
Referenced by LargeObjectSpace::AllocateRaw().
void PrepareForScavenge | ( | ) |
Definition at line 563 of file incremental-marking.cc.
References Bitmap::Clear(), NewSpace::FromSpaceEnd(), NewSpace::FromSpaceStart(), and Heap::new_space().
void RecordCodeTargetPatch | ( | Code * | host, |
Address | pc, | ||
HeapObject * | value | ||
) |
Definition at line 122 of file incremental-marking.cc.
Referenced by Deoptimizer::PatchStackCheckCodeAt(), and Deoptimizer::RevertStackCheckCodeAt().
void RecordCodeTargetPatch | ( | Address | pc, |
HeapObject * | value | ||
) |
Definition at line 132 of file incremental-marking.cc.
References Isolate::inner_pointer_to_code_cache(), and Heap::isolate().
|
static |
Definition at line 101 of file incremental-marking.cc.
References HeapObject::address(), ASSERT, MemoryChunk::FromAddress(), Isolate::heap(), Heap::incremental_marking(), MemoryChunk::kWriteBarrierCounterGranularity, MemoryChunk::set_write_barrier_counter(), and MemoryChunk::write_barrier_counter().
|
static |
Definition at line 80 of file incremental-marking.cc.
References HeapObject::address(), ASSERT, MemoryChunk::FromAddress(), Isolate::heap(), Heap::incremental_marking(), MemoryChunk::kWriteBarrierCounterGranularity, v8::internal::NULL, MemoryChunk::set_write_barrier_counter(), and MemoryChunk::write_barrier_counter().
void RecordWriteIntoCodeSlow | ( | HeapObject * | obj, |
RelocInfo * | rinfo, | ||
Object * | value | ||
) |
Definition at line 153 of file incremental-marking.cc.
References IncrementalMarking::BlackToGreyAndUnshift(), HeapObject::cast(), Code::cast(), Marking::IsBlack(), Marking::IsWhite(), Heap::mark_compact_collector(), Marking::MarkBitFrom(), MarkCompactCollector::RecordRelocSlot(), and IncrementalMarking::RestartIfNotMarking().
void RecordWriteOfCodeEntrySlow | ( | JSFunction * | host, |
Object ** | slot, | ||
Code * | value | ||
) |
Definition at line 142 of file incremental-marking.cc.
References ASSERT, Heap::mark_compact_collector(), and v8::internal::NULL.
|
inline |
Definition at line 82 of file incremental-marking-inl.h.
References IncrementalMarking::BlackToGreyAndUnshift(), Marking::IsBlack(), Marking::MarkBitFrom(), and IncrementalMarking::RestartIfNotMarking().
Referenced by v8::internal::CopyObjectToObjectElements().
void RecordWriteSlow | ( | HeapObject * | obj, |
Object ** | slot, | ||
Object * | value | ||
) |
Definition at line 66 of file incremental-marking.cc.
References Marking::IsBlack(), Heap::mark_compact_collector(), Marking::MarkBitFrom(), v8::internal::NULL, and HeapObject::RawField().
|
inline |
Definition at line 120 of file incremental-marking.h.
References IncrementalMarking::COMPLETE, IncrementalMarking::MARKING, and v8::internal::PrintF().
Referenced by IncrementalMarking::RecordWriteIntoCodeSlow(), IncrementalMarking::RecordWrites(), and Marking::TransferMark().
|
inline |
Definition at line 66 of file incremental-marking.h.
Referenced by IncrementalMarking::Abort(), IncrementalMarking::Finalize(), and IncrementalMarking::MarkingComplete().
|
inline |
Definition at line 204 of file incremental-marking.h.
|
inline |
Definition at line 200 of file incremental-marking.h.
References IncrementalMarking::IsCompacting().
Referenced by Page::Initialize(), and MemoryChunk::set_scan_on_scavenge().
|
inline |
Definition at line 65 of file incremental-marking.h.
void Start | ( | ) |
Definition at line 474 of file incremental-marking.cc.
References ASSERT, PagedSpace::IsSweepingComplete(), IncrementalMarking::kAllocatedThreshold, NewSpace::LowerInlineAllocationLimit(), Heap::new_space(), Heap::old_data_space(), Heap::old_pointer_space(), v8::internal::PrintF(), IncrementalMarking::STOPPED, and IncrementalMarking::SWEEPING.
Referenced by Heap::CollectGarbage(), Heap::IdleNotification(), and TEST().
|
inline |
Definition at line 60 of file incremental-marking.h.
References ASSERT, and IncrementalMarking::STOPPED.
Referenced by IncrementalMarking::Hurry(), IncrementalMarking::INLINE(), IncrementalMarking::IsComplete(), IncrementalMarking::IsMarkingIncomplete(), and IncrementalMarking::IsStopped().
void Step | ( | intptr_t | allocated, |
CompletionAction | action | ||
) |
Definition at line 751 of file incremental-marking.cc.
References HeapObject::address(), Heap::AdvanceSweepers(), Context::cast(), Heap::gc_state(), MemoryChunk::IncrementLiveBytesFromGC(), MarkingDeque::IsEmpty(), Object::IsFiller(), Marking::IsGrey(), Marking::IsWhite(), StaticMarkingVisitor< IncrementalMarkingMarkingVisitor >::IterateBody(), IncrementalMarking::kAllocatedThreshold, IncrementalMarking::kMarkingSpeedAccellerationInterval, IncrementalMarking::kMaxMarkingSpeed, IncrementalMarking::kWriteBarriersInvokedThreshold, HeapObject::map(), Marking::MarkBitFrom(), Marking::MarkBlack(), IncrementalMarking::MARKING, IncrementalMarking::MarkingComplete(), v8::internal::Max(), Heap::MaxSemiSpaceSize(), v8::internal::MB, v8::internal::Min(), Heap::NOT_IN_GC, MarkingDeque::Pop(), v8::internal::PrintPID(), Heap::PromotedTotalSize(), HeapObject::SizeFromMap(), SLOW_ASSERT, IncrementalMarking::SWEEPING, OS::TimeCurrentMillis(), StaticMarkingVisitor< IncrementalMarkingMarkingVisitor >::VisitNativeContext(), and IncrementalMarking::WhiteToGreyAndPush().
Referenced by Heap::CollectGarbage(), IncrementalMarking::OldSpaceStep(), and TEST().
|
inline |
Definition at line 180 of file incremental-marking.h.
|
inline |
Definition at line 192 of file incremental-marking.h.
|
inline |
Definition at line 184 of file incremental-marking.h.
|
inline |
Definition at line 196 of file incremental-marking.h.
void Stop | ( | ) |
void TearDown | ( | ) |
Definition at line 61 of file incremental-marking.cc.
Referenced by Heap::TearDown().
void UncommitMarkingDeque | ( | ) |
Definition at line 463 of file incremental-marking.cc.
References VirtualMemory::address(), CHECK, VirtualMemory::size(), IncrementalMarking::STOPPED, and VirtualMemory::Uncommit().
Referenced by Heap::CollectAllAvailableGarbage().
void UpdateMarkingDequeAfterScavenge | ( | ) |
Definition at line 573 of file incremental-marking.cc.
References MarkingDeque::array(), ASSERT, MarkingDeque::bottom(), Heap::InNewSpace(), Object::IsFiller(), Marking::IsGrey(), Marking::IsWhite(), HeapObject::map(), HeapObject::map_word(), Marking::MarkBitFrom(), MarkingDeque::mask(), MarkingDeque::set_top(), and MarkingDeque::top().
|
inline |
Definition at line 122 of file incremental-marking-inl.h.
References MarkingDeque::PushGrey(), and Marking::WhiteToGrey().
Referenced by IncrementalMarking::Hurry(), IncrementalMarkingMarkingVisitor::INLINE(), IncrementalMarking::Step(), and Marking::TransferMark().
bool WorthActivating | ( | ) |
Definition at line 395 of file incremental-marking.cc.
References Serializer::enabled(), v8::internal::MB, and Heap::PromotedSpaceSizeOfObjects().
|
static |
Definition at line 100 of file incremental-marking.h.
Referenced by Heap::IdleNotification(), IncrementalMarking::Start(), and IncrementalMarking::Step().
|
static |
Definition at line 106 of file incremental-marking.h.
Referenced by IncrementalMarking::NotifyOfHighPromotionRate(), and IncrementalMarking::OldSpaceStep().
|
static |
Definition at line 103 of file incremental-marking.h.
Referenced by IncrementalMarking::OldSpaceStep().
|
static |
Definition at line 110 of file incremental-marking.h.
|
static |
Definition at line 108 of file incremental-marking.h.
Referenced by IncrementalMarking::Step().
|
static |
Definition at line 111 of file incremental-marking.h.
Referenced by IncrementalMarking::BlackToGreyAndUnshift(), and IncrementalMarking::Step().
|
static |
Definition at line 101 of file incremental-marking.h.
Referenced by IncrementalMarking::Step().