Revert "[heap] Move initial objects into RO_SPACE"

This reverts commit f8ae62fe14.

Reason for revert:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20internal%20snapshot/builds/14825

Original change's description:
> [heap] Move initial objects into RO_SPACE
> 
> This moves:
> * the main oddballs (null, undefined, hole, true, false) as well as
> their supporting maps (also adds hole as an internalized string to make
> this work).
> * most of the internalized strings
> * the struct maps
> * empty array
> * empty enum cache
> * the contents of the initial string table
> * the weak_cell_cache for any map in RO_SPACE (and eagerly creates the
> value avoid writing to it during run-time)
> 
> The StartupSerializer stats change as follows:
> 
>      RO_SPACE  NEW_SPACE  OLD_SPACE  CODE_SPACE  MAP_SPACE  LO_SPACE
> old         0          0     270264       32608      12144         0
> new     21776          0     253168       32608       8184         0
> Overall memory usage has increased by 720 bytes due to the eager
> initialization of the Map weak cell caches.
> 
> Also extends --serialization-statistics to print out separate instance
> type stats for objects in RO_SPACE as shown here:
> 
>   Read Only Instance types (count and bytes):
>        404      16736  ONE_BYTE_INTERNALIZED_STRING_TYPE
>          2         32  HEAP_NUMBER_TYPE
>          5        240  ODDBALL_TYPE
>         45       3960  MAP_TYPE
>          1         16  BYTE_ARRAY_TYPE
>          1         24  TUPLE2_TYPE
>          1         16  FIXED_ARRAY_TYPE
>          1         32  DESCRIPTOR_ARRAY_TYPE
>         45        720  WEAK_CELL_TYPE
> 
> Bug: v8:7464
> Change-Id: I12981c39c82a7057f68bbbe03f89fb57b0b4c6a6
> Reviewed-on: https://chromium-review.googlesource.com/973722
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Reviewed-by: Hannes Payer <hpayer@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52435}

TBR=rmcilroy@chromium.org,yangguo@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,delphick@chromium.org

Change-Id: Ie62a73a5be3b21a15bb46e342acb3e808fbaa4f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7464
Reviewed-on: https://chromium-review.googlesource.com/999653
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52440}
This commit is contained in:
Michael Achenbach 2018-04-06 12:42:29 +00:00 committed by Commit Bot
parent dcfea5b358
commit 223e0088ef
10 changed files with 269 additions and 342 deletions

View File

