8332671: Logging for pretouching thread stacks shows wrong memory range

Reviewed-by: shade
This commit is contained in:
Thomas Stuefe 2024-05-23 15:54:11 +00:00
parent 90758f6735
commit 303ac9f270

View File

@ -2230,8 +2230,8 @@ void JavaThread::pretouch_stack() {
if (is_in_full_stack(here) && here > end) {
size_t to_alloc = here - end;
char* p2 = (char*) alloca(to_alloc);
log_trace(os, thread)("Pretouching thread stack from " PTR_FORMAT " to " PTR_FORMAT ".",
p2i(p2), p2i(end));
log_trace(os, thread)("Pretouching thread stack for " UINTX_FORMAT ": " RANGEFMT ".",
(uintx) osthread()->thread_id(), RANGEFMTARGS(p2, to_alloc));
os::pretouch_memory(p2, p2 + to_alloc,
NOT_AIX(os::vm_page_size()) AIX_ONLY(4096));
}