JDK-8177390: java -version does not differentiate between which port of AArch64 is used
David Holmes
david.holmes at oracle.com
Mon Mar 27 20:48:26 UTC 2017
Hi Mario,
On 28/03/2017 12:30 AM, Mario Torre wrote:
> On Mon, Mar 27, 2017 at 3:08 AM, David Holmes <david.holmes at oracle.com> wrote:
>
>> diff -r dabd810a9825 make/lib/CompileJvm.gmk
>> --- a/make/lib/CompileJvm.gmk
>> +++ b/make/lib/CompileJvm.gmk
>> @@ -118,6 +118,12 @@
>> OPENJDK_TARGET_CPU_VM_VERSION := amd64
>> else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
>> OPENJDK_TARGET_CPU_VM_VERSION := sparc
>> +else ifeq ($(HOTSPOT_TARGET_CPU_ARCH), arm)
>> + ifeq ($(OPENJDK_TARGET_CPU), aarch64)
>> + # This sets the Oracle Aarch64 port to use arm64
>> + # while the original Aarch64 port uses aarch64
>> + OPENJDK_TARGET_CPU_VM_VERSION := arm64
>> + endif
>> else
>> OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU)
>> endif
>>
>>
>> This gives:
>>
>> Java HotSpot(TM) 64-Bit Server VM
>> (9-internal+0-2017-03-23-222147.daholme.jdk9-hs) for linux-arm64 JRE
>> (9-internal+0-2017-03-23-222147.daholme.jdk9-hs), built on Mar 26 2017
>> 20:58:41 by "daholme" with gcc 4.8.3 20131111 (prerelease)
>>
>> versus a previous:
>>
>> Java HotSpot(TM) 64-Bit Server VM (fastdebug
>> 9-internal+0-2016-11-23-194303.daholme.jdk9-hs) for linux-aarch64 JRE
>> (9-internal+0-2016-11-23-194303.daholme.jdk9-hs), built on Nov 23 2016
>> 20:04:21 by "daholme" with gcc 4.8.3 20131111 (prerelease)
>>
>>> Can we use the property hotspot.target.cpu.port={aarch64,arm}
>>
>>
>> The original request here was for a way to distinguish the two ports based
>> on "java -version", which is satisfied by the change suggested for "java
>> -Xinternalversion". I do not see that it is necessary to have a programmatic
>> means of querying this property from inside a running VM. That said the
>> change proposed above will expose the version through the VMInfo Dcmd.
>
> Hello David,
>
> This works perfectly for me, thanks!
>
> I prepared a webrev with your patch, although it's obviously redundant
> since it's a 1-to-1 copy of what you posted:
>
> http://cr.openjdk.java.net/~neugens/8177390/webrev.4/hotspot.patch
>
> What would be the next step here? We would like to have it in 9 before
> the release if possible.
The RDP2 process needs to be followed as per the email:
http://mail.openjdk.java.net/pipermail/jdk9-dev/2017-March/005666.html
I have updated the bug to a P2 and marked it for fixing in 9. You and
Bob need to fulfill the other requirements of the process so the fix can
be approved.
There will also need to be a change to hotspot/test/test_env.sh to
correctly set the VM_CPU variable when it sees arm64 instead of aarch64.
Bob: you'll need to check the closed/runtime tests with the changes.
Thanks,
David
>> System properties tend to be long-lived so adding them should not be
>> undertaken lightly. Adding a property would require a CCC approval.
>
> Indeed.
>
> Cheers,
> Mario
>
More information about the jdk9-dev
mailing list