< prev index next >

agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java

Print this page
rev 8073 : 8078521: AARCH64: Add AArch64 SA support
Reviewed-by: kvn


  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 package sun.jvm.hotspot.runtime;
  26 
  27 import java.util.*;
  28 
  29 import sun.jvm.hotspot.debugger.*;
  30 import sun.jvm.hotspot.types.*;
  31 import sun.jvm.hotspot.runtime.solaris_sparc.SolarisSPARCJavaThreadPDAccess;
  32 import sun.jvm.hotspot.runtime.solaris_x86.SolarisX86JavaThreadPDAccess;
  33 import sun.jvm.hotspot.runtime.solaris_amd64.SolarisAMD64JavaThreadPDAccess;
  34 import sun.jvm.hotspot.runtime.win32_amd64.Win32AMD64JavaThreadPDAccess;
  35 import sun.jvm.hotspot.runtime.win32_x86.Win32X86JavaThreadPDAccess;
  36 import sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess;
  37 import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess;

  38 import sun.jvm.hotspot.runtime.linux_ppc64.LinuxPPC64JavaThreadPDAccess;
  39 import sun.jvm.hotspot.runtime.linux_sparc.LinuxSPARCJavaThreadPDAccess;
  40 import sun.jvm.hotspot.runtime.bsd_x86.BsdX86JavaThreadPDAccess;
  41 import sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess;
  42 import sun.jvm.hotspot.utilities.*;
  43 
  44 public class Threads {
  45     private static JavaThreadFactory threadFactory;
  46     private static AddressField      threadListField;
  47     private static CIntegerField     numOfThreadsField;
  48     private static VirtualConstructor virtualConstructor;
  49     private static JavaThreadPDAccess access;
  50 
  51     static {
  52         VM.registerVMInitializedObserver(new Observer() {
  53             public void update(Observable o, Object data) {
  54                 initialize(VM.getVM().getTypeDataBase());
  55             }
  56         });
  57     }


  74             } else if (cpu.equals("x86")) {
  75                 access = new SolarisX86JavaThreadPDAccess();
  76             } else if (cpu.equals("amd64")) {
  77                 access = new SolarisAMD64JavaThreadPDAccess();
  78             }
  79         } else if (os.equals("win32")) {
  80             if (cpu.equals("x86")) {
  81                 access =  new Win32X86JavaThreadPDAccess();
  82             } else if (cpu.equals("amd64")) {
  83                 access =  new Win32AMD64JavaThreadPDAccess();
  84             }
  85         } else if (os.equals("linux")) {
  86             if (cpu.equals("x86")) {
  87                 access = new LinuxX86JavaThreadPDAccess();
  88             } else if (cpu.equals("amd64")) {
  89                 access = new LinuxAMD64JavaThreadPDAccess();
  90             } else if (cpu.equals("sparc")) {
  91                 access = new LinuxSPARCJavaThreadPDAccess();
  92             } else if (cpu.equals("ppc64")) {
  93                 access = new LinuxPPC64JavaThreadPDAccess();


  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               }
 104             }
 105         } else if (os.equals("bsd")) {
 106             if (cpu.equals("x86")) {
 107                 access = new BsdX86JavaThreadPDAccess();
 108             } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
 109                 access = new BsdAMD64JavaThreadPDAccess();
 110             }
 111         } else if (os.equals("darwin")) {
 112             if (cpu.equals("amd64") || cpu.equals("x86_64")) {
 113                 access = new BsdAMD64JavaThreadPDAccess();




  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 package sun.jvm.hotspot.runtime;
  26 
  27 import java.util.*;
  28 
  29 import sun.jvm.hotspot.debugger.*;
  30 import sun.jvm.hotspot.types.*;
  31 import sun.jvm.hotspot.runtime.solaris_sparc.SolarisSPARCJavaThreadPDAccess;
  32 import sun.jvm.hotspot.runtime.solaris_x86.SolarisX86JavaThreadPDAccess;
  33 import sun.jvm.hotspot.runtime.solaris_amd64.SolarisAMD64JavaThreadPDAccess;
  34 import sun.jvm.hotspot.runtime.win32_amd64.Win32AMD64JavaThreadPDAccess;
  35 import sun.jvm.hotspot.runtime.win32_x86.Win32X86JavaThreadPDAccess;
  36 import sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess;
  37 import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess;
  38 import sun.jvm.hotspot.runtime.linux_aarch64.LinuxAARCH64JavaThreadPDAccess;
  39 import sun.jvm.hotspot.runtime.linux_ppc64.LinuxPPC64JavaThreadPDAccess;
  40 import sun.jvm.hotspot.runtime.linux_sparc.LinuxSPARCJavaThreadPDAccess;
  41 import sun.jvm.hotspot.runtime.bsd_x86.BsdX86JavaThreadPDAccess;
  42 import sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess;
  43 import sun.jvm.hotspot.utilities.*;
  44 
  45 public class Threads {
  46     private static JavaThreadFactory threadFactory;
  47     private static AddressField      threadListField;
  48     private static CIntegerField     numOfThreadsField;
  49     private static VirtualConstructor virtualConstructor;
  50     private static JavaThreadPDAccess access;
  51 
  52     static {
  53         VM.registerVMInitializedObserver(new Observer() {
  54             public void update(Observable o, Object data) {
  55                 initialize(VM.getVM().getTypeDataBase());
  56             }
  57         });
  58     }


  75             } else if (cpu.equals("x86")) {
  76                 access = new SolarisX86JavaThreadPDAccess();
  77             } else if (cpu.equals("amd64")) {
  78                 access = new SolarisAMD64JavaThreadPDAccess();
  79             }
  80         } else if (os.equals("win32")) {
  81             if (cpu.equals("x86")) {
  82                 access =  new Win32X86JavaThreadPDAccess();
  83             } else if (cpu.equals("amd64")) {
  84                 access =  new Win32AMD64JavaThreadPDAccess();
  85             }
  86         } else if (os.equals("linux")) {
  87             if (cpu.equals("x86")) {
  88                 access = new LinuxX86JavaThreadPDAccess();
  89             } else if (cpu.equals("amd64")) {
  90                 access = new LinuxAMD64JavaThreadPDAccess();
  91             } else if (cpu.equals("sparc")) {
  92                 access = new LinuxSPARCJavaThreadPDAccess();
  93             } else if (cpu.equals("ppc64")) {
  94                 access = new LinuxPPC64JavaThreadPDAccess();
  95             } else if (cpu.equals("aarch64")) {
  96                 access = new LinuxAARCH64JavaThreadPDAccess();
  97             } else {
  98               try {
  99                 access = (JavaThreadPDAccess)
 100                   Class.forName("sun.jvm.hotspot.runtime.linux_" +
 101                      cpu.toLowerCase() + ".Linux" + cpu.toUpperCase() +
 102                      "JavaThreadPDAccess").newInstance();
 103               } catch (Exception e) {
 104                 throw new RuntimeException("OS/CPU combination " + os + "/" + cpu +
 105                                            " not yet supported");
 106               }
 107             }
 108         } else if (os.equals("bsd")) {
 109             if (cpu.equals("x86")) {
 110                 access = new BsdX86JavaThreadPDAccess();
 111             } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
 112                 access = new BsdAMD64JavaThreadPDAccess();
 113             }
 114         } else if (os.equals("darwin")) {
 115             if (cpu.equals("amd64") || cpu.equals("x86_64")) {
 116                 access = new BsdAMD64JavaThreadPDAccess();


< prev index next >