RFR: 8347609: Replace SIZE_FORMAT in os/os_cpu/cpu directories
Matias Saavedra Silva
matsaave at openjdk.org
Wed Jan 15 21:14:37 UTC 2025
On Tue, 14 Jan 2025 14:56:19 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Please review this change to replace SIZE_FORMAT with %zu in the os, os_cpu and cpu directories. There weren't very many. Most was done with a script with very little hand-editing. Added 2 whitespaces in arm.ad.
> Tested just now with tier1-4 on x86 and aarch64, GHA for the rest.
Changes look good, I have a few questions and considerations:
src/hotspot/os/aix/os_aix.cpp line 636:
> 634: address high_address = thread->stack_base();
> 635: lt.print("Thread is alive (tid: %zu, kernel thread id: %zu"
> 636: ", stack [" PTR_FORMAT " - " PTR_FORMAT " (%zuk using %luk pages)).",
Is `%lu` compatible with multiple platforms or should it also be changed to `%zu`?
src/hotspot/os/aix/os_aix.cpp line 1760:
> 1758: static void warn_fail_commit_memory(char* addr, size_t size, bool exec,
> 1759: int err) {
> 1760: warning("INFO: os::commit_memory(" PTR_FORMAT ", %zu"
I think you can merge `"%zu"` with `", %d) failed; error='%s' (errno=%d)"` in the same quotes
src/hotspot/os/linux/os_linux.cpp line 2886:
> 2884: static void warn_fail_commit_memory(char* addr, size_t size, bool exec,
> 2885: int err) {
> 2886: warning("INFO: os::commit_memory(" PTR_FORMAT ", %zu"
Same here
src/hotspot/os/linux/os_linux.cpp line 2894:
> 2892: size_t alignment_hint, bool exec,
> 2893: int err) {
> 2894: warning("INFO: os::commit_memory(" PTR_FORMAT ", %zu"
And here
-------------
PR Review: https://git.openjdk.org/jdk/pull/23106#pullrequestreview-2553946520
PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917330038
PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917331735
PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917337268
PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917337380
More information about the hotspot-dev
mailing list