JDK-8177390: java -version does not differentiate between which port of AArch64 is used

Mario Torre neugens at redhat.com
Fri Mar 24 15:57:52 UTC 2017


On Fri, Mar 24, 2017 at 4:15 PM, Bob Vandette <bob.vandette at oracle.com> wrote:
> Do we dump the contents of the “release” file in the hotspot error log?
>
> If so, there’s a key in that file called “IMPLEMENTOR” that is set to Oracle for the binaries that we produce (from the hotspot/src/cpu/arm sources).
>
> Alternatively, we could add HOTSPOT_TARGET_CPU_PORT to the release file.

Hello Bob,

Thanks for this suggestion too.

I have a patch that may work, is not very intrusive and only adds some
things for the aarch64, so it should be ok, hopefully:

http://cr.openjdk.java.net/~neugens/8177390/webrev.3/

This follows David's suggestion on having the -Xinternalversion
changed slightly. I also add a property (I hope that's ok and doesn't
require CCC or spec changes approvals), the property is
"aarch64.community.port" and only there for the aarch64 port so that
code can query it, the value for all the other ports will be null.

Would that be acceptable?

The benefit of this is that it can be queried by java applications,
can be output on the terminal via -Xinternalversion and appears in the
hotspot error file [1]:

vm_info: OpenJDK 64-Bit Server VM (9-internal+0-adhoc.neugens.jdk9)
for linux-aarch64 (aarch64) JRE (9-internal+0-adhoc.neugens.jdk9),
built on Mar 24 2017 15:09:52 by "neugens" with gcc 4.8.3 20140911
(Red Hat 4.8.3-9)

As opposed to (crash from the arm64 port):

vm_info: OpenJDK 64-Bit Server VM (9-internal+0-adhoc.neugens.jdk9)
for linux-aarch64 JRE (9-internal+0-adhoc.neugens.jdk9), built on Mar
24 2017 15:27:39 by "neugens" with gcc 4.8.3 20140911 (Red Hat
4.8.3-9)

This is way better than my original patch did, and serves all our use cases.

Cheers,
Mario

[1] Kudos to Aleksey for suggesting a very clever way to crash the jdk
on demand :)


More information about the jdk9-dev mailing list