RFR: 8042891: Format issues embedded in macros for two g1 source files

Stefan Karlsson stefan.karlsson at oracle.com
Mon Apr 20 14:37:43 UTC 2015


On 2015-04-20 16:31, Thomas Schatzl wrote:
> Hi,
>
> On Mon, 2015-04-20 at 14:09 +0200, Stefan Karlsson wrote:
>> Hi,
>>
>> Please review this patch to fix printf format issues in G1 code.
>>
>> http://cr.openjdk.java.net/~stefank/8042891/webrev.01/
>> https://bugs.openjdk.java.net/browse/JDK-8042891
>>
>> The patch contains mostly trivial changes were pointers have been
>> wrapped with p2i, but there are a few other changes as well:
>>
>> 1) UINT32_FORMAT was used to print a uint. Changed to %u.
>> 2) SIZE_FORMAT was used to print an object size that was represented
>> with an int. Added cast to size_t.
>> 3) %u was used to print a uintx. Changed to UINTX_FORMAT.
>> 4) Removed the + in %+45s.
>> 5) ergo_verbose passed too many parameters. Changed the format string to
>> use matching pairs of "%s" and "" whenever unused parameters were passed
>> down to ergo_verbose_common. This should probably be changed to use
>> variadic macros in a separate change.
>>
>> I've manually verified that the output for (4) and (5) stays the same.
>    thanks for changing the code to remove the need to disable compiler
> warnings in gc code.
>
> Looks good.

Thanks, Thomas.

StefanK

>
> Thomas
>
>



More information about the hotspot-gc-dev mailing list