Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use bump ranges instead of free list in JSC allocator
https://bugs.webkit.org/show_bug.cgi?id=255798 rdar://108377867 Reviewed by Yusuke Suzuki and Mark Lam. Replaces the JSC free list allocator with a list of free intervals. Each interval represents a contiguous block of dead cells, and within each interval we can bump-allocate. This should mean we bump-allocate more often, and potentially speed up sweeping by nature of installing fewer free list cells, especially for use cases where we don't often manage to totally empty blocks currently. * Source/JavaScriptCore/heap/FreeList.cpp: (JSC::FreeList::clear): (JSC::FreeList::initialize): (JSC::FreeList::contains const): (JSC::FreeList::dump const): (JSC::FreeList::initializeList): Deleted. (JSC::FreeList::initializeBump): Deleted. * Source/JavaScriptCore/heap/FreeList.h: (JSC::FreeCell::scramble): (JSC::FreeCell::descramble): (JSC::FreeCell::makeLast): (JSC::FreeCell::setNext): (JSC::FreeCell::decode): (JSC::FreeCell::offsetOfScrambledBits): (JSC::FreeList::allocationWillFail const): (JSC::FreeList::isSentinel): (JSC::FreeList::offsetOfHead): (JSC::FreeList::offsetOfPayloadStart): (JSC::FreeList::offsetOfPayloadEnd): (JSC::FreeList::head const): (JSC::FreeCell::next const): Deleted. (JSC::FreeCell::offsetOfScrambledNext): Deleted. (JSC::FreeList::offsetOfScrambledHead): Deleted. (JSC::FreeList::offsetOfRemaining): Deleted. * Source/JavaScriptCore/heap/FreeListInlines.h: (JSC::FreeList::allocate): (JSC::FreeList::forEach const): * Source/JavaScriptCore/heap/MarkedBlockInlines.h: (JSC::MarkedBlock::Handle::specializedSweep): * Source/JavaScriptCore/jit/AssemblyHelpers.cpp: (JSC::AssemblyHelpers::jitAssertTagsInPlace): (JSC::AssemblyHelpers::emitExceptionCheck): (JSC::AssemblyHelpers::emitNonPatchableExceptionCheck): (JSC::AssemblyHelpers::loadProperty): (JSC::AssemblyHelpers::storeProperty): (JSC::AssemblyHelpers::emitAllocateWithNonNullAllocator): (JSC::AssemblyHelpers::emitAllocateVariableSized): (JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer): (JSC::AssemblyHelpers::emitRestoreCalleeSavesFor): Canonical link: https://commits.webkit.org/263313@main
- Loading branch information
Showing
6 changed files
with
259 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.