Please review -XshowSettings a java launcher option.

David Holmes David.Holmes at
Fri Nov 12 19:59:51 UTC 2010

Kumar Srinivasan said the following on 11/13/10 01:16:
>>>> - ServerClassMachine() does not take into account -Xint possibility 
>>>> (and will need updating for Tiered compilation)
>>> Absolutely when that becomes a reality.
>> You overlooked the -Xint part. I believe you will report "client" when 
>> -Xint is specified.
> On what class machine ? a server class ? in which case it reports 
> "server" for me.

Okay, I wasn't sure if the ServerClassMachine() logic actually accounted 
for -Xint. I thought it did in which case it would return false and so 
you would assume client. Returning "server" is just as wrong here unless 
the intent is to simply show whether this is considered a server class 
machine regardless of whether -client or -Xint were specified. That said 
will -client cause ServerClassMachine() to return false? I don't know 
what the ergo policy logic does here:

  switch(GetErgoPolicy()) {
       return JNI_FALSE;
       return JNI_TRUE;

In any case the issue is what this value is supposed to show - if it is 
just showing whether this is a server class machine, and that is not 
affected by specifying -client or -Xint then okay, but that wasn't 
completely clear to me - I would change:

"Ergonomics Class (server or client): "

to say

"Ergonomics Machine Class (server or client): "

> It is incomplete!, that is why I have the disclaimer and proposed it as 
> "-X" flag.
> So that we can evolve this flag in future releases, and use jdk7 to get 
> the feedback
> from users on what they would like to see for settings.
>> (But that pretty much sums up the state of all our flags anyway: -foo 
>> vs -Xfoo vs -XX:foo :( )
> Yeh I know and I rest my case for this flag. ;-)
> This is exactly why we need one interface to bring the whole Java 
> setting story together.
> We cannot tell our users/support personnel, SQE etc. to use different 
> flags to get the Java and VM settings.

Then I would suggest that in parallel with this we add another -XX flag 
that takes a list of VM variables for which the final value should be 
printed. -Xshowsettings would then add -XX:PrintFlagValues=flag1,flag2 
etc. Of course the launcher would not have control over the output 
format in that case and the output would not be consistent with what is 
proposed today (hence my reluctance to pursue this part of the RFE 
today). But this way it would be easy for the launcher to update the 
list of variables reported.


> Thanks
> Kumar
>> David
>>> Thanks
>>> Kumar
>>>> David
>>>> Kumar Srinivasan said the following on 11/12/10 07:56:
>>>>> Hi All,
>>>>> Please review the following:
>>>>> 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