Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hotspot/cpu/arm/methodHandles_arm.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -497,7 +497,7 @@ void trace_method_handle_stub(const char* adaptername,
if (!has_mh) {
mh_reg_name = "R5";
}
log_info(methodhandles)("MH %s %s=" PTR_FORMAT " sp=(" PTR_FORMAT "+" INTX_FORMAT ") stack_size=" INTX_FORMAT " bp=" PTR_FORMAT,
log_info(methodhandles)("MH %s %s=" PTR_FORMAT " sp=(" PTR_FORMAT "+%zd) stack_size=%zd bp=" PTR_FORMAT,
adaptername, mh_reg_name, mh_reg,
(intptr_t)entry_sp, (intptr_t)saved_sp - (intptr_t)entry_sp, (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp);

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/ppc/vm_version_ppc.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -90,7 +90,7 @@ void VM_Version::initialize() {
default: break;
}
guarantee(PowerArchitecturePPC64_ok, "PowerArchitecturePPC64 cannot be set to "
UINTX_FORMAT " on this machine", PowerArchitecturePPC64);
"%zu on this machine", PowerArchitecturePPC64);

// Power 8: Configure Data Stream Control Register.
if (PowerArchitecturePPC64 >= 8 && has_mfdscr()) {
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/cpu/s390/assembler_s390.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -140,7 +140,7 @@ class RelAddr {
return 0; // Yet unknown branch destination.
} else {
guarantee(is_in_range_of_RelAddr(target, pc, shortForm),
"target not within reach at " INTPTR_FORMAT ", distance = " INTX_FORMAT, p2i(pc), (target - pc) );
"target not within reach at " INTPTR_FORMAT ", distance = %zd", p2i(pc), (target - pc) );
return (int)((target - pc)>>1);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/cpu/x86/vm_version_x86.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1722,9 +1722,9 @@ void VM_Version::get_processor_features() {
if (ArrayOperationPartialInlineSize > MaxVectorSize) {
ArrayOperationPartialInlineSize = MaxVectorSize >= 16 ? MaxVectorSize : 0;
if (ArrayOperationPartialInlineSize) {
warning("Setting ArrayOperationPartialInlineSize as MaxVectorSize" INTX_FORMAT ")", MaxVectorSize);
warning("Setting ArrayOperationPartialInlineSize as MaxVectorSize=%zd", MaxVectorSize);
} else {
warning("Setting ArrayOperationPartialInlineSize as " INTX_FORMAT, ArrayOperationPartialInlineSize);
warning("Setting ArrayOperationPartialInlineSize as %zd", ArrayOperationPartialInlineSize);
}
}
}
Expand Down
30 changes: 15 additions & 15 deletions src/hotspot/os/aix/os_aix.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -631,7 +631,7 @@ static void *thread_native_entry(Thread *thread) {
if (lt.is_enabled()) {
address low_address = thread->stack_end();
address high_address = thread->stack_base();
lt.print("Thread is alive (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT
lt.print("Thread is alive (tid: %zu, kernel thread id: %zu"
", stack [" PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "k using %luk pages)).",
os::current_thread_id(), (uintx) kernel_thread_id, p2i(low_address), p2i(high_address),
(high_address - low_address) / K, os::Aix::query_pagesize(low_address) / K);
Expand Down Expand Up @@ -681,7 +681,7 @@ static void *thread_native_entry(Thread *thread) {
// Prevent dereferencing it from here on out.
thread = nullptr;

log_info(os, thread)("Thread finished (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT ").",
log_info(os, thread)("Thread finished (tid: %zu, kernel thread id: %zu).",
os::current_thread_id(), (uintx) kernel_thread_id);

return 0;
Expand Down Expand Up @@ -761,7 +761,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,

if (ret == 0) {
char buf[64];
log_info(os, thread)("Thread \"%s\" started (pthread id: " UINTX_FORMAT ", attributes: %s). ",
log_info(os, thread)("Thread \"%s\" started (pthread id: %zu, attributes: %s). ",
thread->name(), (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
} else {
char buf[64];
Expand Down Expand Up @@ -839,7 +839,7 @@ bool os::create_attached_thread(JavaThread* thread) {
// and save the caller's signal mask
PosixSignals::hotspot_sigmask(thread);

log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", kernel thread id: " UINTX_FORMAT
log_info(os, thread)("Thread attached (tid: %zu, kernel thread id: %zu"
", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).",
os::current_thread_id(), (uintx) kernel_thread_id,
p2i(thread->stack_base()), p2i(thread->stack_end()), thread->stack_size() / K);
Expand Down Expand Up @@ -1379,7 +1379,7 @@ struct vmembk_t {
}

void print_on(outputStream* os) const {
os->print("[" PTR_FORMAT " - " PTR_FORMAT "] (" UINTX_FORMAT
os->print("[" PTR_FORMAT " - " PTR_FORMAT "] (%zu"
" bytes, %ld %s pages), %s",
p2i(addr), p2i(addr) + size - 1, size, size / pagesize, describe_pagesize(pagesize),
(type == VMEM_SHMATED ? "shmat" : "mmap")
Expand Down Expand Up @@ -1456,7 +1456,7 @@ static void vmembk_print_on(outputStream* os) {
// If <requested_addr> is null, function will attach the memory anywhere.
static char* reserve_shmated_memory (size_t bytes, char* requested_addr) {

trcVerbose("reserve_shmated_memory " UINTX_FORMAT " bytes, wishaddress "
trcVerbose("reserve_shmated_memory %zu bytes, wishaddress "
PTR_FORMAT "...", bytes, p2i(requested_addr));

// We must prevent anyone from attaching too close to the
Expand All @@ -1477,7 +1477,7 @@ static char* reserve_shmated_memory (size_t bytes, char* requested_addr) {
int shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | S_IRUSR | S_IWUSR);
if (shmid == -1) {
ErrnoPreserver ep;
log_trace(os, map)("shmget(.., " UINTX_FORMAT ", ..) failed (errno=%s).",
log_trace(os, map)("shmget(.., %zu, ..) failed (errno=%s).",
size, os::strerror(ep.saved_errno()));
return nullptr;
}
Expand All @@ -1493,7 +1493,7 @@ static char* reserve_shmated_memory (size_t bytes, char* requested_addr) {
shmbuf.shm_pagesize = 64*K;
if (shmctl(shmid, SHM_PAGESIZE, &shmbuf) != 0) {
assert(false,
"Failed to set page size (need " UINTX_FORMAT
"Failed to set page size (need %zu"
" 64K pages) - shmctl failed. (errno=%s).",
size / (64 * K), os::strerror(os::get_last_error()));
}
Expand Down Expand Up @@ -1536,7 +1536,7 @@ static char* reserve_shmated_memory (size_t bytes, char* requested_addr) {

if (addr) {
log_trace(os, map)("shm-allocated succeeded: " RANGEFMT
" (" UINTX_FORMAT " %s pages)",
" (%zu %s pages)",
RANGEFMTARGS(addr, size),
size / real_pagesize,
describe_pagesize(real_pagesize));
Expand All @@ -1545,7 +1545,7 @@ static char* reserve_shmated_memory (size_t bytes, char* requested_addr) {
log_trace(os, map)("shm-allocate failed: " RANGEFMT,
RANGEFMTARGS(requested_addr, size));
} else {
log_trace(os, map)("failed to shm-allocate " UINTX_FORMAT
log_trace(os, map)("failed to shm-allocate %zu"
" bytes at any address.",
size);
}
Expand Down Expand Up @@ -1587,7 +1587,7 @@ static bool uncommit_shmated_memory(char* addr, size_t size) {

if (rc != 0) {
ErrnoPreserver ep;
log_warning(os)("disclaim64(" PTR_FORMAT ", " UINTX_FORMAT ") failed, %s\n", p2i(addr), size, os::strerror(ep.saved_errno()));
log_warning(os)("disclaim64(" PTR_FORMAT ", %zu) failed, %s\n", p2i(addr), size, os::strerror(ep.saved_errno()));
return false;
}
return true;
Expand All @@ -1599,7 +1599,7 @@ static bool uncommit_shmated_memory(char* addr, size_t size) {
// If <requested_addr> is given, an attempt is made to attach at the given address.
// Failing that, memory is allocated at any address.
static char* reserve_mmaped_memory(size_t bytes, char* requested_addr) {
trcVerbose("reserve_mmaped_memory " UINTX_FORMAT " bytes, wishaddress " PTR_FORMAT "...",
trcVerbose("reserve_mmaped_memory %zu bytes, wishaddress " PTR_FORMAT "...",
bytes, p2i(requested_addr));

if (requested_addr && !is_aligned_to(requested_addr, os::vm_page_size()) != 0) {
Expand Down Expand Up @@ -1689,7 +1689,7 @@ static char* reserve_mmaped_memory(size_t bytes, char* requested_addr) {
}
addr = addr_aligned;

trcVerbose("mmap-allocated " PTR_FORMAT " .. " PTR_FORMAT " (" UINTX_FORMAT " bytes)",
trcVerbose("mmap-allocated " PTR_FORMAT " .. " PTR_FORMAT " (%zu bytes)",
p2i(addr), p2i(addr + bytes), bytes);

// bookkeeping
Expand Down Expand Up @@ -2783,7 +2783,7 @@ bool os::start_debugging(char *buf, int buflen) {
jio_snprintf(p, buflen -len,
"\n\n"
"Do you want to debug the problem?\n\n"
"To debug, run 'dbx -a %d'; then switch to thread tid " INTX_FORMAT ", k-tid " INTX_FORMAT "\n"
"To debug, run 'dbx -a %d'; then switch to thread tid %zd, k-tid %zd\n"
"Enter 'yes' to launch dbx automatically (PATH must include dbx)\n"
"Otherwise, press RETURN to abort...",
os::current_process_id(),
Expand Down
12 changes: 6 additions & 6 deletions src/hotspot/os/bsd/os_bsd.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -605,7 +605,7 @@ static void *thread_native_entry(Thread *thread) {
}
}

log_info(os, thread)("Thread is alive (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").",
log_info(os, thread)("Thread is alive (tid: %zu, pthread id: %zu).",
os::current_thread_id(), (uintx) pthread_self());

// call one more level start routine
Expand All @@ -615,7 +615,7 @@ static void *thread_native_entry(Thread *thread) {
// Prevent dereferencing it from here on out.
thread = nullptr;

log_info(os, thread)("Thread finished (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").",
log_info(os, thread)("Thread finished (tid: %zu, pthread id: %zu).",
os::current_thread_id(), (uintx) pthread_self());

return 0;
Expand Down Expand Up @@ -660,7 +660,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,

char buf[64];
if (ret == 0) {
log_info(os, thread)("Thread \"%s\" started (pthread id: " UINTX_FORMAT ", attributes: %s). ",
log_info(os, thread)("Thread \"%s\" started (pthread id: %zu, attributes: %s). ",
thread->name(), (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
} else {
log_warning(os, thread)("Failed to start thread \"%s\" - pthread_create failed (%s) for attributes: %s.",
Expand Down Expand Up @@ -744,7 +744,7 @@ bool os::create_attached_thread(JavaThread* thread) {
// and save the caller's signal mask
PosixSignals::hotspot_sigmask(thread);

log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT
log_info(os, thread)("Thread attached (tid: %zu, pthread id: %zu"
", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).",
os::current_thread_id(), (uintx) pthread_self(),
p2i(thread->stack_base()), p2i(thread->stack_end()), thread->stack_size() / K);
Expand Down Expand Up @@ -2524,7 +2524,7 @@ bool os::start_debugging(char *buf, int buflen) {
jio_snprintf(p, buflen-len,
"\n\n"
"Do you want to debug the problem?\n\n"
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread %zd (" INTPTR_FORMAT ")\n"
"Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
"Otherwise, press RETURN to abort...",
os::current_process_id(), os::current_process_id(),
Expand Down
40 changes: 17 additions & 23 deletions src/hotspot/os/linux/os_linux.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -847,7 +847,7 @@ static void *thread_native_entry(Thread *thread) {
}
}

log_info(os, thread)("Thread is alive (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").",
log_info(os, thread)("Thread is alive (tid: %zu, pthread id: %zu).",
os::current_thread_id(), (uintx) pthread_self());

assert(osthread->pthread_id() != 0, "pthread_id was not set as expected");
Expand All @@ -863,7 +863,7 @@ static void *thread_native_entry(Thread *thread) {
// Prevent dereferencing it from here on out.
thread = nullptr;

log_info(os, thread)("Thread finished (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT ").",
log_info(os, thread)("Thread finished (tid: %zu, pthread id: %zu).",
os::current_thread_id(), (uintx) pthread_self());

return nullptr;
Expand Down Expand Up @@ -1054,15 +1054,15 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,

char buf[64];
if (ret == 0) {
log_info(os, thread)("Thread \"%s\" started (pthread id: " UINTX_FORMAT ", attributes: %s). ",
log_info(os, thread)("Thread \"%s\" started (pthread id: %zu, attributes: %s). ",
thread->name(), (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));

// Print current timer slack if override is enabled and timer slack value is available.
// Avoid calling prctl otherwise for extra safety.
if (TimerSlack >= 0) {
int slack = prctl(PR_GET_TIMERSLACK);
if (slack >= 0) {
log_info(os, thread)("Thread \"%s\" (pthread id: " UINTX_FORMAT ") timer slack: %dns",
log_info(os, thread)("Thread \"%s\" (pthread id: %zu) timer slack: %dns",
thread->name(), (uintx) tid, slack);
}
}
Expand Down Expand Up @@ -1170,7 +1170,7 @@ bool os::create_attached_thread(JavaThread* thread) {
// and save the caller's signal mask
PosixSignals::hotspot_sigmask(thread);

log_info(os, thread)("Thread attached (tid: " UINTX_FORMAT ", pthread id: " UINTX_FORMAT
log_info(os, thread)("Thread attached (tid: %zu, pthread id: %zu"
", stack: " PTR_FORMAT " - " PTR_FORMAT " (" SIZE_FORMAT "K) ).",
os::current_thread_id(), (uintx) pthread_self(),
p2i(thread->stack_base()), p2i(thread->stack_end()), thread->stack_size() / K);
Expand Down Expand Up @@ -1366,12 +1366,9 @@ void os::Linux::capture_initial_stack(size_t max_size) {
// Skip blank chars
do { s++; } while (s && isspace((unsigned char) *s));

#define _UFM UINTX_FORMAT
#define _DFM INTX_FORMAT

// 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
// 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
i = sscanf(s, "%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld " _UFM _UFM _DFM _UFM _UFM _UFM _UFM,
// 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2
// 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
i = sscanf(s, "%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %zu %zu %zd %zu %zu %zu %zu",
&state, // 3 %c
&ppid, // 4 %d
&pgrp, // 5 %d
Expand All @@ -1391,18 +1388,15 @@ void os::Linux::capture_initial_stack(size_t max_size) {
&nice, // 19 %ld
&junk, // 20 %ld
&it_real, // 21 %ld
&start, // 22 UINTX_FORMAT
&vsize, // 23 UINTX_FORMAT
&rss, // 24 INTX_FORMAT
&rsslim, // 25 UINTX_FORMAT
&scodes, // 26 UINTX_FORMAT
&ecode, // 27 UINTX_FORMAT
&stack_start); // 28 UINTX_FORMAT
&start, // 22 %zu
&vsize, // 23 %zu
&rss, // 24 %zd
&rsslim, // 25 %zu
&scodes, // 26 %zu
&ecode, // 27 %zu
&stack_start); // 28 %zu
}

#undef _UFM
#undef _DFM

if (i != 28 - 2) {
assert(false, "Bad conversion from /proc/self/stat");
// product mode - assume we are the primordial thread, good luck in the
Expand Down Expand Up @@ -5279,7 +5273,7 @@ bool os::start_debugging(char *buf, int buflen) {
jio_snprintf(p, buflen-len,
"\n\n"
"Do you want to debug the problem?\n\n"
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " UINTX_FORMAT " (" INTPTR_FORMAT ")\n"
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread %zu (" INTPTR_FORMAT ")\n"
"Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
"Otherwise, press RETURN to abort...",
os::current_process_id(), os::current_process_id(),
Expand Down
Loading