comparison 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
comparison
equal deleted inserted replaced
6640:e2cc1fe53845 6641:a9fed06c01d2
62 } else if (cpu.equals("sparc") || cpu.equals("sparcv9")) { 62 } else if (cpu.equals("sparc") || cpu.equals("sparcv9")) {
63 return "sparc"; 63 return "sparc";
64 } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) { 64 } else if (cpu.equals("ia64") || cpu.equals("amd64") || cpu.equals("x86_64")) {
65 return cpu; 65 return cpu;
66 } else { 66 } else {
67 try {
68 Class pic = Class.forName("sun.jvm.hotspot.utilities.PlatformInfoClosed");
69 AltPlatformInfo api = (AltPlatformInfo)pic.newInstance();
70 if (api.knownCPU(cpu)) {
71 return cpu;
72 }
73 } catch (Exception e) {}
67 throw new UnsupportedPlatformException("CPU type " + cpu + " not yet supported"); 74 throw new UnsupportedPlatformException("CPU type " + cpu + " not yet supported");
68 } 75 }
69 } 76 }
70 77
71 // this main is invoked from Makefile to make platform specific agent Makefile(s). 78 // this main is invoked from Makefile to make platform specific agent Makefile(s).