RFR: 8346990: Remove INTX_FORMAT and UINTX_FORMAT macros [v2]

Coleen Phillimore coleenp at openjdk.org
Mon Jan 6 15:24:19 UTC 2025


On Mon, 6 Jan 2025 15:03:34 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> 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.

@theRealAph added this with the secondary super cache work, but I think it may have also been meant to be zx because of the leading 0x.  So INTPTR_FORMAT would also work.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22916#discussion_r1904284828


More information about the serviceability-dev mailing list