comparison 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
comparison
equal deleted inserted replaced
6640:e2cc1fe53845 6641:a9fed06c01d2
1 /* 1 /*
2 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
89 access = new LinuxIA64JavaThreadPDAccess(); 89 access = new LinuxIA64JavaThreadPDAccess();
90 } else if (cpu.equals("amd64")) { 90 } else if (cpu.equals("amd64")) {
91 access = new LinuxAMD64JavaThreadPDAccess(); 91 access = new LinuxAMD64JavaThreadPDAccess();
92 } else if (cpu.equals("sparc")) { 92 } else if (cpu.equals("sparc")) {
93 access = new LinuxSPARCJavaThreadPDAccess(); 93 access = new LinuxSPARCJavaThreadPDAccess();
94 } else {
95 try {
96 access = (JavaThreadPDAccess)
97 Class.forName("sun.jvm.hotspot.runtime.linux_" +
98 cpu.toLowerCase() + ".Linux" + cpu.toUpperCase() +
99 "JavaThreadPDAccess").newInstance();
100 } catch (Exception e) {
101 throw new RuntimeException("OS/CPU combination " + os + "/" + cpu +
102 " not yet supported");
103 }
94 } 104 }
95 } else if (os.equals("bsd")) { 105 } else if (os.equals("bsd")) {
96 if (cpu.equals("x86")) { 106 if (cpu.equals("x86")) {
97 access = new BsdX86JavaThreadPDAccess(); 107 access = new BsdX86JavaThreadPDAccess();
98 } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { 108 } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {