968 "\n@bci " + bci + lineNumberAnno;
969 } catch (Exception e) {
970 anno += "\n(ERROR while iterating vframes for frame " + curFrame + ")";
971 }
972
973 nextVFrame = curVFrame.javaSender();
974 if (nextVFrame != null) {
975 nextFrame = nextVFrame.getFrame();
976 }
977 } while (nextVFrame != null && nextFrame.equals(curFrame));
978
979 if (shouldSkipOopMaps) {
980 anno = anno + "\nNOTE: null or empty OopMapSet found for this CodeBlob";
981 }
982
983 if (curFrame.getFP() != null) {
984 annoPanel.addAnnotation(new Annotation(curFrame.getSP(),
985 curFrame.getFP(),
986 anno));
987 } else {
988 if (VM.getVM().getCPU().equals("x86") || VM.getVM().getCPU().equals("amd64")) {
989 // For C2, which has null frame pointers on x86/amd64
990 CodeBlob cb = VM.getVM().getCodeCache().findBlob(curFrame.getPC());
991 Address sp = curFrame.getSP();
992 if (Assert.ASSERTS_ENABLED) {
993 Assert.that(cb.getFrameSize() > 0, "CodeBlob must have non-zero frame size");
994 }
995 annoPanel.addAnnotation(new Annotation(sp,
996 sp.addOffsetTo(cb.getFrameSize()),
997 anno));
998 } else {
999 Assert.that(VM.getVM().getCPU().equals("ia64"), "only ia64 should reach here");
1000 }
1001 }
1002
1003 // Add interpreter frame annotations
1004 if (curFrame.isInterpretedFrame()) {
1005 annoPanel.addAnnotation(new Annotation(curFrame.addressOfInterpreterFrameExpressionStack(),
1006 curFrame.addressOfInterpreterFrameTOS(),
1007 "Interpreter expression stack"));
1008 Address monBegin = curFrame.interpreterFrameMonitorBegin().address();
1009 Address monEnd = curFrame.interpreterFrameMonitorEnd().address();
1010 if (!monBegin.equals(monEnd)) {
1011 annoPanel.addAnnotation(new Annotation(monBegin, monEnd,
1012 "BasicObjectLocks"));
1013 }
1014 if (interpreterFrameMethod != null) {
1015 // The offset is just to get the right stack slots highlighted in the output
1016 int offset = 1;
1017 annoPanel.addAnnotation(new Annotation(curFrame.addressOfInterpreterFrameLocal(offset),
1018 curFrame.addressOfInterpreterFrameLocal((int) interpreterFrameMethod.getMaxLocals() + offset),
1019 "Interpreter locals area for frame with SP = " + curFrame.getSP()));
|
968 "\n@bci " + bci + lineNumberAnno;
969 } catch (Exception e) {
970 anno += "\n(ERROR while iterating vframes for frame " + curFrame + ")";
971 }
972
973 nextVFrame = curVFrame.javaSender();
974 if (nextVFrame != null) {
975 nextFrame = nextVFrame.getFrame();
976 }
977 } while (nextVFrame != null && nextFrame.equals(curFrame));
978
979 if (shouldSkipOopMaps) {
980 anno = anno + "\nNOTE: null or empty OopMapSet found for this CodeBlob";
981 }
982
983 if (curFrame.getFP() != null) {
984 annoPanel.addAnnotation(new Annotation(curFrame.getSP(),
985 curFrame.getFP(),
986 anno));
987 } else {
988 String cpu = VM.getVM().getCPU();
989 if (cpu.equals("x86") || cpu.equals("amd64") || cpu.equals("aarch64")) {
990 // For C2, which has null frame pointers on x86/amd64
991 CodeBlob cb = VM.getVM().getCodeCache().findBlob(curFrame.getPC());
992 Address sp = curFrame.getSP();
993 if (Assert.ASSERTS_ENABLED) {
994 Assert.that(cb.getFrameSize() > 0, "CodeBlob must have non-zero frame size");
995 }
996 annoPanel.addAnnotation(new Annotation(sp,
997 sp.addOffsetTo(cb.getFrameSize()),
998 anno));
999 }
1000 }
1001
1002 // Add interpreter frame annotations
1003 if (curFrame.isInterpretedFrame()) {
1004 annoPanel.addAnnotation(new Annotation(curFrame.addressOfInterpreterFrameExpressionStack(),
1005 curFrame.addressOfInterpreterFrameTOS(),
1006 "Interpreter expression stack"));
1007 Address monBegin = curFrame.interpreterFrameMonitorBegin().address();
1008 Address monEnd = curFrame.interpreterFrameMonitorEnd().address();
1009 if (!monBegin.equals(monEnd)) {
1010 annoPanel.addAnnotation(new Annotation(monBegin, monEnd,
1011 "BasicObjectLocks"));
1012 }
1013 if (interpreterFrameMethod != null) {
1014 // The offset is just to get the right stack slots highlighted in the output
1015 int offset = 1;
1016 annoPanel.addAnnotation(new Annotation(curFrame.addressOfInterpreterFrameLocal(offset),
1017 curFrame.addressOfInterpreterFrameLocal((int) interpreterFrameMethod.getMaxLocals() + offset),
1018 "Interpreter locals area for frame with SP = " + curFrame.getSP()));
|