Open code review for 8061999 Enhance VM option parsing to allow options to be specified

David Holmes david.holmes at oracle.com
Thu Jun 25 06:52:46 UTC 2015


On 25/06/2015 4:38 PM, Dmitry Dmitriev wrote:
> Hello David,
>
> I mean that we can define "-Dmy.property=value" inside VM Option file.

Okay - that isn't necessarily a good thing. This is blurring the 
division of responsibility between the launcher and the VM when it comes 
to argument processing. I don't see why a VM option file should need to 
handle -Dxxx arguments - that suggests a need for a more general 
command-file approach processed by the launcher.

David
-----


> Thanks,
> Dmitry
>
> On 25.06.2015 8:01, David Holmes wrote:
>> On 25/06/2015 4:10 AM, Dmitry Dmitriev wrote:
>>> Hello Dan,
>>> I just want to add following: new VM Options file feature allow to
>>> define property inside option file.
>>
>> What do you mean by that?
>>
>> David
>>
>>> Thanks,
>>> Dmitry
>>>
>>> On 24.06.2015 19:19, Daniel D. Daugherty wrote:
>>>> On 6/23/15 10:43 PM, John Rose wrote:
>>>>> On Jun 23, 2015, at 7:50 PM, David Holmes <david.holmes at oracle.com>
>>>>> wrote:
>>>>>> On 24/06/2015 3:43 AM, Ron Durbin wrote:
>>>>>>> David,
>>>>>>>
>>>>>>> The '-XX:Flags' option was considered during the research phase
>>>>>>> of this project and was rejected because of its limitations. The
>>>>>>> '-XX:Flags' option only works for boolean flag options and it
>>>>>>> uses a different syntax for the options than the command line.
>>>>>>> For example, '-XX:+UseSerialGC' would be specified as '+UseSerialGC'
>>>>>>> in the '-XX:Flags' option file.
>>>>>> I'm a little surprised the Flags option wasn't extended to cover
>>>>>> these additional requirements. But presumably it should now be
>>>>>> deprecated as we (again presumably) don't want to have two
>>>>>> mechanisms for doing this.
>>>>> I thought the Flags option used to handle any command line options,
>>>>> and like David I'm surprised the right answer is to get rid of it and
>>>>> make a new option that does what I think the Flags option should be
>>>>> doing.
>>>>>
>>>>> — John
>>>>
>>>> Greetings,
>>>>
>>>> Ron is out of the office until next week so I'll provide a little
>>>> bit of background...
>>>>
>>>> Ron has a detailed write-up documenting all the research that he
>>>> did on the various command line option mechanisms. We had planned
>>>> to attach that write-up to the bug report, but we dropped the ball
>>>> (Sorry Mary!) After Ron returns, we'll make a final editing pass
>>>> on the document and attach it to the bug report.
>>>>
>>>> I fleshed out the '-XX:Flags' test cases that Ron posted earlier
>>>> in the thread:
>>>>
>>>> $ more flags.input.*::::::::::::::
>>>> flags.input.boolean
>>>> ::::::::::::::
>>>> +UseSerialGC
>>>> ::::::::::::::
>>>> flags.input.ccstr
>>>> ::::::::::::::
>>>> ErrorFile=my_error_file
>>>> ::::::::::::::
>>>> flags.input.uintx
>>>> ::::::::::::::
>>>> MinRAMFraction=8
>>>>
>>>> $ java -XX:+PrintVMOptions -XX:Flags=flags.input.boolean -version
>>>> VM option '+UseSerialGC'
>>>> VM option '+PrintVMOptions'
>>>> VM option 'Flags=flags.input.boolean'
>>>> java version "1.9.0-ea"
>>>> Java(TM) SE Runtime Environment (build 1.9.0-ea-b69)
>>>> Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b69, mixed mode)
>>>>
>>>> $ java -XX:+PrintVMOptions -XX:Flags=flags.input.ccstr -version
>>>> VM option 'ErrorFile=my_error_file'
>>>> VM option '+PrintVMOptions'
>>>> VM option 'Flags=flags.input.ccstr'
>>>> java version "1.9.0-ea"
>>>> Java(TM) SE Runtime Environment (build 1.9.0-ea-b69)
>>>> Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b69, mixed mode)
>>>>
>>>> $ java -XX:+PrintVMOptions -XX:Flags=flags.input.uintx -version
>>>> VM option 'MinRAMFraction=8'
>>>> VM option '+PrintVMOptions'
>>>> VM option 'Flags=flags.input.uintx'
>>>> java version "1.9.0-ea"
>>>> Java(TM) SE Runtime Environment (build 1.9.0-ea-b69)
>>>> Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b69, mixed mode)
>>>>
>>>>
>>>> It looks like the '-XX:Flags' option does work for 'bool', 'uintx'
>>>> and 'ccstr' options. Clearly Ron and I didn't remember the exact
>>>> reason that he ruled out using the '-XX:Flags' option. This part
>>>> of the review thread will have to be resolved after Ron returns.
>>>>
>>>> Dan
>>>
>


More information about the hotspot-runtime-dev mailing list