JDK-8177390: java -version does not differentiate between which port of AArch64 is used
Bob Vandette
bob.vandette at oracle.com
Fri Mar 24 17:24:20 UTC 2017
> On Mar 24, 2017, at 11:57 AM, Mario Torre <neugens at redhat.com> wrote:
>
> 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?
I’m not opposed to the approach, just the name of the property.
The “community” is free to build a 64-bit (aarch64) ARM port from either hotspot/src/cpu/arm
or hotspot/src/cpu/aarch64 sources, so aarch64.community.port is a bit misleading since
binaries produced from either port can be a “community” port.
What we are trying to differenciate are the two difference cpu and os_cpu directories
used to produce an aarch64 image. I’m hopeful that one day, we’ll consolidate these
two ports so I don’t want to do anything too permanent.
Can we use the property hotspot.target.cpu.port={aarch64,arm}
Bob.
>
> 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