RFR: 8329549: Remove FORMAT64_MODIFIER

Coleen Phillimore coleenp at openjdk.org
Tue Jan 7 02:39:34 UTC 2025


On Mon, 6 Jan 2025 21:30:14 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> This change removes FORMAT64_MODIFIER but adds another INT64_FORMAT_X_0_ macro to specify not having leading "0x" in the output.  Suggestions for better macro name welcome.
>> GHA tested.
>
> src/hotspot/share/utilities/globalDefinitions.hpp line 136:
> 
>> 134: 
>> 135: // Format without leading 0x
>> 136: #define INT64_FORMAT_X_0_        "%016"       PRIx64
> 
> Why the trailing underscore?
> 
> The name doesn't make sense to me given we have UINT64_FORMAT_X_0 and the only difference here is the leading `0x` which doesn't really have anything to do with signed-ness. Maybe `RAW_UINT64_FORMAT_X_0` to indicate the dropped `0x` prefix ?

Thanks for the suggestion.  All the macros start with UINT64_FORMAT though.  How about UINT64_FORMAT_RAW_X_0 ?  or UINT64_FORMAT_X_0_RAW ?  Still not great.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22918#discussion_r1904834800


More information about the hotspot-dev mailing list