[execution] Report first old space page as CrashKey

Maps are now in old space, so start to report the first page in old
space now.

Bug: v8:12578
Change-Id: Icf08c9074558a2d47bb9f1f8df72cec9668d2b4e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3986087
Auto-Submit: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84002}
This commit is contained in:
Dominik Inführ 2022-10-28 15:43:46 +02:00 committed by V8 LUCI CQ
parent 08c5a39495
commit 6eb8316e7a
3 changed files with 9 additions and 2 deletions

View File

@ -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,

View File

@ -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,

View File

@ -145,10 +145,11 @@ TEST_F(IsolateTest, SetAddCrashKeyCallback) {
i::Isolate* i_isolate = reinterpret_cast<internal::Isolate*>(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);