Please review -XshowSettings a java launcher option.
Mandy Chung
mandy.chung at oracle.com
Thu Nov 11 23:09:46 UTC 2010
On 11/11/10 13:56, Kumar Srinivasan wrote:
> Hi All,
>
> Please review the following:
>
> http://cr.openjdk.java.net/~ksrini/6452854/webrev.00/
Some comments:
java.c
line 1031: this doesn't catch invalid option if it has the
-XshowSettings prefix e.g. -XshowSettingsJunk.
line 1032: Perhaps you could store the suboption ("all", "vm", etc)
rather than the entire option string.
line 1507-1511: should these lines align with the argument "env" to
CallStaticVoidMethod method in line 1506?
LauncherHelper.java
line 106-109: if optionFlag is just the suboption to -XshowSettings,
these lines can be removed.
line 150-152: Runtime.maxMemory() is not equivalent to -Xmx value.
Perhaps -XshowSettings always prints Runtime.maxMemory() and print -Xmx
if set in the command line?
line 176, 188, 190-191, 195, and other lines in printPrintLocales and
printLocale methods:
- the assignment to the buf and out variable to itself (returned from
StringBuffer.append() method) is not necessary.
line 174: would it be better to pass the StringBuilder to the
printPrintValue method so that it can avoid creating a new StringBuilder
instance for each property?
line 213-214: same comment as the above. And should it use
StringBuilder instead?
Mandy
>
> This will print all the known settings/properties/locales
> supported and known to Java, this has been a long standing request.
>
> A sample output attached below.
>
> Note: the -X option specifically is being used so we can evolve this
> option
> and add more useful information, in future versions of java.
>
> Thanks
> Kumar
>
>
>
More information about the core-libs-dev
mailing list