Commit f0446262 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

Make mkgrokdump depend on the page size

Bug: chromium:852420

Change-Id: I9fd2353a3120c6d1566c1f74a581d005fd34ddae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528438Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60308}
parent d5be67a5
......@@ -52,7 +52,7 @@ static void DumpMaps(i::PagedSpace* space) {
if (!o->IsMap()) continue;
i::Map m = i::Map::cast(o);
const char* n = nullptr;
intptr_t p = static_cast<intptr_t>(m.ptr()) & 0x7FFFF;
intptr_t p = static_cast<intptr_t>(m.ptr()) & (i::Page::kPageSize - 1);
int t = m->instance_type();
READ_ONLY_ROOT_LIST(RO_ROOT_LIST_CASE)
MUTABLE_ROOT_LIST(MUTABLE_ROOT_LIST_CASE)
......@@ -118,7 +118,7 @@ static int DumpHeapConstants(const char* argv0) {
if (o->IsMap()) continue;
const char* n = nullptr;
i::RootIndex i = i::RootIndex::kFirstSmiRoot;
intptr_t p = o.ptr() & 0x7FFFF;
intptr_t p = o.ptr() & (i::Page::kPageSize - 1);
STRONG_READ_ONLY_ROOT_LIST(RO_ROOT_LIST_CASE)
MUTABLE_ROOT_LIST(ROOT_LIST_CASE)
if (n == nullptr) continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment