V8 Project
|
#include <spaces.h>
Private Member Functions | |
void | UpdateAllocationInfo () |
MUST_USE_RESULT AllocationResult | SlowAllocateRaw (int size_in_bytes) |
Friends | |
class | SemiSpaceIterator |
Additional Inherited Members | |
![]() | |
static void | FatalProcessOutOfMemory () |
static void * | New (size_t size) |
static void | Delete (void *p) |
|
inlineexplicit |
Definition at line 2318 of file spaces.h.
|
inline |
bool v8::internal::NewSpace::AddFreshPage | ( | ) |
Definition at line 1343 of file spaces.cc.
References v8::internal::SemiSpace::AdvancePage(), allocation_info_, v8::internal::MemoryChunk::area_end(), v8::internal::Heap::CreateFillerObjectAt(), v8::internal::NewSpacePage::FromLimit(), v8::internal::Space::heap(), v8::internal::NewSpacePage::IsAtStart(), limit(), pages_used_, v8::internal::Heap::promotion_queue(), v8::internal::Heap::SCAVENGE, v8::internal::PromotionQueue::SetNewLimit(), to_space_, top(), and UpdateAllocationInfo().
Referenced by v8::internal::MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(), and SlowAllocateRaw().
|
inline |
Definition at line 2439 of file spaces.h.
References v8::internal::SemiSpace::age_mark(), and from_space_.
Referenced by v8::internal::Heap::ShouldBePromoted().
|
inline |
Definition at line 2463 of file spaces.h.
References allocation_info_, and v8::internal::AllocationInfo::limit_address().
Referenced by v8::internal::Heap::NewSpaceAllocationLimitAddress().
|
inline |
Definition at line 2460 of file spaces.h.
References allocation_info_, and v8::internal::AllocationInfo::top_address().
Referenced by v8::internal::Heap::NewSpaceAllocationTopAddress().
|
inline |
Definition at line 2400 of file spaces.h.
References Capacity(), and Size().
Referenced by v8::internal::Heap::Available(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::Heap::IdleNotification(), v8::internal::Heap::PrintShortHeapStatistics(), and ReportStatistics().
|
inline |
Definition at line 2436 of file spaces.h.
References v8::internal::SemiSpace::space_start(), and to_space_.
Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), and v8::internal::GCTracer::Start().
|
inline |
Definition at line 2371 of file spaces.h.
References from_space_, v8::internal::NewSpacePage::kAreaSize, v8::internal::Page::kPageSize, SLOW_DCHECK, to_space_, and v8::internal::SemiSpace::TotalCapacity().
Referenced by Available(), v8::internal::Heap::Capacity(), CommittedMemory(), v8::internal::Heap::IdleNotification(), v8::internal::Heap::NextGCIsLikelyToBeFull(), v8::internal::Heap::OldGenerationAllocationLimit(), and v8::internal::Heap::RecordStats().
void v8::internal::NewSpace::ClearHistograms | ( | ) |
Definition at line 1851 of file spaces.cc.
References allocated_histogram_, v8::internal::LAST_TYPE, and promoted_histogram_.
Referenced by CollectStatistics(), and v8::internal::Heap::ReportStatisticsBeforeGC().
void v8::internal::NewSpace::CollectStatistics | ( | ) |
Definition at line 1862 of file spaces.cc.
References ClearHistograms(), v8::internal::SemiSpaceIterator::Next(), NULL, and RecordAllocation().
Referenced by v8::internal::Heap::ReportStatisticsAfterGC(), and v8::internal::Heap::ReportStatisticsBeforeGC().
|
inline |
Definition at line 2534 of file spaces.h.
References v8::internal::SemiSpace::Commit(), from_space_, and v8::internal::SemiSpace::is_committed().
Referenced by v8::internal::Heap::EnsureFromSpaceIsCommitted().
|
inline |
Definition at line 2385 of file spaces.h.
References Capacity(), from_space_, v8::internal::SemiSpace::is_committed(), and TotalCapacity().
Referenced by v8::internal::Heap::CommittedMemory(), CommittedPhysicalMemory(), v8::internal::StatisticsExtension::GetCounters(), and v8::internal::Heap::PrintShortHeapStatistics().
size_t v8::internal::NewSpace::CommittedPhysicalMemory | ( | ) |
Definition at line 1941 of file spaces.cc.
References allocation_info_, CommittedMemory(), v8::internal::SemiSpace::CommittedPhysicalMemory(), from_space_, v8::base::VirtualMemory::HasLazyCommits(), v8::internal::SemiSpace::is_committed(), size, to_space_, and v8::internal::MemoryChunk::UpdateHighWaterMark().
Referenced by v8::internal::Heap::CommittedPhysicalMemory().
Definition at line 2349 of file spaces.h.
References address_mask_, and start_.
Referenced by v8::internal::StoreBuffer::EnterDirectlyIntoStoreBuffer(), INLINE(), v8::internal::Heap::InNewSpace(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::RecordCopiedObject(), and v8::internal::SeqString::Truncate().
void v8::internal::NewSpace::Flip | ( | ) |
Definition at line 1257 of file spaces.cc.
References from_space_, v8::internal::SemiSpace::Swap(), and to_space_.
Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), and v8::internal::Heap::Scavenge().
Definition at line 2494 of file spaces.h.
References v8::internal::SemiSpace::Contains(), and from_space_.
Referenced by v8::internal::Heap::InFromSpace().
Definition at line 2502 of file spaces.h.
References v8::internal::SemiSpace::Contains(), and from_space_.
|
inline |
Definition at line 2485 of file spaces.h.
References from_space_, and v8::internal::SemiSpace::space_end().
Referenced by v8::internal::IncrementalMarking::PrepareForScavenge(), and v8::internal::Heap::ZapFromSpace().
|
inline |
Definition at line 2483 of file spaces.h.
References from_space_, and v8::internal::SemiSpace::page_high().
Referenced by v8::internal::MarkCompactCollector::MarkLiveObjects().
|
inline |
Definition at line 2482 of file spaces.h.
References from_space_, and v8::internal::SemiSpace::page_low().
Referenced by v8::internal::MarkCompactCollector::MarkLiveObjects().
|
inline |
Definition at line 2484 of file spaces.h.
References from_space_, and v8::internal::SemiSpace::space_start().
Referenced by v8::internal::IncrementalMarking::PrepareForScavenge(), and v8::internal::Heap::ZapFromSpace().
void v8::internal::NewSpace::Grow | ( | ) |
Definition at line 1260 of file spaces.cc.
References allocation_info_, DCHECK, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::V8::FatalProcessOutOfMemory(), from_space_, v8::internal::SemiSpace::GrowTo(), MaximumCapacity(), v8::internal::Min(), v8::internal::SemiSpace::ShrinkTo(), to_space_, v8::internal::SemiSpace::TotalCapacity(), and TotalCapacity().
Referenced by v8::internal::Heap::CheckNewSpaceExpansionCriteria().
|
inline |
Definition at line 2333 of file spaces.h.
References from_space_, v8::internal::SemiSpace::HasBeenSetUp(), and to_space_.
|
inline |
Definition at line 2412 of file spaces.h.
References DCHECK, from_space_, v8::internal::SemiSpace::InitialTotalCapacity(), and to_space_.
Referenced by Shrink().
|
inline |
MUST_USE_RESULT v8::internal::NewSpace::INLINE | ( | AllocationResult | AllocateRawint size_in_bytes | ) |
|
inline |
Definition at line 2448 of file spaces.h.
References Contains(), DCHECK, v8::internal::IsAligned(), v8::internal::kPointerSize, v8::internal::kPointerSizeLog2, OffsetFrom(), and start_.
|
inline |
Definition at line 2544 of file spaces.h.
References inline_allocation_limit_step_.
Referenced by v8::internal::Heap::Scavenge(), and UpdateInlineAllocationLimit().
|
inline |
Definition at line 2409 of file spaces.h.
References MaximumCapacity(), and TotalCapacity().
Referenced by v8::internal::Heap::DeoptMaybeTenuredAllocationSites(), and v8::internal::Heap::GarbageCollectionPrologue().
|
inline |
Definition at line 2430 of file spaces.h.
References allocation_info_, v8::internal::MemoryChunk::ContainsLimit(), v8::internal::SemiSpace::current_page(), DCHECK, and to_space_.
Referenced by AddFreshPage(), and v8::internal::Heap::EnsureFillerObjectAtTop().
|
inline |
Definition at line 2473 of file spaces.h.
References allocation_info_, inline_allocation_limit_step_, top_on_previous_step_, and UpdateInlineAllocationLimit().
Referenced by v8::internal::IncrementalMarking::Abort(), v8::internal::IncrementalMarking::Finalize(), v8::internal::Heap::Scavenge(), and v8::internal::IncrementalMarking::Start().
|
inline |
Definition at line 2446 of file spaces.h.
References address_mask_.
Referenced by v8::internal::Heap::NewSpaceMask().
|
inline |
Definition at line 2403 of file spaces.h.
References DCHECK, from_space_, v8::internal::SemiSpace::MaximumTotalCapacity(), and to_space_.
Referenced by v8::internal::Heap::CheckNewSpaceExpansionCriteria(), Grow(), and IsAtMaximumCapacity().
|
inline |
Definition at line 2391 of file spaces.h.
References from_space_, v8::internal::SemiSpace::MaximumCommittedMemory(), and to_space_.
Referenced by v8::internal::Heap::TearDown().
void v8::internal::NewSpace::RecordAllocation | ( | HeapObject * | obj | ) |
Definition at line 1925 of file spaces.cc.
References allocated_histogram_, DCHECK, v8::internal::Map::instance_type(), v8::internal::LAST_TYPE, v8::internal::HeapObject::map(), and v8::internal::HeapObject::Size().
Referenced by CollectStatistics(), and v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::RecordCopiedObject().
void v8::internal::NewSpace::RecordPromotion | ( | HeapObject * | obj | ) |
Definition at line 1933 of file spaces.cc.
References DCHECK, v8::internal::Map::instance_type(), v8::internal::LAST_TYPE, v8::internal::HeapObject::map(), promoted_histogram_, and v8::internal::HeapObject::Size().
Referenced by v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::RecordCopiedObject().
void v8::internal::NewSpace::ReportStatistics | ( | ) |
Definition at line 1897 of file spaces.cc.
References allocated_histogram_, Available(), v8::internal::DoReportStatistics(), v8::internal::Space::heap(), v8::internal::Heap::isolate(), v8::internal::LAST_TYPE, name, v8::internal::PrintF(), promoted_histogram_, TotalCapacity(), and V8_PTR_PREFIX.
Referenced by v8::internal::Heap::ReportStatisticsAfterGC(), and v8::internal::Heap::ReportStatisticsBeforeGC().
void v8::internal::NewSpace::ResetAllocationInfo | ( | ) |
Definition at line 1311 of file spaces.cc.
References v8::internal::Bitmap::Clear(), pages_used_, v8::internal::SemiSpace::Reset(), to_space_, and UpdateAllocationInfo().
Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), v8::internal::Heap::Scavenge(), and SetUp().
|
inline |
Definition at line 2441 of file spaces.h.
References v8::internal::SemiSpace::set_age_mark(), and to_space_.
Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), and v8::internal::Heap::Scavenge().
|
inline |
Definition at line 2424 of file spaces.h.
References allocation_info_, v8::internal::MemoryChunk::ContainsLimit(), v8::internal::SemiSpace::current_page(), DCHECK, to_space_, and top().
Referenced by v8::internal::SeqString::Truncate().
Definition at line 1175 of file spaces.cc.
References address_mask_, allocated_histogram_, chunk_base_, chunk_size_, v8::internal::SemiSpace::Commit(), DCHECK, from_space_, v8::internal::Space::heap(), v8::internal::Heap::InitialSemiSpaceSize(), INSTANCE_TYPE_LIST, v8::internal::SemiSpace::is_committed(), v8::internal::IsAddressAligned(), v8::internal::Heap::isolate(), v8::base::bits::IsPowerOfTwo32(), v8::internal::kHeapObjectTag, v8::internal::kHeapObjectTagMask, v8::internal::LAST_TYPE, LOG, v8::internal::Isolate::memory_allocator(), NULL, object_expected_, object_mask_, promoted_histogram_, reservation_, v8::internal::MemoryAllocator::ReserveAlignedMemory(), ResetAllocationInfo(), SET_NAME, v8::internal::SemiSpace::SetUp(), size, start_, and to_space_.
Referenced by v8::internal::Heap::SetUp().
void v8::internal::NewSpace::Shrink | ( | ) |
Definition at line 1281 of file spaces.cc.
References allocation_info_, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::V8::FatalProcessOutOfMemory(), from_space_, v8::internal::SemiSpace::GrowTo(), InitialTotalCapacity(), v8::internal::Page::kPageSize, v8::internal::Max(), v8::internal::SemiSpace::Reset(), v8::internal::RoundUp(), v8::internal::SemiSpace::ShrinkTo(), SizeAsInt(), to_space_, v8::internal::SemiSpace::TotalCapacity(), and TotalCapacity().
Referenced by v8::internal::Heap::AdvanceIdleIncrementalMarking(), and v8::internal::Heap::CollectAllAvailableGarbage().
|
inlinevirtual |
Implements v8::internal::Space.
Definition at line 2360 of file spaces.h.
References v8::internal::NewSpacePage::kAreaSize, v8::internal::SemiSpace::page_low(), pages_used_, to_space_, and top().
Referenced by Available(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::Heap::PrintShortHeapStatistics(), v8::internal::Heap::Scavenge(), v8::internal::Heap::SelectGarbageCollector(), and SizeAsInt().
|
inline |
Definition at line 2368 of file spaces.h.
References Size().
Referenced by v8::internal::Heap::PerformGarbageCollection(), v8::internal::Heap::RecordStats(), and Shrink().
|
private |
Definition at line 1374 of file spaces.cc.
References AddFreshPage(), allocation_info_, v8::internal::IncrementalMarking::GC_VIA_STACK_GUARD, v8::internal::Space::heap(), v8::internal::Heap::incremental_marking(), v8::internal::SemiSpace::page_high(), v8::internal::SemiSpace::page_low(), v8::internal::AllocationResult::Retry(), v8::internal::IncrementalMarking::Step(), to_space_, top_on_previous_step_, and UpdateInlineAllocationLimit().
|
inline |
Definition at line 2445 of file spaces.h.
References start_.
Referenced by v8::internal::Heap::NewSpaceStart().
void v8::internal::NewSpace::TearDown | ( | ) |
Definition at line 1230 of file spaces.cc.
References allocated_histogram_, allocation_info_, chunk_base_, chunk_size_, DCHECK, v8::internal::DeleteArray(), v8::internal::MemoryAllocator::FreeMemory(), from_space_, v8::internal::Space::heap(), v8::internal::Heap::isolate(), v8::base::VirtualMemory::IsReserved(), LOG, v8::internal::Isolate::memory_allocator(), v8::internal::NOT_EXECUTABLE, NULL, promoted_histogram_, reservation_, start_, v8::internal::SemiSpace::TearDown(), and to_space_.
Referenced by v8::internal::Heap::TearDown().
|
inline |
Definition at line 2419 of file spaces.h.
References allocation_info_, v8::internal::MemoryChunk::ContainsLimit(), v8::internal::SemiSpace::current_page(), DCHECK, and to_space_.
Referenced by AddFreshPage(), v8::internal::Heap::DoScavenge(), v8::internal::Heap::EnsureFillerObjectAtTop(), v8::internal::MarkCompactCollector::EvacuateNewSpace(), v8::internal::Heap::GarbageCollectionEpilogue(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::INLINE(), v8::internal::PromotionQueue::insert(), v8::internal::Heap::IsHeapIterable(), v8::internal::Heap::NewSpaceTop(), v8::internal::Heap::Scavenge(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::SemiSpaceCopyObject(), set_top(), v8::internal::Heap::SetUp(), Size(), v8::internal::GCTracer::Start(), v8::internal::GCTracer::Stop(), and v8::internal::SeqString::Truncate().
Definition at line 2491 of file spaces.h.
References v8::internal::SemiSpace::Contains(), and to_space_.
Referenced by v8::internal::Heap::Contains(), v8::internal::Heap::InSpace(), and v8::internal::Heap::InToSpace().
|
inline |
Definition at line 2489 of file spaces.h.
References v8::internal::SemiSpace::space_end(), and to_space_.
Referenced by v8::internal::PromotionQueue::Initialize().
|
inline |
Definition at line 2488 of file spaces.h.
References v8::internal::SemiSpace::space_start(), and to_space_.
Referenced by v8::internal::PromotionQueue::Initialize(), and v8::internal::Heap::Scavenge().
|
inline |
Definition at line 2379 of file spaces.h.
References DCHECK, from_space_, to_space_, and v8::internal::SemiSpace::TotalCapacity().
Referenced by v8::internal::Heap::CheckNewSpaceExpansionCriteria(), CommittedMemory(), Grow(), IsAtMaximumCapacity(), ReportStatistics(), and Shrink().
|
inline |
Definition at line 2539 of file spaces.h.
References from_space_, v8::internal::SemiSpace::is_committed(), and v8::internal::SemiSpace::Uncommit().
Referenced by v8::internal::Heap::UncommitFromSpace().
|
private |
Definition at line 1302 of file spaces.cc.
References allocation_info_, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::SemiSpace::page_high(), v8::internal::SemiSpace::page_low(), to_space_, v8::internal::MemoryChunk::UpdateHighWaterMark(), and UpdateInlineAllocationLimit().
Referenced by AddFreshPage(), and ResetAllocationInfo().
void v8::internal::NewSpace::UpdateInlineAllocationLimit | ( | int | size_in_bytes | ) |
Definition at line 1323 of file spaces.cc.
References allocation_info_, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::Space::heap(), inline_allocation_limit_step(), inline_allocation_limit_step_, v8::internal::Min(), v8::internal::SemiSpace::page_high(), and to_space_.
Referenced by v8::internal::Heap::DisableInlineAllocation(), v8::internal::Heap::EnableInlineAllocation(), LowerInlineAllocationLimit(), SlowAllocateRaw(), and UpdateAllocationInfo().
|
friend |
|
private |
Definition at line 2565 of file spaces.h.
Referenced by Contains(), mask(), and SetUp().
|
private |
Definition at line 2581 of file spaces.h.
Referenced by ClearHistograms(), RecordAllocation(), ReportStatistics(), SetUp(), and TearDown().
|
private |
Definition at line 2571 of file spaces.h.
Referenced by AddFreshPage(), allocation_limit_address(), allocation_top_address(), CommittedPhysicalMemory(), Grow(), limit(), LowerInlineAllocationLimit(), set_top(), Shrink(), SlowAllocateRaw(), TearDown(), top(), UpdateAllocationInfo(), and UpdateInlineAllocationLimit().
|
private |
Definition at line 2554 of file spaces.h.
Referenced by SetUp(), and TearDown().
|
private |
Definition at line 2555 of file spaces.h.
Referenced by SetUp(), and TearDown().
|
private |
Definition at line 2559 of file spaces.h.
Referenced by age_mark(), Capacity(), CommitFromSpaceIfNeeded(), CommittedMemory(), CommittedPhysicalMemory(), Flip(), FromSpaceContains(), FromSpaceEnd(), FromSpacePageHigh(), FromSpacePageLow(), FromSpaceStart(), Grow(), HasBeenSetUp(), InitialTotalCapacity(), MaximumCapacity(), MaximumCommittedMemory(), SetUp(), Shrink(), TearDown(), TotalCapacity(), and UncommitFromSpace().
|
private |
Definition at line 2577 of file spaces.h.
Referenced by inline_allocation_limit_step(), LowerInlineAllocationLimit(), and UpdateInlineAllocationLimit().
|
private |
Definition at line 2567 of file spaces.h.
Referenced by Contains(), and SetUp().
|
private |
Definition at line 2566 of file spaces.h.
Referenced by Contains(), and SetUp().
|
private |
Definition at line 2561 of file spaces.h.
Referenced by AddFreshPage(), ResetAllocationInfo(), and Size().
|
private |
Definition at line 2582 of file spaces.h.
Referenced by ClearHistograms(), RecordPromotion(), ReportStatistics(), SetUp(), and TearDown().
|
private |
Definition at line 2560 of file spaces.h.
Referenced by SetUp(), and TearDown().
|
private |
Definition at line 2564 of file spaces.h.
Referenced by Contains(), INLINE(), SetUp(), start(), and TearDown().
|
private |
Definition at line 2558 of file spaces.h.
Referenced by active_space(), AddFreshPage(), bottom(), Capacity(), CommittedPhysicalMemory(), Flip(), Grow(), HasBeenSetUp(), InitialTotalCapacity(), limit(), MaximumCapacity(), MaximumCommittedMemory(), ResetAllocationInfo(), set_age_mark(), set_top(), SetUp(), Shrink(), Size(), SlowAllocateRaw(), TearDown(), top(), ToSpaceContains(), ToSpaceEnd(), ToSpaceStart(), TotalCapacity(), UpdateAllocationInfo(), and UpdateInlineAllocationLimit().
|
private |
Definition at line 2579 of file spaces.h.
Referenced by LowerInlineAllocationLimit(), and SlowAllocateRaw().