Mercurial > hg > truffle
diff agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java @ 6641:a9fed06c01d2
7154641: Servicability agent should work on platforms other than x86, sparc
Summary: Added capability to load support classes for other cpus
Reviewed-by: coleenp, bobv, sla
Contributed-by: Bill Pittore <bill.pittore@oracle.com>
author | bpittore |
---|---|
date | Thu, 30 Aug 2012 11:20:01 -0400 |
parents | 970cbbba54b0 |
children | 39432a1cefdd |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java Fri Aug 17 16:47:04 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/utilities/PlatformInfo.java Thu Aug 30 11:20:01 2012 -0400 @@ -64,6 +64,13 @@ } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) { 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"); } }