Mercurial > hg > truffle
diff agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.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 | 78d2ae5ab35b |
children | 5a98bf7d847b |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java Fri Aug 17 16:47:04 2012 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java Thu Aug 30 11:20:01 2012 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,6 +91,16 @@ access = new LinuxAMD64JavaThreadPDAccess(); } else if (cpu.equals("sparc")) { access = new LinuxSPARCJavaThreadPDAccess(); + } else { + try { + access = (JavaThreadPDAccess) + Class.forName("sun.jvm.hotspot.runtime.linux_" + + cpu.toLowerCase() + ".Linux" + cpu.toUpperCase() + + "JavaThreadPDAccess").newInstance(); + } catch (Exception e) { + throw new RuntimeException("OS/CPU combination " + os + "/" + cpu + + " not yet supported"); + } } } else if (os.equals("bsd")) { if (cpu.equals("x86")) {