Reland "[heap] Optimize MemoryChunk::FromAnyPointerAddress"

This is a reland of fd49c8bb43

Original change's description:
> [heap] Optimize MemoryChunk::FromAnyPointerAddress
> 
> Currently this function requires the caller to hold a mutex for the
> large page chunk hashtable and performs a hashtable lookup.
> 
> This patch adds a header sentinel field in each MemoryChunk. The field
> is then used to distinguish large object slots from ordinary slots.
> 
> Bug: chromium:915233
> Change-Id: I9fbeeb4f07f49573d0a21f9a2cc934370e417d68
> Reviewed-on: https://chromium-review.googlesource.com/c/1391752
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58732}

Bug: chromium:915233
Change-Id: I10d23a928328169a2dc6bab78d2b7d2c5d00ebb6
Reviewed-on: https://chromium-review.googlesource.com/c/1406672
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58876}
This commit is contained in:
Ulan Degenbaev 2019-01-17 11:24:31 +01:00 committed by Commit Bot
parent 66b616f450
commit c0994d3ffb
7 changed files with 283 additions and 261 deletions

View File

@ -616,13 +616,6 @@ void Heap::IncrementExternalBackingStoreBytes(ExternalBackingStoreType type,
// trigger garbage collections.
}
bool Heap::IsWithinLargeObject(Address address) {
if (new_lo_space()->FindPage(address) || lo_space()->FindPage(address) ||
code_lo_space()->FindPage(address))
return true;
return false;
}
void Heap::DecrementExternalBackingStoreBytes(ExternalBackingStoreType type,
size_t amount) {
base::CheckedDecrement(&backing_store_bytes_, amount);

View File

@ -377,7 +377,6 @@ class Heap {
bool IsLargeObject(HeapObject object);
bool IsLargeMemoryChunk(MemoryChunk* chunk);
inline bool IsWithinLargeObject(Address address);
bool IsInYoungGeneration(HeapObject object);

View File

@ -157,8 +157,7 @@ bool NewSpace::ToSpaceContains(Object o) { return to_space_.Contains(o); }
bool NewSpace::FromSpaceContains(Object o) { return from_space_.Contains(o); }
bool PagedSpace::Contains(Address addr) {
if (heap()->IsWithinLargeObject(addr)) return false;
return MemoryChunk::FromAnyPointerAddress(heap(), addr)->owner() == this;
return MemoryChunk::FromAnyPointerAddress(addr)->owner() == this;
}
bool PagedSpace::Contains(Object o) {
@ -199,12 +198,18 @@ bool PagedSpace::TryFreeLast(HeapObject object, int object_size) {
return false;
}
MemoryChunk* MemoryChunk::FromAnyPointerAddress(Heap* heap, Address addr) {
MemoryChunk* chunk = heap->lo_space()->FindPage(addr);
if (chunk == nullptr) {
chunk = MemoryChunk::FromAddress(addr);
bool MemoryChunk::HasHeaderSentinel(Address slot_addr) {
Address base = BaseAddress(slot_addr);
if (slot_addr < base + kHeaderSize) return false;
return HeapObject::FromAddress(base) ==
ObjectSlot(base + kHeaderSentinelOffset).Relaxed_Load();
}
MemoryChunk* MemoryChunk::FromAnyPointerAddress(Address addr) {
while (!HasHeaderSentinel(addr)) {
addr = BaseAddress(addr) - 1;
}
return chunk;
return FromAddress(addr);
}
void MemoryChunk::IncrementExternalBackingStoreBytes(

View File

@ -617,10 +617,12 @@ MemoryChunk* MemoryChunk::Initialize(Heap* heap, Address base, size_t size,
VirtualMemory reservation) {
MemoryChunk* chunk = FromAddress(base);
DCHECK(base == chunk->address());
DCHECK_EQ(base, chunk->address());
chunk->heap_ = heap;
chunk->size_ = size;
chunk->header_sentinel_ = HeapObject::FromAddress(base).ptr();
DCHECK(HasHeaderSentinel(area_start));
chunk->area_start_ = area_start;
chunk->area_end_ = area_end;
chunk->flags_ = Flags(NO_FLAGS);
@ -735,6 +737,15 @@ LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk,
MSAN_ALLOCATED_UNINITIALIZED_MEMORY(chunk->area_start(), chunk->area_size());
// Initialize the sentinel value for each page boundary since the mutator
// may initialize the object starting from its end.
Address sentinel = chunk->address() + MemoryChunk::kHeaderSentinelOffset +
MemoryChunk::kPageSize;
while (sentinel < chunk->area_end()) {
*reinterpret_cast<intptr_t*>(sentinel) = kNullAddress;
sentinel += MemoryChunk::kPageSize;
}
LargePage* page = static_cast<LargePage*>(chunk);
page->list_node().Initialize();
return page;

View File

@ -363,6 +363,8 @@ class MemoryChunk {
kMarkBitmapOffset + kSystemPointerSize;
static const intptr_t kHeapOffset =
kReservationOffset + 3 * kSystemPointerSize;
static const intptr_t kHeaderSentinelOffset =
kHeapOffset + kSystemPointerSize;
static const size_t kHeaderSize =
kSizeOffset // NOLINT
@ -371,6 +373,7 @@ class MemoryChunk {
+ kSystemPointerSize // Bitmap* marking_bitmap_
+ 3 * kSystemPointerSize // VirtualMemory reservation_
+ kSystemPointerSize // Heap* heap_
+ kSystemPointerSize // Address header_sentinel_
+ kSystemPointerSize // Address area_start_
+ kSystemPointerSize // Address area_end_
+ kSystemPointerSize // Address owner_
@ -405,19 +408,21 @@ class MemoryChunk {
// TODO(6792,mstarzinger): Drop to 3 or lower once WebAssembly is off heap.
static const int kMaxWriteUnprotectCounter = 4;
static Address BaseAddress(Address a) { return a & ~kAlignmentMask; }
// Only works if the pointer is in the first kPageSize of the MemoryChunk.
static MemoryChunk* FromAddress(Address a) {
return reinterpret_cast<MemoryChunk*>(a & ~kAlignmentMask);
return reinterpret_cast<MemoryChunk*>(BaseAddress(a));
}
// Only works if the object is in the first kPageSize of the MemoryChunk.
static MemoryChunk* FromHeapObject(const HeapObject o) {
return reinterpret_cast<MemoryChunk*>(o.ptr() & ~kAlignmentMask);
return reinterpret_cast<MemoryChunk*>(BaseAddress(o.ptr()));
}
void SetOldGenerationPageFlags(bool is_marking);
void SetYoungGenerationPageFlags(bool is_marking);
static inline MemoryChunk* FromAnyPointerAddress(Heap* heap, Address addr);
static inline MemoryChunk* FromAnyPointerAddress(Address addr);
static inline void UpdateHighWaterMark(Address mark) {
if (mark == kNullAddress) return;
@ -644,6 +649,8 @@ class MemoryChunk {
void set_owner(Space* space) { owner_ = space; }
static inline bool HasHeaderSentinel(Address slot_addr);
// Emits a memory barrier. For TSAN builds the other thread needs to perform
// MemoryChunk::synchronized_heap() to simulate the barrier.
void InitializationMemoryFence();
@ -688,6 +695,12 @@ class MemoryChunk {
Heap* heap_;
// This is used to distinguish the memory chunk header from the interior of a
// large page. The memory chunk header stores here an impossible tagged
// pointer: the tagger pointer of the page start. A field in a large object is
// guaranteed to not contain such a pointer.
Address header_sentinel_;
// Start and end of allocatable memory on this chunk.
Address area_start_;
Address area_end_;

View File

@ -160,14 +160,15 @@ void StoreBuffer::MoveEntriesToRememberedSet(int index) {
DCHECK_GE(index, 0);
DCHECK_LT(index, kStoreBuffers);
Address last_inserted_addr = kNullAddress;
MemoryChunk* chunk = nullptr;
// We are taking the chunk map mutex here because the page lookup of addr
// below may require us to check if addr is part of a large page.
base::MutexGuard guard(heap_->lo_space()->chunk_map_mutex());
for (Address* current = start_[index]; current < lazy_top_[index];
current++) {
Address addr = *current;
MemoryChunk* chunk = MemoryChunk::FromAnyPointerAddress(heap_, addr);
if (chunk == nullptr ||
MemoryChunk::BaseAddress(addr) != chunk->address()) {
chunk = MemoryChunk::FromAnyPointerAddress(addr);
}
if (IsDeletionAddress(addr)) {
last_inserted_addr = kNullAddress;
current++;

View File

@ -193,248 +193,248 @@ INSTANCE_TYPES = {
# List of known V8 maps.
KNOWN_MAPS = {
("RO_SPACE", 0x00131): (138, "FreeSpaceMap"),
("RO_SPACE", 0x00181): (132, "MetaMap"),
("RO_SPACE", 0x00201): (131, "NullMap"),
("RO_SPACE", 0x00269): (216, "DescriptorArrayMap"),
("RO_SPACE", 0x002c9): (211, "WeakFixedArrayMap"),
("RO_SPACE", 0x00319): (152, "OnePointerFillerMap"),
("RO_SPACE", 0x00369): (152, "TwoPointerFillerMap"),
("RO_SPACE", 0x003e9): (131, "UninitializedMap"),
("RO_SPACE", 0x00459): (8, "OneByteInternalizedStringMap"),
("RO_SPACE", 0x004f9): (131, "UndefinedMap"),
("RO_SPACE", 0x00559): (129, "HeapNumberMap"),
("RO_SPACE", 0x005d9): (131, "TheHoleMap"),
("RO_SPACE", 0x00681): (131, "BooleanMap"),
("RO_SPACE", 0x00759): (136, "ByteArrayMap"),
("RO_SPACE", 0x007a9): (187, "FixedArrayMap"),
("RO_SPACE", 0x007f9): (187, "FixedCOWArrayMap"),
("RO_SPACE", 0x00849): (189, "HashTableMap"),
("RO_SPACE", 0x00899): (128, "SymbolMap"),
("RO_SPACE", 0x008e9): (72, "OneByteStringMap"),
("RO_SPACE", 0x00939): (199, "ScopeInfoMap"),
("RO_SPACE", 0x00989): (223, "SharedFunctionInfoMap"),
("RO_SPACE", 0x009d9): (133, "CodeMap"),
("RO_SPACE", 0x00a29): (206, "FunctionContextMap"),
("RO_SPACE", 0x00a79): (214, "CellMap"),
("RO_SPACE", 0x00ac9): (222, "GlobalPropertyCellMap"),
("RO_SPACE", 0x00b19): (135, "ForeignMap"),
("RO_SPACE", 0x00b69): (212, "TransitionArrayMap"),
("RO_SPACE", 0x00bb9): (218, "FeedbackVectorMap"),
("RO_SPACE", 0x00c59): (131, "ArgumentsMarkerMap"),
("RO_SPACE", 0x00cf9): (131, "ExceptionMap"),
("RO_SPACE", 0x00d99): (131, "TerminationExceptionMap"),
("RO_SPACE", 0x00e41): (131, "OptimizedOutMap"),
("RO_SPACE", 0x00ee1): (131, "StaleRegisterMap"),
("RO_SPACE", 0x00f51): (208, "NativeContextMap"),
("RO_SPACE", 0x00fa1): (207, "ModuleContextMap"),
("RO_SPACE", 0x00ff1): (205, "EvalContextMap"),
("RO_SPACE", 0x01041): (209, "ScriptContextMap"),
("RO_SPACE", 0x01091): (201, "AwaitContextMap"),
("RO_SPACE", 0x010e1): (202, "BlockContextMap"),
("RO_SPACE", 0x01131): (203, "CatchContextMap"),
("RO_SPACE", 0x01181): (210, "WithContextMap"),
("RO_SPACE", 0x011d1): (204, "DebugEvaluateContextMap"),
("RO_SPACE", 0x01221): (200, "ScriptContextTableMap"),
("RO_SPACE", 0x01271): (151, "FeedbackMetadataArrayMap"),
("RO_SPACE", 0x012c1): (187, "ArrayListMap"),
("RO_SPACE", 0x01311): (130, "BigIntMap"),
("RO_SPACE", 0x01361): (188, "ObjectBoilerplateDescriptionMap"),
("RO_SPACE", 0x013b1): (137, "BytecodeArrayMap"),
("RO_SPACE", 0x01401): (215, "CodeDataContainerMap"),
("RO_SPACE", 0x01451): (150, "FixedDoubleArrayMap"),
("RO_SPACE", 0x014a1): (194, "GlobalDictionaryMap"),
("RO_SPACE", 0x014f1): (217, "ManyClosuresCellMap"),
("RO_SPACE", 0x01541): (187, "ModuleInfoMap"),
("RO_SPACE", 0x01591): (134, "MutableHeapNumberMap"),
("RO_SPACE", 0x015e1): (193, "NameDictionaryMap"),
("RO_SPACE", 0x01631): (217, "NoClosuresCellMap"),
("RO_SPACE", 0x01681): (217, "NoFeedbackCellMap"),
("RO_SPACE", 0x016d1): (195, "NumberDictionaryMap"),
("RO_SPACE", 0x01721): (217, "OneClosureCellMap"),
("RO_SPACE", 0x01771): (190, "OrderedHashMapMap"),
("RO_SPACE", 0x017c1): (191, "OrderedHashSetMap"),
("RO_SPACE", 0x01811): (192, "OrderedNameDictionaryMap"),
("RO_SPACE", 0x01861): (220, "PreparseDataMap"),
("RO_SPACE", 0x018b1): (221, "PropertyArrayMap"),
("RO_SPACE", 0x01901): (213, "SideEffectCallHandlerInfoMap"),
("RO_SPACE", 0x01951): (213, "SideEffectFreeCallHandlerInfoMap"),
("RO_SPACE", 0x019a1): (213, "NextCallSideEffectFreeCallHandlerInfoMap"),
("RO_SPACE", 0x019f1): (196, "SimpleNumberDictionaryMap"),
("RO_SPACE", 0x01a41): (187, "SloppyArgumentsElementsMap"),
("RO_SPACE", 0x01a91): (224, "SmallOrderedHashMapMap"),
("RO_SPACE", 0x01ae1): (225, "SmallOrderedHashSetMap"),
("RO_SPACE", 0x01b31): (226, "SmallOrderedNameDictionaryMap"),
("RO_SPACE", 0x01b81): (197, "StringTableMap"),
("RO_SPACE", 0x01bd1): (228, "UncompiledDataWithoutPreparseDataMap"),
("RO_SPACE", 0x01c21): (229, "UncompiledDataWithPreparseDataMap"),
("RO_SPACE", 0x01c71): (230, "WeakArrayListMap"),
("RO_SPACE", 0x01cc1): (198, "EphemeronHashTableMap"),
("RO_SPACE", 0x01d11): (186, "EmbedderDataArrayMap"),
("RO_SPACE", 0x01d61): (106, "NativeSourceStringMap"),
("RO_SPACE", 0x01db1): (64, "StringMap"),
("RO_SPACE", 0x01e01): (73, "ConsOneByteStringMap"),
("RO_SPACE", 0x01e51): (65, "ConsStringMap"),
("RO_SPACE", 0x01ea1): (77, "ThinOneByteStringMap"),
("RO_SPACE", 0x01ef1): (69, "ThinStringMap"),
("RO_SPACE", 0x01f41): (67, "SlicedStringMap"),
("RO_SPACE", 0x01f91): (75, "SlicedOneByteStringMap"),
("RO_SPACE", 0x01fe1): (66, "ExternalStringMap"),
("RO_SPACE", 0x02031): (82, "ExternalStringWithOneByteDataMap"),
("RO_SPACE", 0x02081): (74, "ExternalOneByteStringMap"),
("RO_SPACE", 0x020d1): (98, "UncachedExternalStringMap"),
("RO_SPACE", 0x02121): (114, "UncachedExternalStringWithOneByteDataMap"),
("RO_SPACE", 0x02171): (0, "InternalizedStringMap"),
("RO_SPACE", 0x021c1): (2, "ExternalInternalizedStringMap"),
("RO_SPACE", 0x02211): (18, "ExternalInternalizedStringWithOneByteDataMap"),
("RO_SPACE", 0x02261): (10, "ExternalOneByteInternalizedStringMap"),
("RO_SPACE", 0x022b1): (34, "UncachedExternalInternalizedStringMap"),
("RO_SPACE", 0x02301): (50, "UncachedExternalInternalizedStringWithOneByteDataMap"),
("RO_SPACE", 0x02351): (42, "UncachedExternalOneByteInternalizedStringMap"),
("RO_SPACE", 0x023a1): (106, "UncachedExternalOneByteStringMap"),
("RO_SPACE", 0x023f1): (140, "FixedUint8ArrayMap"),
("RO_SPACE", 0x02441): (139, "FixedInt8ArrayMap"),
("RO_SPACE", 0x02491): (142, "FixedUint16ArrayMap"),
("RO_SPACE", 0x024e1): (141, "FixedInt16ArrayMap"),
("RO_SPACE", 0x02531): (144, "FixedUint32ArrayMap"),
("RO_SPACE", 0x02581): (143, "FixedInt32ArrayMap"),
("RO_SPACE", 0x025d1): (145, "FixedFloat32ArrayMap"),
("RO_SPACE", 0x02621): (146, "FixedFloat64ArrayMap"),
("RO_SPACE", 0x02671): (147, "FixedUint8ClampedArrayMap"),
("RO_SPACE", 0x026c1): (149, "FixedBigUint64ArrayMap"),
("RO_SPACE", 0x02711): (148, "FixedBigInt64ArrayMap"),
("RO_SPACE", 0x02761): (131, "SelfReferenceMarkerMap"),
("RO_SPACE", 0x027c9): (173, "Tuple2Map"),
("RO_SPACE", 0x02869): (175, "ArrayBoilerplateDescriptionMap"),
("RO_SPACE", 0x02ba9): (163, "InterceptorInfoMap"),
("RO_SPACE", 0x050c9): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x05119): (154, "AccessorInfoMap"),
("RO_SPACE", 0x05169): (155, "AccessorPairMap"),
("RO_SPACE", 0x051b9): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x05209): (157, "AllocationMementoMap"),
("RO_SPACE", 0x05259): (158, "AsmWasmDataMap"),
("RO_SPACE", 0x052a9): (159, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x052f9): (160, "DebugInfoMap"),
("RO_SPACE", 0x05349): (161, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x05399): (162, "FunctionTemplateRareDataMap"),
("RO_SPACE", 0x053e9): (164, "InterpreterDataMap"),
("RO_SPACE", 0x05439): (165, "ModuleInfoEntryMap"),
("RO_SPACE", 0x05489): (166, "ModuleMap"),
("RO_SPACE", 0x054d9): (167, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x05529): (168, "PromiseCapabilityMap"),
("RO_SPACE", 0x05579): (169, "PromiseReactionMap"),
("RO_SPACE", 0x055c9): (170, "PrototypeInfoMap"),
("RO_SPACE", 0x05619): (171, "ScriptMap"),
("RO_SPACE", 0x05669): (172, "StackFrameInfoMap"),
("RO_SPACE", 0x056b9): (174, "Tuple3Map"),
("RO_SPACE", 0x05709): (176, "WasmDebugInfoMap"),
("RO_SPACE", 0x05759): (177, "WasmExceptionTagMap"),
("RO_SPACE", 0x057a9): (178, "WasmExportedFunctionDataMap"),
("RO_SPACE", 0x057f9): (179, "CallableTaskMap"),
("RO_SPACE", 0x05849): (180, "CallbackTaskMap"),
("RO_SPACE", 0x05899): (181, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x058e9): (182, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x05939): (183, "PromiseResolveThenableJobTaskMap"),
("RO_SPACE", 0x05989): (184, "WeakFactoryCleanupJobTaskMap"),
("RO_SPACE", 0x059d9): (185, "AllocationSiteWithWeakNextMap"),
("RO_SPACE", 0x05a29): (185, "AllocationSiteWithoutWeakNextMap"),
("RO_SPACE", 0x05a79): (219, "LoadHandler1Map"),
("RO_SPACE", 0x05ac9): (219, "LoadHandler2Map"),
("RO_SPACE", 0x05b19): (219, "LoadHandler3Map"),
("RO_SPACE", 0x05b69): (227, "StoreHandler0Map"),
("RO_SPACE", 0x05bb9): (227, "StoreHandler1Map"),
("RO_SPACE", 0x05c09): (227, "StoreHandler2Map"),
("RO_SPACE", 0x05c59): (227, "StoreHandler3Map"),
("MAP_SPACE", 0x00131): (1057, "ExternalMap"),
("MAP_SPACE", 0x00181): (1073, "JSMessageObjectMap"),
("RO_SPACE", 0x00139): (138, "FreeSpaceMap"),
("RO_SPACE", 0x00189): (132, "MetaMap"),
("RO_SPACE", 0x00209): (131, "NullMap"),
("RO_SPACE", 0x00271): (216, "DescriptorArrayMap"),
("RO_SPACE", 0x002d1): (211, "WeakFixedArrayMap"),
("RO_SPACE", 0x00321): (152, "OnePointerFillerMap"),
("RO_SPACE", 0x00371): (152, "TwoPointerFillerMap"),
("RO_SPACE", 0x003f1): (131, "UninitializedMap"),
("RO_SPACE", 0x00461): (8, "OneByteInternalizedStringMap"),
("RO_SPACE", 0x00501): (131, "UndefinedMap"),
("RO_SPACE", 0x00561): (129, "HeapNumberMap"),
("RO_SPACE", 0x005e1): (131, "TheHoleMap"),
("RO_SPACE", 0x00689): (131, "BooleanMap"),
("RO_SPACE", 0x00761): (136, "ByteArrayMap"),
("RO_SPACE", 0x007b1): (187, "FixedArrayMap"),
("RO_SPACE", 0x00801): (187, "FixedCOWArrayMap"),
("RO_SPACE", 0x00851): (189, "HashTableMap"),
("RO_SPACE", 0x008a1): (128, "SymbolMap"),
("RO_SPACE", 0x008f1): (72, "OneByteStringMap"),
("RO_SPACE", 0x00941): (199, "ScopeInfoMap"),
("RO_SPACE", 0x00991): (223, "SharedFunctionInfoMap"),
("RO_SPACE", 0x009e1): (133, "CodeMap"),
("RO_SPACE", 0x00a31): (206, "FunctionContextMap"),
("RO_SPACE", 0x00a81): (214, "CellMap"),
("RO_SPACE", 0x00ad1): (222, "GlobalPropertyCellMap"),
("RO_SPACE", 0x00b21): (135, "ForeignMap"),
("RO_SPACE", 0x00b71): (212, "TransitionArrayMap"),
("RO_SPACE", 0x00bc1): (218, "FeedbackVectorMap"),
("RO_SPACE", 0x00c61): (131, "ArgumentsMarkerMap"),
("RO_SPACE", 0x00d01): (131, "ExceptionMap"),
("RO_SPACE", 0x00da1): (131, "TerminationExceptionMap"),
("RO_SPACE", 0x00e49): (131, "OptimizedOutMap"),
("RO_SPACE", 0x00ee9): (131, "StaleRegisterMap"),
("RO_SPACE", 0x00f59): (208, "NativeContextMap"),
("RO_SPACE", 0x00fa9): (207, "ModuleContextMap"),
("RO_SPACE", 0x00ff9): (205, "EvalContextMap"),
("RO_SPACE", 0x01049): (209, "ScriptContextMap"),
("RO_SPACE", 0x01099): (201, "AwaitContextMap"),
("RO_SPACE", 0x010e9): (202, "BlockContextMap"),
("RO_SPACE", 0x01139): (203, "CatchContextMap"),
("RO_SPACE", 0x01189): (210, "WithContextMap"),
("RO_SPACE", 0x011d9): (204, "DebugEvaluateContextMap"),
("RO_SPACE", 0x01229): (200, "ScriptContextTableMap"),
("RO_SPACE", 0x01279): (151, "FeedbackMetadataArrayMap"),
("RO_SPACE", 0x012c9): (187, "ArrayListMap"),
("RO_SPACE", 0x01319): (130, "BigIntMap"),
("RO_SPACE", 0x01369): (188, "ObjectBoilerplateDescriptionMap"),
("RO_SPACE", 0x013b9): (137, "BytecodeArrayMap"),
("RO_SPACE", 0x01409): (215, "CodeDataContainerMap"),
("RO_SPACE", 0x01459): (150, "FixedDoubleArrayMap"),
("RO_SPACE", 0x014a9): (194, "GlobalDictionaryMap"),
("RO_SPACE", 0x014f9): (217, "ManyClosuresCellMap"),
("RO_SPACE", 0x01549): (187, "ModuleInfoMap"),
("RO_SPACE", 0x01599): (134, "MutableHeapNumberMap"),
("RO_SPACE", 0x015e9): (193, "NameDictionaryMap"),
("RO_SPACE", 0x01639): (217, "NoClosuresCellMap"),
("RO_SPACE", 0x01689): (217, "NoFeedbackCellMap"),
("RO_SPACE", 0x016d9): (195, "NumberDictionaryMap"),
("RO_SPACE", 0x01729): (217, "OneClosureCellMap"),
("RO_SPACE", 0x01779): (190, "OrderedHashMapMap"),
("RO_SPACE", 0x017c9): (191, "OrderedHashSetMap"),
("RO_SPACE", 0x01819): (192, "OrderedNameDictionaryMap"),
("RO_SPACE", 0x01869): (220, "PreparseDataMap"),
("RO_SPACE", 0x018b9): (221, "PropertyArrayMap"),
("RO_SPACE", 0x01909): (213, "SideEffectCallHandlerInfoMap"),
("RO_SPACE", 0x01959): (213, "SideEffectFreeCallHandlerInfoMap"),
("RO_SPACE", 0x019a9): (213, "NextCallSideEffectFreeCallHandlerInfoMap"),
("RO_SPACE", 0x019f9): (196, "SimpleNumberDictionaryMap"),
("RO_SPACE", 0x01a49): (187, "SloppyArgumentsElementsMap"),
("RO_SPACE", 0x01a99): (224, "SmallOrderedHashMapMap"),
("RO_SPACE", 0x01ae9): (225, "SmallOrderedHashSetMap"),
("RO_SPACE", 0x01b39): (226, "SmallOrderedNameDictionaryMap"),
("RO_SPACE", 0x01b89): (197, "StringTableMap"),
("RO_SPACE", 0x01bd9): (228, "UncompiledDataWithoutPreparseDataMap"),
("RO_SPACE", 0x01c29): (229, "UncompiledDataWithPreparseDataMap"),
("RO_SPACE", 0x01c79): (230, "WeakArrayListMap"),
("RO_SPACE", 0x01cc9): (198, "EphemeronHashTableMap"),
("RO_SPACE", 0x01d19): (186, "EmbedderDataArrayMap"),
("RO_SPACE", 0x01d69): (106, "NativeSourceStringMap"),
("RO_SPACE", 0x01db9): (64, "StringMap"),
("RO_SPACE", 0x01e09): (73, "ConsOneByteStringMap"),
("RO_SPACE", 0x01e59): (65, "ConsStringMap"),
("RO_SPACE", 0x01ea9): (77, "ThinOneByteStringMap"),
("RO_SPACE", 0x01ef9): (69, "ThinStringMap"),
("RO_SPACE", 0x01f49): (67, "SlicedStringMap"),
("RO_SPACE", 0x01f99): (75, "SlicedOneByteStringMap"),
("RO_SPACE", 0x01fe9): (66, "ExternalStringMap"),
("RO_SPACE", 0x02039): (82, "ExternalStringWithOneByteDataMap"),
("RO_SPACE", 0x02089): (74, "ExternalOneByteStringMap"),
("RO_SPACE", 0x020d9): (98, "UncachedExternalStringMap"),
("RO_SPACE", 0x02129): (114, "UncachedExternalStringWithOneByteDataMap"),
("RO_SPACE", 0x02179): (0, "InternalizedStringMap"),
("RO_SPACE", 0x021c9): (2, "ExternalInternalizedStringMap"),
("RO_SPACE", 0x02219): (18, "ExternalInternalizedStringWithOneByteDataMap"),
("RO_SPACE", 0x02269): (10, "ExternalOneByteInternalizedStringMap"),
("RO_SPACE", 0x022b9): (34, "UncachedExternalInternalizedStringMap"),
("RO_SPACE", 0x02309): (50, "UncachedExternalInternalizedStringWithOneByteDataMap"),
("RO_SPACE", 0x02359): (42, "UncachedExternalOneByteInternalizedStringMap"),
("RO_SPACE", 0x023a9): (106, "UncachedExternalOneByteStringMap"),
("RO_SPACE", 0x023f9): (140, "FixedUint8ArrayMap"),
("RO_SPACE", 0x02449): (139, "FixedInt8ArrayMap"),
("RO_SPACE", 0x02499): (142, "FixedUint16ArrayMap"),
("RO_SPACE", 0x024e9): (141, "FixedInt16ArrayMap"),
("RO_SPACE", 0x02539): (144, "FixedUint32ArrayMap"),
("RO_SPACE", 0x02589): (143, "FixedInt32ArrayMap"),
("RO_SPACE", 0x025d9): (145, "FixedFloat32ArrayMap"),
("RO_SPACE", 0x02629): (146, "FixedFloat64ArrayMap"),
("RO_SPACE", 0x02679): (147, "FixedUint8ClampedArrayMap"),
("RO_SPACE", 0x026c9): (149, "FixedBigUint64ArrayMap"),
("RO_SPACE", 0x02719): (148, "FixedBigInt64ArrayMap"),
("RO_SPACE", 0x02769): (131, "SelfReferenceMarkerMap"),
("RO_SPACE", 0x027d1): (173, "Tuple2Map"),
("RO_SPACE", 0x02871): (175, "ArrayBoilerplateDescriptionMap"),
("RO_SPACE", 0x02bb1): (163, "InterceptorInfoMap"),
("RO_SPACE", 0x050d1): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x05121): (154, "AccessorInfoMap"),
("RO_SPACE", 0x05171): (155, "AccessorPairMap"),
("RO_SPACE", 0x051c1): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x05211): (157, "AllocationMementoMap"),
("RO_SPACE", 0x05261): (158, "AsmWasmDataMap"),
("RO_SPACE", 0x052b1): (159, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x05301): (160, "DebugInfoMap"),
("RO_SPACE", 0x05351): (161, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x053a1): (162, "FunctionTemplateRareDataMap"),
("RO_SPACE", 0x053f1): (164, "InterpreterDataMap"),
("RO_SPACE", 0x05441): (165, "ModuleInfoEntryMap"),
("RO_SPACE", 0x05491): (166, "ModuleMap"),
("RO_SPACE", 0x054e1): (167, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x05531): (168, "PromiseCapabilityMap"),
("RO_SPACE", 0x05581): (169, "PromiseReactionMap"),
("RO_SPACE", 0x055d1): (170, "PrototypeInfoMap"),
("RO_SPACE", 0x05621): (171, "ScriptMap"),
("RO_SPACE", 0x05671): (172, "StackFrameInfoMap"),
("RO_SPACE", 0x056c1): (174, "Tuple3Map"),
("RO_SPACE", 0x05711): (176, "WasmDebugInfoMap"),
("RO_SPACE", 0x05761): (177, "WasmExceptionTagMap"),
("RO_SPACE", 0x057b1): (178, "WasmExportedFunctionDataMap"),
("RO_SPACE", 0x05801): (179, "CallableTaskMap"),
("RO_SPACE", 0x05851): (180, "CallbackTaskMap"),
("RO_SPACE", 0x058a1): (181, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x058f1): (182, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x05941): (183, "PromiseResolveThenableJobTaskMap"),
("RO_SPACE", 0x05991): (184, "WeakFactoryCleanupJobTaskMap"),
("RO_SPACE", 0x059e1): (185, "AllocationSiteWithWeakNextMap"),
("RO_SPACE", 0x05a31): (185, "AllocationSiteWithoutWeakNextMap"),
("RO_SPACE", 0x05a81): (219, "LoadHandler1Map"),
("RO_SPACE", 0x05ad1): (219, "LoadHandler2Map"),
("RO_SPACE", 0x05b21): (219, "LoadHandler3Map"),
("RO_SPACE", 0x05b71): (227, "StoreHandler0Map"),
("RO_SPACE", 0x05bc1): (227, "StoreHandler1Map"),
("RO_SPACE", 0x05c11): (227, "StoreHandler2Map"),
("RO_SPACE", 0x05c61): (227, "StoreHandler3Map"),
("MAP_SPACE", 0x00139): (1057, "ExternalMap"),
("MAP_SPACE", 0x00189): (1073, "JSMessageObjectMap"),
}
# List of known V8 objects.
KNOWN_OBJECTS = {
("RO_SPACE", 0x001d1): "NullValue",
("RO_SPACE", 0x00251): "EmptyDescriptorArray",
("RO_SPACE", 0x002b9): "EmptyWeakFixedArray",
("RO_SPACE", 0x003b9): "UninitializedValue",
("RO_SPACE", 0x004c9): "UndefinedValue",
("RO_SPACE", 0x00549): "NanValue",
("RO_SPACE", 0x005a9): "TheHoleValue",
("RO_SPACE", 0x00641): "HoleNanValue",
("RO_SPACE", 0x00651): "TrueValue",
("RO_SPACE", 0x00701): "FalseValue",
("RO_SPACE", 0x00749): "empty_string",
("RO_SPACE", 0x00c09): "EmptyScopeInfo",
("RO_SPACE", 0x00c19): "EmptyFixedArray",
("RO_SPACE", 0x00c29): "ArgumentsMarker",
("RO_SPACE", 0x00cc9): "Exception",
("RO_SPACE", 0x00d69): "TerminationException",
("RO_SPACE", 0x00e11): "OptimizedOut",
("RO_SPACE", 0x00eb1): "StaleRegister",
("RO_SPACE", 0x027b1): "EmptyEnumCache",
("RO_SPACE", 0x02819): "EmptyPropertyArray",
("RO_SPACE", 0x02829): "EmptyByteArray",
("RO_SPACE", 0x02839): "EmptyObjectBoilerplateDescription",
("RO_SPACE", 0x02851): "EmptyArrayBoilerplateDescription",
("RO_SPACE", 0x028b9): "EmptyFixedUint8Array",
("RO_SPACE", 0x028d9): "EmptyFixedInt8Array",
("RO_SPACE", 0x028f9): "EmptyFixedUint16Array",
("RO_SPACE", 0x02919): "EmptyFixedInt16Array",
("RO_SPACE", 0x02939): "EmptyFixedUint32Array",
("RO_SPACE", 0x02959): "EmptyFixedInt32Array",
("RO_SPACE", 0x02979): "EmptyFixedFloat32Array",
("RO_SPACE", 0x02999): "EmptyFixedFloat64Array",
("RO_SPACE", 0x029b9): "EmptyFixedUint8ClampedArray",
("RO_SPACE", 0x029d9): "EmptyFixedBigUint64Array",
("RO_SPACE", 0x029f9): "EmptyFixedBigInt64Array",
("RO_SPACE", 0x02a19): "EmptySloppyArgumentsElements",
("RO_SPACE", 0x02a39): "EmptySlowElementDictionary",
("RO_SPACE", 0x02a81): "EmptyOrderedHashMap",
("RO_SPACE", 0x02aa9): "EmptyOrderedHashSet",
("RO_SPACE", 0x02ad1): "EmptyFeedbackMetadata",
("RO_SPACE", 0x02ae1): "EmptyPropertyCell",
("RO_SPACE", 0x02b09): "EmptyPropertyDictionary",
("RO_SPACE", 0x02b59): "NoOpInterceptorInfo",
("RO_SPACE", 0x02bf9): "EmptyWeakArrayList",
("RO_SPACE", 0x02c11): "InfinityValue",
("RO_SPACE", 0x02c21): "MinusZeroValue",
("RO_SPACE", 0x02c31): "MinusInfinityValue",
("RO_SPACE", 0x02c41): "SelfReferenceMarker",
("RO_SPACE", 0x02c99): "OffHeapTrampolineRelocationInfo",
("RO_SPACE", 0x02cb1): "HashSeed",
("OLD_SPACE", 0x00131): "ArgumentsIteratorAccessor",
("OLD_SPACE", 0x001a1): "ArrayLengthAccessor",
("OLD_SPACE", 0x00211): "BoundFunctionLengthAccessor",
("OLD_SPACE", 0x00281): "BoundFunctionNameAccessor",
("OLD_SPACE", 0x002f1): "ErrorStackAccessor",
("OLD_SPACE", 0x00361): "FunctionArgumentsAccessor",
("OLD_SPACE", 0x003d1): "FunctionCallerAccessor",
("OLD_SPACE", 0x00441): "FunctionNameAccessor",
("OLD_SPACE", 0x004b1): "FunctionLengthAccessor",
("OLD_SPACE", 0x00521): "FunctionPrototypeAccessor",
("OLD_SPACE", 0x00591): "StringLengthAccessor",
("OLD_SPACE", 0x00601): "InvalidPrototypeValidityCell",
("OLD_SPACE", 0x00611): "EmptyScript",
("OLD_SPACE", 0x00691): "ManyClosuresCell",
("OLD_SPACE", 0x006a1): "NoFeedbackCell",
("OLD_SPACE", 0x006b1): "ArrayConstructorProtector",
("OLD_SPACE", 0x006c1): "NoElementsProtector",
("OLD_SPACE", 0x006e9): "IsConcatSpreadableProtector",
("OLD_SPACE", 0x006f9): "ArraySpeciesProtector",
("OLD_SPACE", 0x00721): "TypedArraySpeciesProtector",
("OLD_SPACE", 0x00749): "RegExpSpeciesProtector",
("OLD_SPACE", 0x00771): "PromiseSpeciesProtector",
("OLD_SPACE", 0x00799): "StringLengthProtector",
("OLD_SPACE", 0x007a9): "ArrayIteratorProtector",
("OLD_SPACE", 0x007d1): "ArrayBufferDetachingProtector",
("OLD_SPACE", 0x007f9): "PromiseHookProtector",
("OLD_SPACE", 0x00821): "PromiseResolveProtector",
("OLD_SPACE", 0x00831): "MapIteratorProtector",
("OLD_SPACE", 0x00859): "PromiseThenProtector",
("OLD_SPACE", 0x00881): "SetIteratorProtector",
("OLD_SPACE", 0x008a9): "StringIteratorProtector",
("OLD_SPACE", 0x008d1): "SingleCharacterStringCache",
("OLD_SPACE", 0x010e1): "StringSplitCache",
("OLD_SPACE", 0x018f1): "RegExpMultipleCache",
("OLD_SPACE", 0x02101): "BuiltinsConstantsTable",
("RO_SPACE", 0x001d9): "NullValue",
("RO_SPACE", 0x00259): "EmptyDescriptorArray",
("RO_SPACE", 0x002c1): "EmptyWeakFixedArray",
("RO_SPACE", 0x003c1): "UninitializedValue",
("RO_SPACE", 0x004d1): "UndefinedValue",
("RO_SPACE", 0x00551): "NanValue",
("RO_SPACE", 0x005b1): "TheHoleValue",
("RO_SPACE", 0x00649): "HoleNanValue",
("RO_SPACE", 0x00659): "TrueValue",
("RO_SPACE", 0x00709): "FalseValue",
("RO_SPACE", 0x00751): "empty_string",
("RO_SPACE", 0x00c11): "EmptyScopeInfo",
("RO_SPACE", 0x00c21): "EmptyFixedArray",
("RO_SPACE", 0x00c31): "ArgumentsMarker",
("RO_SPACE", 0x00cd1): "Exception",
("RO_SPACE", 0x00d71): "TerminationException",
("RO_SPACE", 0x00e19): "OptimizedOut",
("RO_SPACE", 0x00eb9): "StaleRegister",
("RO_SPACE", 0x027b9): "EmptyEnumCache",
("RO_SPACE", 0x02821): "EmptyPropertyArray",
("RO_SPACE", 0x02831): "EmptyByteArray",
("RO_SPACE", 0x02841): "EmptyObjectBoilerplateDescription",
("RO_SPACE", 0x02859): "EmptyArrayBoilerplateDescription",
("RO_SPACE", 0x028c1): "EmptyFixedUint8Array",
("RO_SPACE", 0x028e1): "EmptyFixedInt8Array",
("RO_SPACE", 0x02901): "EmptyFixedUint16Array",
("RO_SPACE", 0x02921): "EmptyFixedInt16Array",
("RO_SPACE", 0x02941): "EmptyFixedUint32Array",
("RO_SPACE", 0x02961): "EmptyFixedInt32Array",
("RO_SPACE", 0x02981): "EmptyFixedFloat32Array",
("RO_SPACE", 0x029a1): "EmptyFixedFloat64Array",
("RO_SPACE", 0x029c1): "EmptyFixedUint8ClampedArray",
("RO_SPACE", 0x029e1): "EmptyFixedBigUint64Array",
("RO_SPACE", 0x02a01): "EmptyFixedBigInt64Array",
("RO_SPACE", 0x02a21): "EmptySloppyArgumentsElements",
("RO_SPACE", 0x02a41): "EmptySlowElementDictionary",
("RO_SPACE", 0x02a89): "EmptyOrderedHashMap",
("RO_SPACE", 0x02ab1): "EmptyOrderedHashSet",
("RO_SPACE", 0x02ad9): "EmptyFeedbackMetadata",
("RO_SPACE", 0x02ae9): "EmptyPropertyCell",
("RO_SPACE", 0x02b11): "EmptyPropertyDictionary",
("RO_SPACE", 0x02b61): "NoOpInterceptorInfo",
("RO_SPACE", 0x02c01): "EmptyWeakArrayList",
("RO_SPACE", 0x02c19): "InfinityValue",
("RO_SPACE", 0x02c29): "MinusZeroValue",
("RO_SPACE", 0x02c39): "MinusInfinityValue",
("RO_SPACE", 0x02c49): "SelfReferenceMarker",
("RO_SPACE", 0x02ca1): "OffHeapTrampolineRelocationInfo",
("RO_SPACE", 0x02cb9): "HashSeed",
("OLD_SPACE", 0x00139): "ArgumentsIteratorAccessor",
("OLD_SPACE", 0x001a9): "ArrayLengthAccessor",
("OLD_SPACE", 0x00219): "BoundFunctionLengthAccessor",
("OLD_SPACE", 0x00289): "BoundFunctionNameAccessor",
("OLD_SPACE", 0x002f9): "ErrorStackAccessor",
("OLD_SPACE", 0x00369): "FunctionArgumentsAccessor",
("OLD_SPACE", 0x003d9): "FunctionCallerAccessor",
("OLD_SPACE", 0x00449): "FunctionNameAccessor",
("OLD_SPACE", 0x004b9): "FunctionLengthAccessor",
("OLD_SPACE", 0x00529): "FunctionPrototypeAccessor",
("OLD_SPACE", 0x00599): "StringLengthAccessor",
("OLD_SPACE", 0x00609): "InvalidPrototypeValidityCell",
("OLD_SPACE", 0x00619): "EmptyScript",
("OLD_SPACE", 0x00699): "ManyClosuresCell",
("OLD_SPACE", 0x006a9): "NoFeedbackCell",
("OLD_SPACE", 0x006b9): "ArrayConstructorProtector",
("OLD_SPACE", 0x006c9): "NoElementsProtector",
("OLD_SPACE", 0x006f1): "IsConcatSpreadableProtector",
("OLD_SPACE", 0x00701): "ArraySpeciesProtector",
("OLD_SPACE", 0x00729): "TypedArraySpeciesProtector",
("OLD_SPACE", 0x00751): "RegExpSpeciesProtector",
("OLD_SPACE", 0x00779): "PromiseSpeciesProtector",
("OLD_SPACE", 0x007a1): "StringLengthProtector",
("OLD_SPACE", 0x007b1): "ArrayIteratorProtector",
("OLD_SPACE", 0x007d9): "ArrayBufferDetachingProtector",
("OLD_SPACE", 0x00801): "PromiseHookProtector",
("OLD_SPACE", 0x00829): "PromiseResolveProtector",
("OLD_SPACE", 0x00839): "MapIteratorProtector",
("OLD_SPACE", 0x00861): "PromiseThenProtector",
("OLD_SPACE", 0x00889): "SetIteratorProtector",
("OLD_SPACE", 0x008b1): "StringIteratorProtector",
("OLD_SPACE", 0x008d9): "SingleCharacterStringCache",
("OLD_SPACE", 0x010e9): "StringSplitCache",
("OLD_SPACE", 0x018f9): "RegExpMultipleCache",
("OLD_SPACE", 0x02109): "BuiltinsConstantsTable",
}
# List of known V8 Frame Markers.