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

Stefan Karlsson stefan.karlsson at oracle.com
Mon Apr 20 12:09:41 UTC 2015


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.

Tested with JPRT.

Thanks,
StefanK



More information about the hotspot-gc-dev mailing list