JDK-8177390: java -version does not differentiate between which port of AArch64 is used
Mario Torre
neugens at redhat.com
Mon Mar 27 14:30:19 UTC 2017
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.
> 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