RFR(XS): 8042885: java does not take hexadecimal number as vm option

Yumin Qi yumin.qi at oracle.com
Thu May 15 20:44:30 UTC 2014


Coleen,

   Thanks for your suggestion, I changed test case for that. Please 
check same URL.

   I have done multiple tests on this change, like

java -Xmx0x100M  -XX:ThreadStackSize=0x1M -version
java version "1.9.0-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.9.0-ea-fastdebug-b12)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-internal-fastdebug, mixed 
mode)

Now any number before input as decimal only  now can be input as hex.

Thanks
Yumin

On 5/15/2014 1:14 PM, Coleen Phillimore wrote:
>
> Hi Yumin,
> The code looks good but the test could fail even when your code is 
> correct if -Xshare:dump tries to write to a directory that it can't 
> write to, or hit some other sharing problem.
>
> I think you should have the test do this instead:
>
>   java -XX:SharedBaseAddress=0xnumber -version
>
> Thanks,
> Coleen
>
> On 5/15/14, 3:42 PM, Yumin Qi wrote:
>> I have moved the file TestHexArguments.java to 
>> test/runtime/CommandLine, please check the webrev at same URL.
>>
>> Thanks
>> Yumin
>>
>> On 5/15/2014 12:29 PM, Christian Tornqvist wrote:
>>> Hi Yumin,
>>>
>>> The test looks good, you should put the test in 
>>> test/runtime/CommandLine instead of in a folder with the bug number 
>>> (see 
>>> https://wiki.openjdk.java.net/display/HotSpot/Naming+HotSpot+JTReg+Tests 
>>> for guidelines on test naming).
>>>
>>> Thanks,
>>> Christian
>>>
>>> -----Original Message-----
>>> From: hotspot-runtime-dev 
>>> [mailto:hotspot-runtime-dev-bounces at openjdk.java.net] On Behalf Of 
>>> Yumin Qi
>>> Sent: Wednesday, May 14, 2014 9:03 PM
>>> To: harold seigel; hotspot-runtime-dev at openjdk.java.net
>>> Subject: Re: RFR(XS): 8042885: java does not take hexadecimal number 
>>> as vm option
>>>
>>> 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