RFR(S): 8198608: Improvements to command-line flags printing

David Holmes david.holmes at oracle.com
Wed Feb 28 22:26:27 UTC 2018


Hi Lutz,

On 24/02/2018 2:48 AM, Schmidt, Lutz wrote:
> Dear all,
> 
> may I please request reviews for this small enhancement:
> 
> Bug:     https://bugs.openjdk.java.net/browse/JDK-8198608
> Webrev:  http://cr.openjdk.java.net/~lucy/webrevs/8198608.00/
> 
> The code in Flag::print_on() so far wasn’t very easy to understand. Changing the layout of what was printed required some deep thinking. I hope that, with my changes, future modifications will be easier.
> 
> The before/after output of -XX:+PrintFlagsFinal is identical, except for those argument names which are longer than expected. In that case, the new version prints one space less, which is by intention.

This all seems okay - and easier to modify further if needed.

Two minor comments:

  576     // Flag::print_on(...) redesign (!print_ranges)

Isn't this the print_ranges case? But in any case not sure a comment 
with "redesign" in it is that meaningful given you can't see the old design.

Does the ccstr newline handling work on all platforms (ie Windows) - I'm 
never sure when it suffices to check for '\n' and when we have to check 
for the platform specific line terminators.

Thanks,
David

> Thank you!
> Lutz
> 
> 
> 
> Dr. Lutz Schmidt | SAP JVM | PI  SAP CP Core | T: +49 (6227) 7-42834
> 


More information about the hotspot-runtime-dev mailing list