RFR: 8078521: AARCH64: Add AArch64 SA support
Dean Long
dean.long at oracle.com
Thu Apr 23 20:23:52 UTC 2015
On 4/23/2015 9:22 AM, Andrew Haley wrote:
> http://cr.openjdk.java.net/~aph/8078521/
>
> Andrew.
Unfortunately, this will cause conflicts with our closed port. I don't
know if we should try to address those issues here or in a followup
bug. We would need something like the following (still untested) to
allow us to map to a different cpu name:
diff -r d11fb4e8a82e
agent/src/share/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java
---
a/agent/src/share/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java
Tue Mar 24 10:25:09 2015 +0100
+++
b/agent/src/share/classes/sun/jvm/hotspot/utilities/AltPlatformInfo.java
Thu Apr 23 16:17:00 2015 -0400
@@ -27,5 +27,5 @@
public interface AltPlatformInfo {
// Additional cpu types can be tested via this interface
- public boolean knownCPU(String cpu);
-}
\ No newline at end of file
+ public String knownCPU(String cpu);
+}
diff -r d11fb4e8a82e
agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java
---
a/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java
Tue Mar 24 10:25:09 2015 +0100
+++
b/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java
Thu Apr 23 16:17:00 2015 -0400
@@ -57,6 +57,14 @@
is not recognized as supported, an exception is thrown instead. */
public static String getCPU() throws UnsupportedPlatformException {
String cpu = System.getProperty("os.arch");
+ try {
+ Class pic =
Class.forName("sun.jvm.hotspot.utilities.PlatformInfoClosed");
+ AltPlatformInfo api = (AltPlatformInfo)pic.newInstance();
+ String newCPU = api.knownCPU(cpu);
+ if (newCPU != null) {
+ return cpu;
+ }
+ } catch (Exception e) {}
if (cpu.equals("i386") || cpu.equals("x86")) {
return "x86";
} else if (cpu.equals("sparc") || cpu.equals("sparcv9")) {
@@ -64,13 +72,6 @@
} else if (cpu.equals("ia64") || cpu.equals("amd64") ||
cpu.equals("x86_64") || cpu.equals("ppc64") || cpu.equals("aarch64")) {
return cpu;
} else {
- try {
- Class pic =
Class.forName("sun.jvm.hotspot.utilities.PlatformInfoClosed");
- AltPlatformInfo api = (AltPlatformInfo)pic.newInstance();
- if (api.knownCPU(cpu)) {
- return cpu;
- }
- } catch (Exception e) {}
throw new UnsupportedPlatformException("CPU type " + cpu + " not
yet supported");
}
}
More information about the hotspot-dev
mailing list