28 import java.util.*; 29 import sun.jvm.hotspot.code.*; 30 import sun.jvm.hotspot.interpreter.*; 31 import sun.jvm.hotspot.debugger.*; 32 import sun.jvm.hotspot.debugger.cdbg.*; 33 import sun.jvm.hotspot.oops.*; 34 import sun.jvm.hotspot.runtime.*; 35 import sun.jvm.hotspot.utilities.PlatformInfo; 36 37 public class PStack extends Tool { 38 // in non-verbose mode, Method*s are not printed in java frames 39 public PStack(boolean v, boolean concurrentLocks) { 40 this.verbose = v; 41 this.concurrentLocks = concurrentLocks; 42 } 43 44 public PStack() { 45 this(true, true); 46 } 47 48 public void run() { 49 run(System.out); 50 } 51 52 public void run(PrintStream out) { 53 Debugger dbg = getAgent().getDebugger(); 54 run(out, dbg); 55 } 56 57 public void run(PrintStream out, Debugger dbg) { 58 if (PlatformInfo.getOS().equals("darwin")) { 59 out.println("Not available on Darwin"); 60 return; 61 } 62 63 CDebugger cdbg = dbg.getCDebugger(); 64 if (cdbg != null) { 65 ConcurrentLocksPrinter concLocksPrinter = null; 66 // compute and cache java Vframes. 67 initJFrameCache(); | 28 import java.util.*; 29 import sun.jvm.hotspot.code.*; 30 import sun.jvm.hotspot.interpreter.*; 31 import sun.jvm.hotspot.debugger.*; 32 import sun.jvm.hotspot.debugger.cdbg.*; 33 import sun.jvm.hotspot.oops.*; 34 import sun.jvm.hotspot.runtime.*; 35 import sun.jvm.hotspot.utilities.PlatformInfo; 36 37 public class PStack extends Tool { 38 // in non-verbose mode, Method*s are not printed in java frames 39 public PStack(boolean v, boolean concurrentLocks) { 40 this.verbose = v; 41 this.concurrentLocks = concurrentLocks; 42 } 43 44 public PStack() { 45 this(true, true); 46 } 47 48 public PStack(JVMDebugger d) { 49 super(d); 50 } 51 52 public void run() { 53 run(System.out); 54 } 55 56 public void run(PrintStream out) { 57 Debugger dbg = getAgent().getDebugger(); 58 run(out, dbg); 59 } 60 61 public void run(PrintStream out, Debugger dbg) { 62 if (PlatformInfo.getOS().equals("darwin")) { 63 out.println("Not available on Darwin"); 64 return; 65 } 66 67 CDebugger cdbg = dbg.getCDebugger(); 68 if (cdbg != null) { 69 ConcurrentLocksPrinter concLocksPrinter = null; 70 // compute and cache java Vframes. 71 initJFrameCache(); |