< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java

Print this page

        

@@ -1907,10 +1907,11 @@
 
       buf.append("Thread state = ");
       buf.append(thread.getThreadState().toString());
       buf.br();
       buf.beginTag("pre");
+      int count = 0;
       for (JavaVFrame vf = thread.getLastJavaVFrameDbg(); vf != null; vf = vf.javaSender()) {
          Method method = vf.getMethod();
          buf.append(" - ");
          buf.append(genMethodLink(method));
          buf.append(" @bci = " + vf.getBCI());

@@ -1946,10 +1947,23 @@
          if (vf.mayBeImpreciseDbg()) {
             buf.append("; information may be imprecise");
          }
          buf.append(")");
          buf.br();
+
+         ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+         PrintStream printStream = new PrintStream(bytes);
+         try (printStream) {
+           vf.printLockInfo(printStream, count++);
+           for (String line : bytes.toString().split("\n")) {
+             if (genHTML) {
+               line = line.replace("<", "&lt;").replace(">", "&gt;");
+             }
+             buf.append(line);
+             buf.br();
+           }
+         }
       }
 
       buf.endTag("pre");
       buf.genHTMLEpilogue();
       return buf.toString();
< prev index next >