< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/PStack.java

Print this page




 114                       Interpreter interp = VM.getVM().getInterpreter();
 115                       if (interp.contains(pc)) {
 116                          names = getJavaNames(th, f.localVariableBase());
 117                          // print codelet name if we can't determine method
 118                          if (names == null || names.length == 0) {
 119                             out.print("<interpreter> ");
 120                             InterpreterCodelet ic = interp.getCodeletContaining(pc);
 121                             if (ic != null) {
 122                                String desc = ic.getDescription();
 123                                if (desc != null) out.print(desc);
 124                             }
 125                             out.println();
 126                          }
 127                       } else {
 128                          // look for known code blobs
 129                          CodeCache c = VM.getVM().getCodeCache();
 130                          if (c.contains(pc)) {
 131                             CodeBlob cb = c.findBlobUnsafe(pc);
 132                             if (cb.isNMethod()) {
 133                                names = getJavaNames(th, f.localVariableBase());








 134                                // just print compiled code, if can't determine method
 135                                if (names == null || names.length == 0) {
 136                                   out.println("<Unknown compiled code>");
 137                                }
 138                             } else if (cb.isBufferBlob()) {
 139                                out.println("<StubRoutines>");
 140                             } else if (cb.isRuntimeStub()) {
 141                                out.println("<RuntimeStub>");
 142                             } else if (cb.isDeoptimizationStub()) {
 143                                out.println("<DeoptimizationStub>");
 144                             } else if (cb.isUncommonTrapStub()) {
 145                                out.println("<UncommonTrap>");
 146                             } else if (cb.isExceptionStub()) {
 147                                out.println("<ExceptionStub>");
 148                             } else if (cb.isSafepointStub()) {
 149                                out.println("<SafepointStub>");
 150                             } else {
 151                                out.println("<Unknown code blob>");
 152                             }
 153                          } else {
 154                             printUnknown(out);
 155                          }




 114                       Interpreter interp = VM.getVM().getInterpreter();
 115                       if (interp.contains(pc)) {
 116                          names = getJavaNames(th, f.localVariableBase());
 117                          // print codelet name if we can't determine method
 118                          if (names == null || names.length == 0) {
 119                             out.print("<interpreter> ");
 120                             InterpreterCodelet ic = interp.getCodeletContaining(pc);
 121                             if (ic != null) {
 122                                String desc = ic.getDescription();
 123                                if (desc != null) out.print(desc);
 124                             }
 125                             out.println();
 126                          }
 127                       } else {
 128                          // look for known code blobs
 129                          CodeCache c = VM.getVM().getCodeCache();
 130                          if (c.contains(pc)) {
 131                             CodeBlob cb = c.findBlobUnsafe(pc);
 132                             if (cb.isNMethod()) {
 133                                names = getJavaNames(th, f.localVariableBase());
 134                                if (cb.isNativeMethod()) {
 135                                   out.print(((CompiledMethod)cb).getMethod().externalNameAndSignature());
 136                                   long diff = pc.minus(cb.codeBegin());
 137                                   if (diff != 0L) {
 138                                     out.print(" + 0x" + Long.toHexString(diff));
 139                                   }
 140                                   out.println(" (Native method)");
 141                                } else if (names == null || names.length == 0) {
 142                                   // just print compiled code, if can't determine method

 143                                   out.println("<Unknown compiled code>");
 144                                }
 145                             } else if (cb.isBufferBlob()) {
 146                                out.println("<StubRoutines>");
 147                             } else if (cb.isRuntimeStub()) {
 148                                out.println("<RuntimeStub>");
 149                             } else if (cb.isDeoptimizationStub()) {
 150                                out.println("<DeoptimizationStub>");
 151                             } else if (cb.isUncommonTrapStub()) {
 152                                out.println("<UncommonTrap>");
 153                             } else if (cb.isExceptionStub()) {
 154                                out.println("<ExceptionStub>");
 155                             } else if (cb.isSafepointStub()) {
 156                                out.println("<SafepointStub>");
 157                             } else {
 158                                out.println("<Unknown code blob>");
 159                             }
 160                          } else {
 161                             printUnknown(out);
 162                          }


< prev index next >