@ -570,10 +570,10 @@ inline std::ostream& operator<<(std::ostream& os, WriteBarrierKind kind) {
}
// A flag that indicates whether objects should be pretenured when
// allocated (allocated directly into either the old generation or read-only
// space), or not (allocated in the young generation if the object size and type
// allocated (allocated directly into the old generation) or not
// (allocated in the young generation if the object size and type
// allows).
enum PretenureFlag { NOT_TENURED, TENURED, TENURED_READ_ONLY };
enum PretenureFlag { NOT_TENURED, TENURED };
inline std::ostream& operator<<(std::ostream& os, const PretenureFlag& flag) {
switch (flag) {
@ -581,8 +581,6 @@ inline std::ostream& operator<<(std::ostream& os, const PretenureFlag& flag) {
return os << "NotTenured";
case TENURED:
return os << "Tenured";
case TENURED_READ_ONLY:
return os << "TenuredReadOnly";
}
UNREACHABLE();
}

View File

@ -173,8 +173,7 @@ AllocationResult Heap::AllocateOneByteInternalizedString(
// Allocate string.
HeapObject* result = nullptr;
{
AllocationResult allocation =
AllocateRaw(size, CanAllocateInReadOnlySpace() ? RO_SPACE : OLD_SPACE);
AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
@ -339,7 +338,6 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationSpace space,
DCHECK(isolate_->serializer_enabled());
#endif
DCHECK(!large_object);
DCHECK(CanAllocateInReadOnlySpace());
allocation = read_only_space_->AllocateRaw(size_in_bytes, alignment);
} else {
// NEW_SPACE is not allowed here.
@ -419,12 +417,6 @@ void Heap::OnMoveEvent(HeapObject* target, HeapObject* source,
}
}
bool Heap::CanAllocateInReadOnlySpace() {
return !deserialization_complete_ &&
(isolate()->serializer_enabled() ||
!isolate()->initialized_from_snapshot());
}
void Heap::UpdateAllocationsHash(HeapObject* object) {
Address object_address = object->address();
MemoryChunk* memory_chunk = MemoryChunk::FromAddress(object_address);

View File

@ -2542,9 +2542,8 @@ void Heap::ConfigureInitialOldGenerationSize() {
AllocationResult Heap::AllocatePartialMap(InstanceType instance_type,
int instance_size) {
DCHECK(CanAllocateInReadOnlySpace());
Object* result = nullptr;
AllocationResult allocation = AllocateRaw(Map::kSize, RO_SPACE);
AllocationResult allocation = AllocateRaw(Map::kSize, MAP_SPACE);
if (!allocation.To(&result)) return allocation;
// Map::cast cannot be used due to uninitialized map field.
Map* map = reinterpret_cast<Map*>(result);
@ -2730,18 +2729,15 @@ AllocationResult Heap::AllocatePropertyCell(Name* name) {
return result;
}
AllocationResult Heap::AllocateWeakCell(HeapObject* value,
PretenureFlag pretenure) {
DCHECK(pretenure != NOT_TENURED);
AllocationResult Heap::AllocateWeakCell(HeapObject* value) {
int size = WeakCell::kSize;
STATIC_ASSERT(WeakCell::kSize <= kMaxRegularHeapObjectSize);
HeapObject* result = nullptr;
{
AllocationResult allocation =
AllocateRaw(size, pretenure == TENURED ? OLD_SPACE : RO_SPACE);
AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
DCHECK_NOT_NULL(weak_cell_map());
result->set_map_after_allocation(weak_cell_map(), SKIP_WRITE_BARRIER);
WeakCell::cast(result)->initialize(value);
return result;
@ -3721,10 +3717,7 @@ AllocationResult Heap::AllocateInternalizedStringImpl(T t, int chars,
// Allocate string.
HeapObject* result = nullptr;
{
// TODO(delphick): Look at reworking internalized string creation to avoid
// this hidden global mode switch.
AllocationResult allocation =
AllocateRaw(size, CanAllocateInReadOnlySpace() ? RO_SPACE : OLD_SPACE);
AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
@ -3802,12 +3795,12 @@ AllocationResult Heap::AllocateRawTwoByteString(int length,
return result;
}
AllocationResult Heap::AllocateEmptyFixedArray() {
DCHECK(CanAllocateInReadOnlySpace());
int size = FixedArray::SizeFor(0);
HeapObject* result = nullptr;
{
AllocationResult allocation = AllocateRaw(size, RO_SPACE);
AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
// Initialize the object.
@ -3883,9 +3876,10 @@ AllocationResult Heap::CopyAndTenureFixedCOWArray(FixedArray* src) {
return result;
}
AllocationResult Heap::AllocateEmptyFixedTypedArray(
ExternalArrayType array_type, PretenureFlag pretenure) {
return AllocateFixedTypedArray(0, array_type, false, pretenure);
ExternalArrayType array_type) {
return AllocateFixedTypedArray(0, array_type, false, TENURED);
}
namespace {
@ -4077,8 +4071,7 @@ AllocationResult Heap::AllocatePropertyArray(int length,
PretenureFlag pretenure) {
// Allow length = 0 for the empty_property_array singleton.
DCHECK_LE(0, length);
DCHECK_IMPLIES(length == 0,
pretenure == TENURED || pretenure == TENURED_READ_ONLY);
DCHECK_IMPLIES(length == 0, pretenure == TENURED);
DCHECK(!InNewSpace(undefined_value()));
HeapObject* result = nullptr;

View File

@ -933,7 +933,6 @@ class Heap {
inline void OnMoveEvent(HeapObject* target, HeapObject* source,
int size_in_bytes);
inline bool CanAllocateInReadOnlySpace();
bool deserialization_complete() const { return deserialization_complete_; }
bool HasLowAllocationRate();
@ -1801,16 +1800,7 @@ class Heap {
// Selects the proper allocation space based on the pretenuring decision.
static AllocationSpace SelectSpace(PretenureFlag pretenure) {
switch (pretenure) {
case TENURED_READ_ONLY:
return RO_SPACE;
case TENURED:
return OLD_SPACE;
case NOT_TENURED:
return NEW_SPACE;
default:
UNREACHABLE();
}
return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE;
}
static size_t DefaultGetExternallyAllocatedMemoryInBytesCallback() {
@ -2224,8 +2214,6 @@ class Heap {
MUST_USE_RESULT AllocationResult
AllocatePartialMap(InstanceType instance_type, int instance_size);
void FinalizePartialMap(Map* map);
// Allocate a block of memory in the given space (filled with a filler).
// Used as a fall-back for generated code when the space is full.
MUST_USE_RESULT AllocationResult
@ -2352,8 +2340,8 @@ class Heap {
MUST_USE_RESULT AllocationResult AllocateEmptyBoilerplateDescription();
// Allocate empty fixed typed array of given type.
MUST_USE_RESULT AllocationResult AllocateEmptyFixedTypedArray(
ExternalArrayType array_type, PretenureFlag pretenure = TENURED);
MUST_USE_RESULT AllocationResult
AllocateEmptyFixedTypedArray(ExternalArrayType array_type);
// Allocate a tenured simple cell.
MUST_USE_RESULT AllocationResult AllocateCell(Object* value);
@ -2365,8 +2353,7 @@ class Heap {
// Allocate a tenured JS global property cell initialized with the hole.
MUST_USE_RESULT AllocationResult AllocatePropertyCell(Name* name);
MUST_USE_RESULT AllocationResult
AllocateWeakCell(HeapObject* value, PretenureFlag pretenure = TENURED);
MUST_USE_RESULT AllocationResult AllocateWeakCell(HeapObject* value);
MUST_USE_RESULT AllocationResult AllocateTransitionArray(int capacity);

View File

@ -78,26 +78,21 @@ const Heap::StructTable Heap::struct_table[] = {
#undef DATA_HANDLER_ELEMENT
};
void Heap::FinalizePartialMap(Map* map) {
map->set_dependent_code(DependentCode::cast(empty_fixed_array()));
namespace {
void FinalizePartialMap(Heap* heap, Map* map) {
map->set_dependent_code(DependentCode::cast(heap->empty_fixed_array()));
map->set_raw_transitions(MaybeObject::FromSmi(Smi::kZero));
map->set_instance_descriptors(empty_descriptor_array());
map->set_instance_descriptors(heap->empty_descriptor_array());
if (FLAG_unbox_double_fields) {
map->set_layout_descriptor(LayoutDescriptor::FastPointerLayout());
}
map->set_prototype(null_value());
map->set_constructor_or_backpointer(null_value());
// Eagerly initialize the WeakCell cache for the map as it will not be
// writable in RO_SPACE.
Object* result = nullptr;
AllocationResult weak_cell_allocation =
AllocateWeakCell(map, TENURED_READ_ONLY);
CHECK(weak_cell_allocation.To(&result));
WeakCell* weak_cell_cache = reinterpret_cast<WeakCell*>(result);
map->set_weak_cell_cache(weak_cell_cache);
map->set_prototype(heap->null_value());
map->set_constructor_or_backpointer(heap->null_value());
}
} // namespace
bool Heap::CreateInitialMaps() {
HeapObject* obj = nullptr;
{
@ -111,11 +106,11 @@ bool Heap::CreateInitialMaps() {
{ // Partial map allocation
#define ALLOCATE_PARTIAL_MAP(instance_type, size, field_name) \
{ \
Map* map; \
if (!AllocatePartialMap((instance_type), (size)).To(&map)) return false; \
set_##field_name##_map(map); \
}
{ \
Map* map; \
if (!AllocatePartialMap((instance_type), (size)).To(&map)) return false; \
set_##field_name##_map(map); \
}
ALLOCATE_PARTIAL_MAP(FIXED_ARRAY_TYPE, kVariableSizeSentinel, fixed_array);
ALLOCATE_PARTIAL_MAP(WEAK_FIXED_ARRAY_TYPE, kVariableSizeSentinel,
@ -130,7 +125,6 @@ bool Heap::CreateInitialMaps() {
ALLOCATE_PARTIAL_MAP(ODDBALL_TYPE, Oddball::kSize, undefined);
ALLOCATE_PARTIAL_MAP(ODDBALL_TYPE, Oddball::kSize, null);
ALLOCATE_PARTIAL_MAP(ODDBALL_TYPE, Oddball::kSize, the_hole);
ALLOCATE_PARTIAL_MAP(WEAK_CELL_TYPE, WeakCell::kSize, weak_cell);
#undef ALLOCATE_PARTIAL_MAP
}
@ -149,21 +143,21 @@ bool Heap::CreateInitialMaps() {
set_empty_weak_fixed_array(WeakFixedArray::cast(obj));
{
AllocationResult allocation = Allocate(null_map(), RO_SPACE);
AllocationResult allocation = Allocate(null_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;
}
set_null_value(Oddball::cast(obj));
Oddball::cast(obj)->set_kind(Oddball::kNull);
{
AllocationResult allocation = Allocate(undefined_map(), RO_SPACE);
AllocationResult allocation = Allocate(undefined_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;
}
set_undefined_value(Oddball::cast(obj));
Oddball::cast(obj)->set_kind(Oddball::kUndefined);
DCHECK(!InNewSpace(undefined_value()));
{
AllocationResult allocation = Allocate(the_hole_map(), RO_SPACE);
AllocationResult allocation = Allocate(the_hole_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;
}
set_the_hole_value(Oddball::cast(obj));
@ -182,7 +176,7 @@ bool Heap::CreateInitialMaps() {
// Allocate the empty enum cache.
{
AllocationResult allocation = Allocate(tuple2_map(), RO_SPACE);
AllocationResult allocation = Allocate(tuple2_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;
}
set_empty_enum_cache(EnumCache::cast(obj));
@ -192,8 +186,8 @@ bool Heap::CreateInitialMaps() {
// Allocate the empty descriptor array.
{
STATIC_ASSERT(DescriptorArray::kFirstIndex != 0);
AllocationResult allocation = AllocateUninitializedFixedArray(
DescriptorArray::kFirstIndex, TENURED_READ_ONLY);
AllocationResult allocation =
AllocateUninitializedFixedArray(DescriptorArray::kFirstIndex, TENURED);
if (!allocation.To(&obj)) return false;
}
obj->set_map_no_write_barrier(descriptor_array_map());
@ -204,20 +198,19 @@ bool Heap::CreateInitialMaps() {
empty_enum_cache());
// Fix the instance_descriptors for the existing maps.
FinalizePartialMap(meta_map());
FinalizePartialMap(weak_cell_map());
FinalizePartialMap(fixed_array_map());
FinalizePartialMap(weak_fixed_array_map());
FinalizePartialMap(fixed_cow_array_map());
FinalizePartialMap(descriptor_array_map());
FinalizePartialMap(undefined_map());
FinalizePartialMap(this, meta_map());
FinalizePartialMap(this, fixed_array_map());
FinalizePartialMap(this, weak_fixed_array_map());
FinalizePartialMap(this, fixed_cow_array_map());
FinalizePartialMap(this, descriptor_array_map());
FinalizePartialMap(this, undefined_map());
undefined_map()->set_is_undetectable(true);
FinalizePartialMap(null_map());
FinalizePartialMap(this, null_map());
null_map()->set_is_undetectable(true);
FinalizePartialMap(the_hole_map());
FinalizePartialMap(this, the_hole_map());
for (unsigned i = 0; i < arraysize(struct_table); ++i) {
const StructTable& entry = struct_table[i];
FinalizePartialMap(Map::cast(roots_[entry.index]));
FinalizePartialMap(this, Map::cast(roots_[entry.index]));
}
{ // Map allocation
@ -314,6 +307,7 @@ bool Heap::CreateInitialMaps() {
}
ALLOCATE_MAP(PROPERTY_CELL_TYPE, PropertyCell::kSize, global_property_cell)
ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, weak_cell)
ALLOCATE_MAP(FILLER_TYPE, kPointerSize, one_pointer_filler)
ALLOCATE_MAP(FILLER_TYPE, 2 * kPointerSize, two_pointer_filler)
@ -385,44 +379,43 @@ bool Heap::CreateInitialMaps() {
set_empty_boilerplate_description(BoilerplateDescription::cast(obj));
{
AllocationResult allocation = Allocate(boolean_map(), RO_SPACE);
AllocationResult allocation = Allocate(boolean_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;
}
set_true_value(Oddball::cast(obj));
Oddball::cast(obj)->set_kind(Oddball::kTrue);
{
AllocationResult allocation = Allocate(boolean_map(), RO_SPACE);
AllocationResult allocation = Allocate(boolean_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;
}
set_false_value(Oddball::cast(obj));
Oddball::cast(obj)->set_kind(Oddball::kFalse);
// Empty arrays
{
ByteArray* byte_array;
if (!AllocateByteArray(0, TENURED_READ_ONLY).To(&byte_array)) return false;
set_empty_byte_array(byte_array);
}
{ // Empty arrays
{
ByteArray * byte_array;
if (!AllocateByteArray(0, TENURED).To(&byte_array)) return false;
set_empty_byte_array(byte_array);
}
{
PropertyArray* property_array;
if (!AllocatePropertyArray(0, TENURED).To(&property_array)) return false;
set_empty_property_array(property_array);
}
{
PropertyArray* property_array;
if (!AllocatePropertyArray(0, TENURED).To(&property_array)) return false;
set_empty_property_array(property_array);
}
#define ALLOCATE_EMPTY_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
{ \
FixedTypedArrayBase* obj; \
if (!AllocateEmptyFixedTypedArray(kExternal##Type##Array, TENURED) \
.To(&obj)) \
return false; \
set_empty_fixed_##type##_array(obj); \
}
#define ALLOCATE_EMPTY_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
{ \
FixedTypedArrayBase* obj; \
if (!AllocateEmptyFixedTypedArray(kExternal##Type##Array).To(&obj)) \
return false; \
set_empty_fixed_##type##_array(obj); \
}
TYPED_ARRAYS(ALLOCATE_EMPTY_FIXED_TYPED_ARRAY)
TYPED_ARRAYS(ALLOCATE_EMPTY_FIXED_TYPED_ARRAY)
#undef ALLOCATE_EMPTY_FIXED_TYPED_ARRAY
}
DCHECK(!InNewSpace(empty_fixed_array()));
return true;
}
@ -448,26 +441,16 @@ void Heap::CreateInitialObjects() {
DCHECK(std::signbit(minus_zero_value()->Number()));
set_nan_value(*factory->NewHeapNumber(
std::numeric_limits<double>::quiet_NaN(), IMMUTABLE, TENURED_READ_ONLY));
set_hole_nan_value(*factory->NewHeapNumberFromBits(kHoleNanInt64, IMMUTABLE,
TENURED_READ_ONLY));
std::numeric_limits<double>::quiet_NaN(), IMMUTABLE, TENURED));
set_hole_nan_value(
*factory->NewHeapNumberFromBits(kHoleNanInt64, IMMUTABLE, TENURED));
set_infinity_value(*factory->NewHeapNumber(V8_INFINITY, IMMUTABLE, TENURED));
set_minus_infinity_value(
*factory->NewHeapNumber(-V8_INFINITY, IMMUTABLE, TENURED));
// Allocate cache for single character one byte strings.
set_single_character_string_cache(
*factory->NewFixedArray(String::kMaxOneByteCharCode + 1, TENURED));
// Allocate initial string table.
set_string_table(*StringTable::New(isolate(), kInitialStringTableSize));
for (unsigned i = 0; i < arraysize(constant_string_table); i++) {
Handle<String> str =
factory->InternalizeUtf8String(constant_string_table[i].contents);
roots_[constant_string_table[i].index] = *str;
}
// Allocate
// Finish initializing oddballs after creating the string table.
@ -521,6 +504,12 @@ void Heap::CreateInitialObjects() {
handle(Smi::FromInt(-7), isolate()), "undefined",
Oddball::kStaleRegister));
for (unsigned i = 0; i < arraysize(constant_string_table); i++) {
Handle<String> str =
factory->InternalizeUtf8String(constant_string_table[i].contents);
roots_[constant_string_table[i].index] = *str;
}
// Create the code_stubs dictionary. The initial size is set to avoid
// expanding the dictionary during bootstrapping.
set_code_stubs(*SimpleNumberDictionary::New(isolate(), 128));
@ -571,6 +560,10 @@ void Heap::CreateInitialObjects() {
set_number_string_cache(
*factory->NewFixedArray(kInitialNumberStringCacheSize * 2, TENURED));
// Allocate cache for single character one byte strings.
set_single_character_string_cache(
*factory->NewFixedArray(String::kMaxOneByteCharCode + 1, TENURED));
// Allocate cache for string split and regexp-multiple.
set_string_split_cache(*factory->NewFixedArray(
RegExpResultsCache::kRegExpResultsCacheSize, TENURED));

View File

@ -314,7 +314,6 @@ HeapObject* PagedSpace::TryAllocateLinearlyAligned(
AllocationResult PagedSpace::AllocateRawUnaligned(
int size_in_bytes, UpdateSkipList update_skip_list) {
DCHECK_IMPLIES(identity() == RO_SPACE, heap()->CanAllocateInReadOnlySpace());
if (!EnsureLinearAllocationArea(size_in_bytes)) {
return AllocationResult::Retry(identity());
}
@ -330,8 +329,7 @@ AllocationResult PagedSpace::AllocateRawUnaligned(
AllocationResult PagedSpace::AllocateRawAligned(int size_in_bytes,
AllocationAlignment alignment) {
DCHECK(identity() == OLD_SPACE || identity() == RO_SPACE);
DCHECK_IMPLIES(identity() == RO_SPACE, heap()->CanAllocateInReadOnlySpace());
DCHECK(identity() == OLD_SPACE);
int allocation_size = size_in_bytes;
HeapObject* object = TryAllocateLinearlyAligned(&allocation_size, alignment);
if (object == nullptr) {

View File

@ -1917,8 +1917,7 @@ void PagedSpace::Verify(ObjectVisitor* visitor) {
// be in map space.
Map* map = object->map();
CHECK(map->IsMap());
CHECK(heap()->map_space()->Contains(map) ||
heap()->read_only_space()->Contains(map));
CHECK(heap()->map_space()->Contains(map));
// Perform space-specific object verification.
VerifyObject(object);
@ -2369,11 +2368,10 @@ void NewSpace::Verify() {
HeapObject* object = HeapObject::FromAddress(current);
// The first word should be a map, and we expect all map pointers to
// be in map space or read-only space.
// be in map space.
Map* map = object->map();
CHECK(map->IsMap());
CHECK(heap()->map_space()->Contains(map) ||
heap()->read_only_space()->Contains(map));
CHECK(heap()->map_space()->Contains(map));
// The object should not be code or a map.
CHECK(!object->IsMap());
@ -3447,11 +3445,10 @@ void LargeObjectSpace::Verify() {
CHECK(object->address() == page->area_start());
// The first word should be a map, and we expect all map pointers to be
// in map space or read-only space.
// in map space.
Map* map = object->map();
CHECK(map->IsMap());
CHECK(heap()->map_space()->Contains(map) ||
heap()->read_only_space()->Contains(map));
CHECK(heap()->map_space()->Contains(map));
// We have only code, sequential strings, external strings (sequential
// strings that have been morphed into external strings), thin strings

View File

@ -25,19 +25,13 @@ Serializer<AllocatorT>::Serializer(Isolate* isolate)
if (FLAG_serialization_statistics) {
instance_type_count_ = NewArray<int>(kInstanceTypes);
instance_type_size_ = NewArray<size_t>(kInstanceTypes);
read_only_instance_type_count_ = NewArray<int>(kInstanceTypes);
read_only_instance_type_size_ = NewArray<size_t>(kInstanceTypes);
for (int i = 0; i < kInstanceTypes; i++) {
instance_type_count_[i] = 0;
instance_type_size_[i] = 0;
read_only_instance_type_count_[i] = 0;
read_only_instance_type_size_[i] = 0;
}
} else {
instance_type_count_ = nullptr;
instance_type_size_ = nullptr;
read_only_instance_type_count_ = nullptr;
read_only_instance_type_size_ = nullptr;
}
#endif // OBJECT_PRINT
}
@ -49,24 +43,16 @@ Serializer<AllocatorT>::~Serializer() {
if (instance_type_count_ != nullptr) {
DeleteArray(instance_type_count_);
DeleteArray(instance_type_size_);
DeleteArray(read_only_instance_type_count_);
DeleteArray(read_only_instance_type_size_);
}
#endif // OBJECT_PRINT
}
#ifdef OBJECT_PRINT
template <class AllocatorT>
void Serializer<AllocatorT>::CountInstanceType(Map* map, int size,
AllocationSpace space) {
void Serializer<AllocatorT>::CountInstanceType(Map* map, int size) {
int instance_type = map->instance_type();
if (space != RO_SPACE) {
instance_type_count_[instance_type]++;
instance_type_size_[instance_type] += size;
} else {
read_only_instance_type_count_[instance_type]++;
read_only_instance_type_size_[instance_type] += size;
}
instance_type_count_[instance_type]++;
instance_type_size_[instance_type] += size;
}
#endif // OBJECT_PRINT
@ -86,21 +72,6 @@ void Serializer<AllocatorT>::OutputStatistics(const char* name) {
}
INSTANCE_TYPE_LIST(PRINT_INSTANCE_TYPE)
#undef PRINT_INSTANCE_TYPE
size_t read_only_total = 0;
#define UPDATE_TOTAL(Name) \
read_only_total += read_only_instance_type_size_[Name];
INSTANCE_TYPE_LIST(UPDATE_TOTAL)
#undef UPDATE_TOTAL
if (read_only_total > 0) {
PrintF("\n Read Only Instance types (count and bytes):\n");
#define PRINT_INSTANCE_TYPE(Name) \
if (read_only_instance_type_count_[Name]) { \
PrintF("%10d %10" PRIuS " %s\n", read_only_instance_type_count_[Name], \
read_only_instance_type_size_[Name], #Name); \
}
INSTANCE_TYPE_LIST(PRINT_INSTANCE_TYPE)
#undef PRINT_INSTANCE_TYPE
}
PrintF("\n");
#endif // OBJECT_PRINT
}
@ -389,7 +360,7 @@ void Serializer<AllocatorT>::ObjectSerializer::SerializePrologue(
#ifdef OBJECT_PRINT
if (FLAG_serialization_statistics) {
serializer_->CountInstanceType(map, size, space);
serializer_->CountInstanceType(map, size);
}
#endif // OBJECT_PRINT

View File

@ -225,7 +225,7 @@ class Serializer : public SerializerDeserializer {
void OutputStatistics(const char* name);
#ifdef OBJECT_PRINT
void CountInstanceType(Map* map, int size, AllocationSpace space);
void CountInstanceType(Map* map, int size);
#endif // OBJECT_PRINT
#ifdef DEBUG
@ -255,8 +255,6 @@ class Serializer : public SerializerDeserializer {
static const int kInstanceTypes = LAST_TYPE + 1;
int* instance_type_count_;
size_t* instance_type_size_;
int* read_only_instance_type_count_;
size_t* read_only_instance_type_size_;
#endif // OBJECT_PRINT
#ifdef DEBUG

View File

@ -157,185 +157,185 @@ INSTANCE_TYPES = {
# List of known V8 maps.
KNOWN_MAPS = {
("RO_SPACE", 0x02201): (132, "MetaMap"),
("RO_SPACE", 0x02289): (131, "NullMap"),
("RO_SPACE", 0x02301): (184, "DescriptorArrayMap"),
("RO_SPACE", 0x02369): (182, "FixedArrayMap"),
("RO_SPACE", 0x023d1): (209, "WeakCellMap"),
("RO_SPACE", 0x024e9): (131, "UndefinedMap"),
("RO_SPACE", 0x02591): (131, "TheHoleMap"),
("RO_SPACE", 0x02701): (182, "FixedCOWArrayMap"),
("RO_SPACE", 0x02839): (210, "WeakFixedArrayMap"),
("RO_SPACE", 0x028b9): (172, "Tuple2Map"),
("RO_SPACE", 0x02931): (170, "ScriptMap"),
("RO_SPACE", 0x02999): (163, "InterceptorInfoMap"),
("RO_SPACE", 0x04841): (154, "AccessorInfoMap"),
("RO_SPACE", 0x04a51): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x04ab9): (155, "AccessorPairMap"),
("RO_SPACE", 0x04b21): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x04b89): (157, "AllocationMementoMap"),
("RO_SPACE", 0x04bf1): (158, "AllocationSiteMap"),
("RO_SPACE", 0x04c59): (159, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x04cc1): (160, "ContextExtensionMap"),
("RO_SPACE", 0x04d29): (161, "DebugInfoMap"),
("RO_SPACE", 0x04d91): (162, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x04df9): (164, "ModuleInfoEntryMap"),
("RO_SPACE", 0x04e61): (165, "ModuleMap"),
("RO_SPACE", 0x04ec9): (166, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x04f31): (167, "PromiseCapabilityMap"),
("RO_SPACE", 0x04f99): (168, "PromiseReactionMap"),
("RO_SPACE", 0x05001): (169, "PrototypeInfoMap"),
("RO_SPACE", 0x05069): (171, "StackFrameInfoMap"),
("RO_SPACE", 0x050d1): (173, "Tuple3Map"),
("RO_SPACE", 0x05139): (174, "WasmCompiledModuleMap"),
("RO_SPACE", 0x051a1): (175, "WasmDebugInfoMap"),
("RO_SPACE", 0x05209): (176, "WasmSharedModuleDataMap"),
("RO_SPACE", 0x05271): (177, "CallableTaskMap"),
("RO_SPACE", 0x052d9): (178, "CallbackTaskMap"),
("RO_SPACE", 0x05341): (179, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x053a9): (180, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x05411): (181, "PromiseResolveThenableJobTaskMap"),
("MAP_SPACE", 0x02201): (138, "FreeSpaceMap"),
("MAP_SPACE", 0x02259): (152, "OnePointerFillerMap"),
("MAP_SPACE", 0x022b1): (152, "TwoPointerFillerMap"),
("MAP_SPACE", 0x02309): (131, "UninitializedMap"),
("MAP_SPACE", 0x02361): (8, "OneByteInternalizedStringMap"),
("MAP_SPACE", 0x023b9): (129, "HeapNumberMap"),
("MAP_SPACE", 0x02411): (131, "BooleanMap"),
("MAP_SPACE", 0x02469): (136, "ByteArrayMap"),
("MAP_SPACE", 0x024c1): (185, "HashTableMap"),
("MAP_SPACE", 0x02519): (128, "SymbolMap"),
("MAP_SPACE", 0x02571): (72, "OneByteStringMap"),
("MAP_SPACE", 0x025c9): (186, "ScopeInfoMap"),
("MAP_SPACE", 0x02621): (205, "SharedFunctionInfoMap"),
("MAP_SPACE", 0x02679): (133, "CodeMap"),
("MAP_SPACE", 0x026d1): (192, "FunctionContextMap"),
("MAP_SPACE", 0x02729): (198, "CellMap"),
("MAP_SPACE", 0x02781): (204, "GlobalPropertyCellMap"),
("MAP_SPACE", 0x027d9): (135, "ForeignMap"),
("MAP_SPACE", 0x02831): (187, "TransitionArrayMap"),
("MAP_SPACE", 0x02889): (201, "FeedbackVectorMap"),
("MAP_SPACE", 0x028e1): (131, "ArgumentsMarkerMap"),
("MAP_SPACE", 0x02939): (131, "ExceptionMap"),
("MAP_SPACE", 0x02991): (131, "TerminationExceptionMap"),
("MAP_SPACE", 0x029e9): (131, "OptimizedOutMap"),
("MAP_SPACE", 0x02a41): (131, "StaleRegisterMap"),
("MAP_SPACE", 0x02a99): (194, "NativeContextMap"),
("MAP_SPACE", 0x02af1): (193, "ModuleContextMap"),
("MAP_SPACE", 0x02b49): (191, "EvalContextMap"),
("MAP_SPACE", 0x02ba1): (195, "ScriptContextMap"),
("MAP_SPACE", 0x02bf9): (188, "BlockContextMap"),
("MAP_SPACE", 0x02c51): (189, "CatchContextMap"),
("MAP_SPACE", 0x02ca9): (196, "WithContextMap"),
("MAP_SPACE", 0x02d01): (190, "DebugEvaluateContextMap"),
("MAP_SPACE", 0x02d59): (182, "ScriptContextTableMap"),
("MAP_SPACE", 0x02db1): (151, "FeedbackMetadataArrayMap"),
("MAP_SPACE", 0x02e09): (182, "ArrayListMap"),
("MAP_SPACE", 0x02e61): (130, "BigIntMap"),
("MAP_SPACE", 0x02eb9): (183, "BoilerplateDescriptionMap"),
("MAP_SPACE", 0x02f11): (137, "BytecodeArrayMap"),
("MAP_SPACE", 0x02f69): (199, "CodeDataContainerMap"),
("MAP_SPACE", 0x02fc1): (1057, "ExternalMap"),
("MAP_SPACE", 0x03019): (150, "FixedDoubleArrayMap"),
("MAP_SPACE", 0x03071): (185, "GlobalDictionaryMap"),
("MAP_SPACE", 0x030c9): (200, "ManyClosuresCellMap"),
("MAP_SPACE", 0x03121): (1072, "JSMessageObjectMap"),
("MAP_SPACE", 0x03179): (182, "ModuleInfoMap"),
("MAP_SPACE", 0x031d1): (134, "MutableHeapNumberMap"),
("MAP_SPACE", 0x03229): (185, "NameDictionaryMap"),
("MAP_SPACE", 0x03281): (200, "NoClosuresCellMap"),
("MAP_SPACE", 0x032d9): (185, "NumberDictionaryMap"),
("MAP_SPACE", 0x03331): (200, "OneClosureCellMap"),
("MAP_SPACE", 0x03389): (185, "OrderedHashMapMap"),
("MAP_SPACE", 0x033e1): (185, "OrderedHashSetMap"),
("MAP_SPACE", 0x03439): (203, "PropertyArrayMap"),
("MAP_SPACE", 0x03491): (197, "SideEffectCallHandlerInfoMap"),
("MAP_SPACE", 0x034e9): (197, "SideEffectFreeCallHandlerInfoMap"),
("MAP_SPACE", 0x03541): (185, "SimpleNumberDictionaryMap"),
("MAP_SPACE", 0x03599): (182, "SloppyArgumentsElementsMap"),
("MAP_SPACE", 0x035f1): (206, "SmallOrderedHashMapMap"),
("MAP_SPACE", 0x03649): (207, "SmallOrderedHashSetMap"),
("MAP_SPACE", 0x036a1): (185, "StringTableMap"),
("MAP_SPACE", 0x036f9): (106, "NativeSourceStringMap"),
("MAP_SPACE", 0x03751): (64, "StringMap"),
("MAP_SPACE", 0x037a9): (73, "ConsOneByteStringMap"),
("MAP_SPACE", 0x03801): (65, "ConsStringMap"),
("MAP_SPACE", 0x03859): (77, "ThinOneByteStringMap"),
("MAP_SPACE", 0x038b1): (69, "ThinStringMap"),
("MAP_SPACE", 0x03909): (67, "SlicedStringMap"),
("MAP_SPACE", 0x03961): (75, "SlicedOneByteStringMap"),
("MAP_SPACE", 0x039b9): (66, "ExternalStringMap"),
("MAP_SPACE", 0x03a11): (82, "ExternalStringWithOneByteDataMap"),
("MAP_SPACE", 0x03a69): (74, "ExternalOneByteStringMap"),
("MAP_SPACE", 0x03ac1): (98, "ShortExternalStringMap"),
("MAP_SPACE", 0x03b19): (114, "ShortExternalStringWithOneByteDataMap"),
("MAP_SPACE", 0x03b71): (0, "InternalizedStringMap"),
("MAP_SPACE", 0x03bc9): (2, "ExternalInternalizedStringMap"),
("MAP_SPACE", 0x03c21): (18, "ExternalInternalizedStringWithOneByteDataMap"),
("MAP_SPACE", 0x03c79): (10, "ExternalOneByteInternalizedStringMap"),
("MAP_SPACE", 0x03cd1): (34, "ShortExternalInternalizedStringMap"),
("MAP_SPACE", 0x03d29): (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
("MAP_SPACE", 0x03d81): (42, "ShortExternalOneByteInternalizedStringMap"),
("MAP_SPACE", 0x03dd9): (106, "ShortExternalOneByteStringMap"),
("MAP_SPACE", 0x03e31): (140, "FixedUint8ArrayMap"),
("MAP_SPACE", 0x03e89): (139, "FixedInt8ArrayMap"),
("MAP_SPACE", 0x03ee1): (142, "FixedUint16ArrayMap"),
("MAP_SPACE", 0x03f39): (141, "FixedInt16ArrayMap"),
("MAP_SPACE", 0x03f91): (144, "FixedUint32ArrayMap"),
("MAP_SPACE", 0x03fe9): (143, "FixedInt32ArrayMap"),
("MAP_SPACE", 0x04041): (145, "FixedFloat32ArrayMap"),
("MAP_SPACE", 0x04099): (146, "FixedFloat64ArrayMap"),
("MAP_SPACE", 0x040f1): (147, "FixedUint8ClampedArrayMap"),
("MAP_SPACE", 0x04149): (149, "FixedBigUint64ArrayMap"),
("MAP_SPACE", 0x041a1): (148, "FixedBigInt64ArrayMap"),
("MAP_SPACE", 0x02259): (132, "MetaMap"),
("MAP_SPACE", 0x022b1): (131, "NullMap"),
("MAP_SPACE", 0x02309): (184, "DescriptorArrayMap"),
("MAP_SPACE", 0x02361): (182, "FixedArrayMap"),
("MAP_SPACE", 0x023b9): (152, "OnePointerFillerMap"),
("MAP_SPACE", 0x02411): (152, "TwoPointerFillerMap"),
("MAP_SPACE", 0x02469): (131, "UninitializedMap"),
("MAP_SPACE", 0x024c1): (8, "OneByteInternalizedStringMap"),
("MAP_SPACE", 0x02519): (131, "UndefinedMap"),
("MAP_SPACE", 0x02571): (129, "HeapNumberMap"),
("MAP_SPACE", 0x025c9): (131, "TheHoleMap"),
("MAP_SPACE", 0x02621): (131, "BooleanMap"),
("MAP_SPACE", 0x02679): (136, "ByteArrayMap"),
("MAP_SPACE", 0x026d1): (182, "FixedCOWArrayMap"),
("MAP_SPACE", 0x02729): (185, "HashTableMap"),
("MAP_SPACE", 0x02781): (128, "SymbolMap"),
("MAP_SPACE", 0x027d9): (72, "OneByteStringMap"),
("MAP_SPACE", 0x02831): (186, "ScopeInfoMap"),
("MAP_SPACE", 0x02889): (205, "SharedFunctionInfoMap"),
("MAP_SPACE", 0x028e1): (133, "CodeMap"),
("MAP_SPACE", 0x02939): (192, "FunctionContextMap"),
("MAP_SPACE", 0x02991): (198, "CellMap"),
("MAP_SPACE", 0x029e9): (209, "WeakCellMap"),
("MAP_SPACE", 0x02a41): (204, "GlobalPropertyCellMap"),
("MAP_SPACE", 0x02a99): (135, "ForeignMap"),
("MAP_SPACE", 0x02af1): (187, "TransitionArrayMap"),
("MAP_SPACE", 0x02b49): (201, "FeedbackVectorMap"),
("MAP_SPACE", 0x02ba1): (131, "ArgumentsMarkerMap"),
("MAP_SPACE", 0x02bf9): (131, "ExceptionMap"),
("MAP_SPACE", 0x02c51): (131, "TerminationExceptionMap"),
("MAP_SPACE", 0x02ca9): (131, "OptimizedOutMap"),
("MAP_SPACE", 0x02d01): (131, "StaleRegisterMap"),
("MAP_SPACE", 0x02d59): (194, "NativeContextMap"),
("MAP_SPACE", 0x02db1): (193, "ModuleContextMap"),
("MAP_SPACE", 0x02e09): (191, "EvalContextMap"),
("MAP_SPACE", 0x02e61): (195, "ScriptContextMap"),
("MAP_SPACE", 0x02eb9): (188, "BlockContextMap"),
("MAP_SPACE", 0x02f11): (189, "CatchContextMap"),
("MAP_SPACE", 0x02f69): (196, "WithContextMap"),
("MAP_SPACE", 0x02fc1): (190, "DebugEvaluateContextMap"),
("MAP_SPACE", 0x03019): (182, "ScriptContextTableMap"),
("MAP_SPACE", 0x03071): (151, "FeedbackMetadataArrayMap"),
("MAP_SPACE", 0x030c9): (182, "ArrayListMap"),
("MAP_SPACE", 0x03121): (130, "BigIntMap"),
("MAP_SPACE", 0x03179): (183, "BoilerplateDescriptionMap"),
("MAP_SPACE", 0x031d1): (137, "BytecodeArrayMap"),
("MAP_SPACE", 0x03229): (199, "CodeDataContainerMap"),
("MAP_SPACE", 0x03281): (1057, "ExternalMap"),
("MAP_SPACE", 0x032d9): (150, "FixedDoubleArrayMap"),
("MAP_SPACE", 0x03331): (185, "GlobalDictionaryMap"),
("MAP_SPACE", 0x03389): (200, "ManyClosuresCellMap"),
("MAP_SPACE", 0x033e1): (1072, "JSMessageObjectMap"),
("MAP_SPACE", 0x03439): (182, "ModuleInfoMap"),
("MAP_SPACE", 0x03491): (134, "MutableHeapNumberMap"),
("MAP_SPACE", 0x034e9): (185, "NameDictionaryMap"),
("MAP_SPACE", 0x03541): (200, "NoClosuresCellMap"),
("MAP_SPACE", 0x03599): (185, "NumberDictionaryMap"),
("MAP_SPACE", 0x035f1): (200, "OneClosureCellMap"),
("MAP_SPACE", 0x03649): (185, "OrderedHashMapMap"),
("MAP_SPACE", 0x036a1): (185, "OrderedHashSetMap"),
("MAP_SPACE", 0x036f9): (203, "PropertyArrayMap"),
("MAP_SPACE", 0x03751): (197, "SideEffectCallHandlerInfoMap"),
("MAP_SPACE", 0x037a9): (197, "SideEffectFreeCallHandlerInfoMap"),
("MAP_SPACE", 0x03801): (185, "SimpleNumberDictionaryMap"),
("MAP_SPACE", 0x03859): (182, "SloppyArgumentsElementsMap"),
("MAP_SPACE", 0x038b1): (206, "SmallOrderedHashMapMap"),
("MAP_SPACE", 0x03909): (207, "SmallOrderedHashSetMap"),
("MAP_SPACE", 0x03961): (185, "StringTableMap"),
("MAP_SPACE", 0x039b9): (210, "WeakFixedArrayMap"),
("MAP_SPACE", 0x03a11): (106, "NativeSourceStringMap"),
("MAP_SPACE", 0x03a69): (64, "StringMap"),
("MAP_SPACE", 0x03ac1): (73, "ConsOneByteStringMap"),
("MAP_SPACE", 0x03b19): (65, "ConsStringMap"),
("MAP_SPACE", 0x03b71): (77, "ThinOneByteStringMap"),
("MAP_SPACE", 0x03bc9): (69, "ThinStringMap"),
("MAP_SPACE", 0x03c21): (67, "SlicedStringMap"),
("MAP_SPACE", 0x03c79): (75, "SlicedOneByteStringMap"),
("MAP_SPACE", 0x03cd1): (66, "ExternalStringMap"),
("MAP_SPACE", 0x03d29): (82, "ExternalStringWithOneByteDataMap"),
("MAP_SPACE", 0x03d81): (74, "ExternalOneByteStringMap"),
("MAP_SPACE", 0x03dd9): (98, "ShortExternalStringMap"),
("MAP_SPACE", 0x03e31): (114, "ShortExternalStringWithOneByteDataMap"),
("MAP_SPACE", 0x03e89): (0, "InternalizedStringMap"),
("MAP_SPACE", 0x03ee1): (2, "ExternalInternalizedStringMap"),
("MAP_SPACE", 0x03f39): (18, "ExternalInternalizedStringWithOneByteDataMap"),
("MAP_SPACE", 0x03f91): (10, "ExternalOneByteInternalizedStringMap"),
("MAP_SPACE", 0x03fe9): (34, "ShortExternalInternalizedStringMap"),
("MAP_SPACE", 0x04041): (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
("MAP_SPACE", 0x04099): (42, "ShortExternalOneByteInternalizedStringMap"),
("MAP_SPACE", 0x040f1): (106, "ShortExternalOneByteStringMap"),
("MAP_SPACE", 0x04149): (140, "FixedUint8ArrayMap"),
("MAP_SPACE", 0x041a1): (139, "FixedInt8ArrayMap"),
("MAP_SPACE", 0x041f9): (142, "FixedUint16ArrayMap"),
("MAP_SPACE", 0x04251): (141, "FixedInt16ArrayMap"),
("MAP_SPACE", 0x042a9): (144, "FixedUint32ArrayMap"),
("MAP_SPACE", 0x04301): (143, "FixedInt32ArrayMap"),
("MAP_SPACE", 0x04359): (145, "FixedFloat32ArrayMap"),
("MAP_SPACE", 0x043b1): (146, "FixedFloat64ArrayMap"),
("MAP_SPACE", 0x04409): (147, "FixedUint8ClampedArrayMap"),
("MAP_SPACE", 0x04461): (149, "FixedBigUint64ArrayMap"),
("MAP_SPACE", 0x044b9): (148, "FixedBigInt64ArrayMap"),
("MAP_SPACE", 0x04511): (172, "Tuple2Map"),
("MAP_SPACE", 0x04569): (170, "ScriptMap"),
("MAP_SPACE", 0x045c1): (163, "InterceptorInfoMap"),
("MAP_SPACE", 0x04619): (154, "AccessorInfoMap"),
("MAP_SPACE", 0x04671): (153, "AccessCheckInfoMap"),
("MAP_SPACE", 0x046c9): (155, "AccessorPairMap"),
("MAP_SPACE", 0x04721): (156, "AliasedArgumentsEntryMap"),
("MAP_SPACE", 0x04779): (157, "AllocationMementoMap"),
("MAP_SPACE", 0x047d1): (158, "AllocationSiteMap"),
("MAP_SPACE", 0x04829): (159, "AsyncGeneratorRequestMap"),
("MAP_SPACE", 0x04881): (160, "ContextExtensionMap"),
("MAP_SPACE", 0x048d9): (161, "DebugInfoMap"),
("MAP_SPACE", 0x04931): (162, "FunctionTemplateInfoMap"),
("MAP_SPACE", 0x04989): (164, "ModuleInfoEntryMap"),
("MAP_SPACE", 0x049e1): (165, "ModuleMap"),
("MAP_SPACE", 0x04a39): (166, "ObjectTemplateInfoMap"),
("MAP_SPACE", 0x04a91): (167, "PromiseCapabilityMap"),
("MAP_SPACE", 0x04ae9): (168, "PromiseReactionMap"),
("MAP_SPACE", 0x04b41): (169, "PrototypeInfoMap"),
("MAP_SPACE", 0x04b99): (171, "StackFrameInfoMap"),
("MAP_SPACE", 0x04bf1): (173, "Tuple3Map"),
("MAP_SPACE", 0x04c49): (174, "WasmCompiledModuleMap"),
("MAP_SPACE", 0x04ca1): (175, "WasmDebugInfoMap"),
("MAP_SPACE", 0x04cf9): (176, "WasmSharedModuleDataMap"),
("MAP_SPACE", 0x04d51): (177, "CallableTaskMap"),
("MAP_SPACE", 0x04da9): (178, "CallbackTaskMap"),
("MAP_SPACE", 0x04e01): (179, "PromiseFulfillReactionJobTaskMap"),
("MAP_SPACE", 0x04e59): (180, "PromiseRejectReactionJobTaskMap"),
("MAP_SPACE", 0x04eb1): (181, "PromiseResolveThenableJobTaskMap"),
}
# List of known V8 objects.
KNOWN_OBJECTS = {
("RO_SPACE", 0x02259): "NullValue",
("RO_SPACE", 0x022e1): "EmptyDescriptorArray",
("RO_SPACE", 0x02359): "EmptyFixedArray",
("RO_SPACE", 0x024b9): "UndefinedValue",
("RO_SPACE", 0x02551): "NanValue",
("RO_SPACE", 0x02561): "TheHoleValue",
("RO_SPACE", 0x02619): "HoleNanValue",
("RO_SPACE", 0x02629): "TrueValue",
("RO_SPACE", 0x02699): "FalseValue",
("RO_SPACE", 0x026e9): "empty_string",
("RO_SPACE", 0x02921): "EmptyByteArray",
("OLD_SPACE", 0x02201): "UninitializedValue",
("OLD_SPACE", 0x02231): "EmptyScopeInfo",
("OLD_SPACE", 0x02241): "ArgumentsMarker",
("OLD_SPACE", 0x02271): "Exception",
("OLD_SPACE", 0x022a1): "TerminationException",
("OLD_SPACE", 0x022d1): "OptimizedOut",
("OLD_SPACE", 0x02301): "StaleRegister",
("OLD_SPACE", 0x02361): "EmptyFixedUint8Array",
("OLD_SPACE", 0x02381): "EmptyFixedInt8Array",
("OLD_SPACE", 0x023a1): "EmptyFixedUint16Array",
("OLD_SPACE", 0x023c1): "EmptyFixedInt16Array",
("OLD_SPACE", 0x023e1): "EmptyFixedUint32Array",
("OLD_SPACE", 0x02401): "EmptyFixedInt32Array",
("OLD_SPACE", 0x02421): "EmptyFixedFloat32Array",
("OLD_SPACE", 0x02441): "EmptyFixedFloat64Array",
("OLD_SPACE", 0x02461): "EmptyFixedUint8ClampedArray",
("OLD_SPACE", 0x024c1): "EmptyScript",
("OLD_SPACE", 0x02559): "ManyClosuresCell",
("OLD_SPACE", 0x02569): "EmptySloppyArgumentsElements",
("OLD_SPACE", 0x02589): "EmptySlowElementDictionary",
("OLD_SPACE", 0x025d1): "EmptyOrderedHashMap",
("OLD_SPACE", 0x025f9): "EmptyOrderedHashSet",
("OLD_SPACE", 0x02631): "EmptyPropertyCell",
("OLD_SPACE", 0x02659): "EmptyWeakCell",
("OLD_SPACE", 0x026c9): "NoElementsProtector",
("OLD_SPACE", 0x026f1): "IsConcatSpreadableProtector",
("OLD_SPACE", 0x02701): "SpeciesProtector",
("OLD_SPACE", 0x02729): "StringLengthProtector",
("OLD_SPACE", 0x02739): "ArrayIteratorProtector",
("OLD_SPACE", 0x02761): "ArrayBufferNeuteringProtector",
("OLD_SPACE", 0x027e9): "InfinityValue",
("OLD_SPACE", 0x027f9): "MinusZeroValue",
("OLD_SPACE", 0x02809): "MinusInfinityValue",
("OLD_SPACE", 0x02201): "NullValue",
("OLD_SPACE", 0x02231): "EmptyDescriptorArray",
("OLD_SPACE", 0x02251): "EmptyFixedArray",
("OLD_SPACE", 0x02261): "UninitializedValue",
("OLD_SPACE", 0x022e1): "UndefinedValue",
("OLD_SPACE", 0x02311): "NanValue",
("OLD_SPACE", 0x02321): "TheHoleValue",
("OLD_SPACE", 0x02371): "HoleNanValue",
("OLD_SPACE", 0x02381): "TrueValue",
("OLD_SPACE", 0x023f1): "FalseValue",
("OLD_SPACE", 0x02441): "empty_string",
("OLD_SPACE", 0x02459): "EmptyScopeInfo",
("OLD_SPACE", 0x02469): "ArgumentsMarker",
("OLD_SPACE", 0x024c1): "Exception",
("OLD_SPACE", 0x02519): "TerminationException",
("OLD_SPACE", 0x02579): "OptimizedOut",
("OLD_SPACE", 0x025d1): "StaleRegister",
("OLD_SPACE", 0x02661): "EmptyByteArray",
("OLD_SPACE", 0x02681): "EmptyFixedUint8Array",
("OLD_SPACE", 0x026a1): "EmptyFixedInt8Array",
("OLD_SPACE", 0x026c1): "EmptyFixedUint16Array",
("OLD_SPACE", 0x026e1): "EmptyFixedInt16Array",
("OLD_SPACE", 0x02701): "EmptyFixedUint32Array",
("OLD_SPACE", 0x02721): "EmptyFixedInt32Array",
("OLD_SPACE", 0x02741): "EmptyFixedFloat32Array",
("OLD_SPACE", 0x02761): "EmptyFixedFloat64Array",
("OLD_SPACE", 0x02781): "EmptyFixedUint8ClampedArray",
("OLD_SPACE", 0x027e1): "EmptyScript",
("OLD_SPACE", 0x02879): "ManyClosuresCell",
("OLD_SPACE", 0x02889): "EmptySloppyArgumentsElements",
("OLD_SPACE", 0x028a9): "EmptySlowElementDictionary",
("OLD_SPACE", 0x028f1): "EmptyOrderedHashMap",
("OLD_SPACE", 0x02919): "EmptyOrderedHashSet",
("OLD_SPACE", 0x02951): "EmptyPropertyCell",
("OLD_SPACE", 0x02979): "EmptyWeakCell",
("OLD_SPACE", 0x029e9): "NoElementsProtector",
("OLD_SPACE", 0x02a11): "IsConcatSpreadableProtector",
("OLD_SPACE", 0x02a21): "SpeciesProtector",
("OLD_SPACE", 0x02a49): "StringLengthProtector",
("OLD_SPACE", 0x02a59): "ArrayIteratorProtector",
("OLD_SPACE", 0x02a81): "ArrayBufferNeuteringProtector",
("OLD_SPACE", 0x02b09): "InfinityValue",
("OLD_SPACE", 0x02b19): "MinusZeroValue",
("OLD_SPACE", 0x02b29): "MinusInfinityValue",
}
# List of known V8 Frame Markers.