Update postmortem tools to use unsigned compressed pointers
The tests were already passing because they happened to use objects allocated in the lower half of the heap reservation, but this small change should make behavior more consistent. Change-Id: Ib6be3123d347234f4771c213f2209bfe6e19c569 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1860332 Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/master@{#64294}
This commit is contained in:
parent
609f566b34
commit
386ed8a9a0
@ -12,9 +12,7 @@ namespace v8_debug_helper_internal {
|
||||
|
||||
bool IsPointerCompressed(uintptr_t address) {
|
||||
#if COMPRESS_POINTERS_BOOL
|
||||
STATIC_ASSERT(i::kPtrComprHeapReservationSize == uintptr_t{1} << 32);
|
||||
intptr_t signed_address = static_cast<intptr_t>(address);
|
||||
return signed_address >= INT32_MIN && signed_address <= INT32_MAX;
|
||||
return address < i::kPtrComprHeapReservationSize;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
@ -171,7 +171,7 @@ using ObjectPropertiesResultPtr =
|
||||
// Get information about the given object pointer, which could be:
|
||||
// - A tagged pointer, strong or weak
|
||||
// - A cleared weak pointer
|
||||
// - A compressed tagged pointer, sign-extended to 64 bits
|
||||
// - A compressed tagged pointer, zero-extended to 64 bits
|
||||
// - A tagged small integer
|
||||
// The type hint is only used if the object's Map is missing or corrupt. It
|
||||
// should be the fully-qualified name of a class that inherits from
|
||||
|
@ -62,9 +62,6 @@ if (hasattr(v8heapconst, 'HEAP_FIRST_PAGES')): # Only exists in ptr-compr build
|
||||
out = out + ' }\n'
|
||||
expected_spaces = set(['map_space', 'read_only_space', 'old_space'])
|
||||
for offset, space_name in v8heapconst.HEAP_FIRST_PAGES.items():
|
||||
# Turn 32-bit unsigned value into signed.
|
||||
if offset >= 0x80000000:
|
||||
offset -= 0x100000000
|
||||
if (space_name in expected_spaces):
|
||||
out = out + ' if (heap_addresses->' + space_name + '_first_page == 0) {\n'
|
||||
out = out + ' heap_addresses->' + space_name + \
|
||||
|
Loading…
Reference in New Issue
Block a user