RFR: 8347609: Replace SIZE_FORMAT in os/os_cpu/cpu directories [v2]

Coleen Phillimore coleenp at openjdk.org
Wed Jan 15 22:45:09 UTC 2025


On Wed, 15 Jan 2025 21:01:14 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Reformatting suggestions.
>
> 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`?

I think aix only supports a 64 bit platform, so this format specifier is probably right for that.  I'm not going to change pre-existing formatting for aix without being able to test it.

> 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

Fixed - reformatted.

> 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

Also reformatted.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917424913
PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917428613
PR Review Comment: https://git.openjdk.org/jdk/pull/23106#discussion_r1917428572


More information about the hotspot-dev mailing list