RFR: 8346990: Remove INTX_FORMAT and UINTX_FORMAT macros [v2]
Coleen Phillimore
coleenp at openjdk.org
Mon Jan 6 15:09:19 UTC 2025
On Sat, 4 Jan 2025 09:02:34 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix %Ix to %zx.
>
> src/hotspot/os/linux/os_linux.cpp line 1370:
>
>> 1368:
>> 1369: #define _UFM "%zu"
>> 1370: #define _DFM "%zd"
>
> Why not get rid of these?
Fixed.
> src/hotspot/share/gc/shared/ageTable.cpp line 38:
>
>> 36: #include "logging/logStream.hpp"
>> 37:
>> 38: /* Copyright (c) 1992, 2025, Oracle and/or its affiliates, and Stanford University.
>
> Well this is weird. An atypical copyright down inside the file?
This is a relic and not the legal copyright that got updated since nobody noticed. Until you did. Removed.
> src/hotspot/share/oops/instanceKlass.cpp line 3695:
>
>> 3693:
>> 3694: st->print(BULLET"hash_slot: %d", hash_slot()); st->cr();
>> 3695: st->print(BULLET"secondary bitmap: " LP64_ONLY("0x%016zu") NOT_LP64("0x%08zu"), _secondary_supers_bitmap); st->cr();
>
> Should be using "zx" rather than "zu". I think this could be written as
> `"%#0*zx", (2 * BytesPerWord + 2), _secondary_supers_bitmap`
> That's looking a lot like line noise though. I think this and ones like it probably ought not be
> changed at all.
I have to confess that I have no idea what this is trying to show. I'd rather have all the UINTX_FORMAT purged and not leave a remnant for these two special cases. A function whose name describes what this is trying to show would be better.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22916#discussion_r1904264225
PR Review Comment: https://git.openjdk.org/jdk/pull/22916#discussion_r1904264062
PR Review Comment: https://git.openjdk.org/jdk/pull/22916#discussion_r1904263162
More information about the serviceability-dev
mailing list