8321975: Print when add_reserved_region fails even in product mode

Reviewed-by: dholmes, stuefe
This commit is contained in:
Johan Sjölen 2023-12-18 09:45:26 +00:00
parent f696796e88
commit 341b4e09b7

View File

@ -399,12 +399,16 @@ bool VirtualMemoryTracker::add_reserved_region(address base_addr, size_t size,
}
// Print some more details. Don't use UL here to avoid circularities.
#ifdef ASSERT
tty->print_cr("Error: existing region: [" INTPTR_FORMAT "-" INTPTR_FORMAT "), flag %u.\n"
" new region: [" INTPTR_FORMAT "-" INTPTR_FORMAT "), flag %u.",
p2i(reserved_rgn->base()), p2i(reserved_rgn->end()), (unsigned)reserved_rgn->flag(),
p2i(base_addr), p2i(base_addr + size), (unsigned)flag);
#endif
if (MemTracker::tracking_level() == NMT_detail) {
tty->print_cr("Existing region allocated from:");
reserved_rgn->call_stack()->print_on(tty);
tty->print_cr("New region allocated from:");
stack.print_on(tty);
}
ShouldNotReachHere();
return false;
}