hotspot/src/share/vm/runtime/vframe.hpp
changeset 34280 72bfaaffee36
parent 34273 8598d07915d9
child 35542 9dccb7f9f656
--- a/hotspot/src/share/vm/runtime/vframe.hpp	Tue Nov 24 20:01:45 2015 +0000
+++ b/hotspot/src/share/vm/runtime/vframe.hpp	Tue Nov 24 14:59:17 2015 -0800
@@ -317,10 +317,18 @@
   intptr_t* frame_id() const { return _frame.id(); }
   address frame_pc() const { return _frame.pc(); }
 
+  javaVFrame* java_frame() {
+    vframe* vf = vframe::new_vframe(&_frame, &_reg_map, _thread);
+    if (vf->is_java_frame()) {
+      return (javaVFrame*)vf;
+    }
+    return NULL;
+  }
+
   CodeBlob*          cb()         const { return _frame.cb();  }
   nmethod*           nm()         const {
-      assert( cb() != NULL && cb()->is_nmethod(), "usage");
-      return (nmethod*) cb();
+    assert( cb() != NULL && cb()->is_nmethod(), "usage");
+    return (nmethod*) cb();
   }
 
   // Frame type