< prev index next >

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

Print this page




 113                       // check interpreter frame
 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                          }
 156                       }




 113                       // check interpreter frame
 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                                if (cb.isNativeMethod()) {
 134                                   out.print(((CompiledMethod)cb).getMethod().externalNameAndSignature());
 135                                   long diff = pc.minus(cb.codeBegin());
 136                                   if (diff != 0L) {
 137                                     out.print(" + 0x" + Long.toHexString(diff));
 138                                   }
 139                                   out.println(" (Native method)");
 140                                } else {
 141                                   names = getJavaNames(th, f.localVariableBase());
 142                                   // just print compiled code, if can't determine method
 143                                   if (names == null || names.length == 0) {
 144                                     out.println("<Unknown compiled code>");
 145                                   }
 146                                }
 147                             } else if (cb.isBufferBlob()) {
 148                                out.println("<StubRoutines>");
 149                             } else if (cb.isRuntimeStub()) {
 150                                out.println("<RuntimeStub>");
 151                             } else if (cb.isDeoptimizationStub()) {
 152                                out.println("<DeoptimizationStub>");
 153                             } else if (cb.isUncommonTrapStub()) {
 154                                out.println("<UncommonTrap>");
 155                             } else if (cb.isExceptionStub()) {
 156                                out.println("<ExceptionStub>");
 157                             } else if (cb.isSafepointStub()) {
 158                                out.println("<SafepointStub>");
 159                             } else {
 160                                out.println("<Unknown code blob>");
 161                             }
 162                          } else {
 163                             printUnknown(out);
 164                          }
 165                       }


< prev index next >