RFR(XS): 8042885: java does not take hexadecimal number as vm option
Yumin Qi
yumin.qi at oracle.com
Thu May 15 18:28:58 UTC 2014
Fredrik,
In this change, I have added code to existing functions, not to
address this problem you found. If you think there is need to make those
functions public, you can file a bug for it. Sorry cannot answer your
why this functions not designed as public at the beginning.
Thanks
Yumin
On 5/15/2014 7:26 AM, Fredrik Arvidsson wrote:
> Hi
>
> Are there any reasons not making this function a public function
> reachable from code outside the Arguments.cpp file? I recently wanted
> to parse some size arguments when working on the Unified Logging
> implementation and I found this piece of code but could not use it.
> There are similar functionality in the DCommand parser too. Should we
> not try to consolidate them?
>
> /Fredrik - Not a reviewer
>
> On 2014-05-15 03:02, Yumin Qi wrote:
>> Hi, Harold and all
>>
>> I mad additional change in arguments.cpp (function atomull) to
>> accommodate the format -XX:SharedBaseAddress=1D000000 which will exit
>> right away:
>>
>> java -XX:+UnlockDiagnosticVMOptions -XX:SharedBaseAddress=1D000000
>> -Xshare:dump
>> Improperly specified VM option 'SharedBaseAddress=1D000000'
>> Error: Could not create the Java Virtual Machine.
>> Error: A fatal exception has occurred. Program will exit.
>>
>> Also added is a test case: test/runtime/8042885
>>
>> Please review at:
>>
>> http://cr.openjdk.java.net/~minqi/8042885/webrev02/
>>
>> Thanks
>> Yumin
>>
>> On 5/14/2014 12:48 PM, Yumin Qi wrote:
>>>
>>> On 5/14/2014 12:34 PM, harold seigel wrote:
>>>> Hi Yumin,
>>>>
>>>> Could you include a test that specifies a decimal value containing
>>>> a hex digit (for example: 123E300) and makes sure that it causes
>>>> an error?
>>>>
>>> Good suggestion, will add as that.
>>>
>>> Thanks
>>> Yumin
>>>> Thanks, Harold
>>>>
>>>> On 5/14/2014 2:33 PM, Yumin Qi wrote:
>>>>> Hmm.. I will come with a test case based on the change, thanks.
>>>>>
>>>>> Yumin
>>>>> On 5/14/2014 9:52 AM, Lois Foltan wrote:
>>>>>>
>>>>>> On 5/14/2014 12:42 PM, Yumin Qi wrote:
>>>>>>> Lois,
>>>>>>>
>>>>>>> jtreg against test/runtime passed (two failures but not
>>>>>>> related to this change for sure).
>>>>>>> I will push the change if you are OK with the result:
>>>>>>> http://javaweb.us.oracle.com/~yqi/webrev/8042885-jtreg/JTreport/
>>>>>>
>>>>>> Hi Yumin,
>>>>>>
>>>>>> That does look good, however, maybe my miscommunication, my
>>>>>> review comment was actually around the need to include a new test
>>>>>> with your fix. One that you add that specifically tests a vm
>>>>>> option with a hexadecimal number.
>>>>>>
>>>>>> Thanks,
>>>>>> Lois
>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>> Yumin
>>>>>>>
>>>>>>> On 5/14/2014 6:54 AM, Yumin Qi wrote:
>>>>>>>> Lois,
>>>>>>>>
>>>>>>>> I will update you jtreg result soon.
>>>>>>>> Thanks for the review!
>>>>>>>>
>>>>>>>> Yumin
>>>>>>>>
>>>>>>>> On 5/14/2014 4:38 AM, Lois Foltan wrote:
>>>>>>>>>
>>>>>>>>> Hi Yumin,
>>>>>>>>>
>>>>>>>>> Looks good, I like this change. Can you accompany your fix
>>>>>>>>> with a Hotspot runtime jtreg test for this new capability?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Lois
>>>>>>>>>
>>>>>>>>> On 5/13/2014 1:24 PM, Yumin Qi wrote:
>>>>>>>>>> Hi, please review the small change for
>>>>>>>>>>
>>>>>>>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8042885
>>>>>>>>>> webrev: http://cr.openjdk.java.net/~minqi/8042885/
>>>>>>>>>>
>>>>>>>>>> Summary: Java does not take number with hexadecimal format as
>>>>>>>>>> options, like -XX:SharedBaseAddress=0x1D000000 will cause VM
>>>>>>>>>> exit with improper argument. For addresses, we more like to
>>>>>>>>>> use hexadecimal format since it is close to machine address
>>>>>>>>>> display naturally.
>>>>>>>>>>
>>>>>>>>>> Tests: JPRT and manual test: java
>>>>>>>>>> -XX:UnlockDiagnosticVMOptions
>>>>>>>>>> -XX:SharedBaseAddress=0x1D000000 -Xshare:dump
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Yumin
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list