diff --git a/include/v8-callbacks.h b/include/v8-callbacks.h index c02059a589..0ffdfb6656 100644 --- a/include/v8-callbacks.h +++ b/include/v8-callbacks.h @@ -237,7 +237,8 @@ using LogEventCallback = void (*)(const char* name, enum class CrashKeyId { kIsolateAddress, kReadonlySpaceFirstPageAddress, - kMapSpaceFirstPageAddress, + kMapSpaceFirstPageAddress V8_ENUM_DEPRECATE_SOON("Map space got removed"), + kOldSpaceFirstPageAddress, kCodeRangeBaseAddress, kCodeSpaceFirstPageAddress, kDumpType, diff --git a/src/execution/isolate.cc b/src/execution/isolate.cc index 641ebdc359..f68b81224c 100644 --- a/src/execution/isolate.cc +++ b/src/execution/isolate.cc @@ -4035,6 +4035,11 @@ void Isolate::AddCrashKeysForIsolateAndHeapPointers() { add_crash_key_callback_(v8::CrashKeyId::kReadonlySpaceFirstPageAddress, ToHexString(ro_space_firstpage_address)); + const uintptr_t old_space_firstpage_address = + heap()->old_space()->FirstPageAddress(); + add_crash_key_callback_(v8::CrashKeyId::kOldSpaceFirstPageAddress, + ToHexString(old_space_firstpage_address)); + if (heap()->code_range_base()) { const uintptr_t code_range_base_address = heap()->code_range_base(); add_crash_key_callback_(v8::CrashKeyId::kCodeRangeBaseAddress, diff --git a/test/unittests/api/isolate-unittest.cc b/test/unittests/api/isolate-unittest.cc index a47c6261f6..a5691b95db 100644 --- a/test/unittests/api/isolate-unittest.cc +++ b/test/unittests/api/isolate-unittest.cc @@ -145,10 +145,11 @@ TEST_F(IsolateTest, SetAddCrashKeyCallback) { i::Isolate* i_isolate = reinterpret_cast(isolate()); i::Heap* heap = i_isolate->heap(); - size_t expected_keys_count = 4; + size_t expected_keys_count = 5; EXPECT_EQ(crash_keys.count(v8::CrashKeyId::kIsolateAddress), 1u); EXPECT_EQ(crash_keys.count(v8::CrashKeyId::kReadonlySpaceFirstPageAddress), 1u); + EXPECT_EQ(crash_keys.count(v8::CrashKeyId::kOldSpaceFirstPageAddress), 1u); EXPECT_EQ(crash_keys.count(v8::CrashKeyId::kSnapshotChecksumCalculated), 1u); EXPECT_EQ(crash_keys.count(v8::CrashKeyId::kSnapshotChecksumExpected), 1u);