< prev index next >

src/hotspot/share/runtime/vframe.hpp

Print this page
@@ -57,37 +57,44 @@
  class vframe: public ResourceObj {
   protected:
    frame        _fr;      // Raw frame behind the virtual frame.
    RegisterMap  _reg_map; // Register map for the raw frame (used to handle callee-saved registers).
    JavaThread*  _thread;  // The thread owning the raw frame.
+   stackChunkHandle _chunk;
  
    vframe(const frame* fr, const RegisterMap* reg_map, JavaThread* thread);
    vframe(const frame* fr, JavaThread* thread);
+ 
   public:
    // Factory methods for creating vframes
    static vframe* new_vframe(const frame* f, const RegisterMap *reg_map, JavaThread* thread);
    static vframe* new_vframe(StackFrameStream& fst, JavaThread* thread);
  
    // Accessors
-   frame              fr()           const { return _fr;       }
-   CodeBlob*          cb()         const { return _fr.cb();  }
-   CompiledMethod*   nm()         const {
+   frame             fr() const { return _fr;       }
+   CodeBlob*         cb() const { return _fr.cb();  }
+   CompiledMethod*   nm() const {
        assert( cb() != NULL && cb()->is_compiled(), "usage");
        return (CompiledMethod*) cb();
    }
  
  // ???? Does this need to be a copy?
    frame*             frame_pointer() { return &_fr;       }
    const RegisterMap* register_map() const { return &_reg_map; }
    JavaThread*        thread()       const { return _thread;   }
+   stackChunkOop      stack_chunk()  const { return _chunk(); /*_reg_map.stack_chunk();*/ }
+   oop                continuation() const { return stack_chunk() != NULL ? stack_chunk()->cont() : (oop)NULL; }
  
    // Returns the sender vframe
    virtual vframe* sender() const;
  
    // Returns the next javaVFrame on the stack (skipping all other kinds of frame)
    javaVFrame *java_sender() const;
  
+   // Call when resuming a walk (calling [java_]sender) on a frame we'e already walked past
+   void restore_register_map() const;
+ 
    // Answers if the this is the top vframe in the frame, i.e., if the sender vframe
    // is in the caller frame
    virtual bool is_top() const { return true; }
  
    // Returns top vframe within same frame (see is_top())

@@ -269,11 +276,10 @@
  };
  
  class vframeStreamCommon : StackObj {
   protected:
    // common
-   frame        _prev_frame;
    frame        _frame;
    JavaThread*  _thread;
    RegisterMap  _reg_map;
    enum { interpreted_mode, compiled_mode, at_end_mode } _mode;
  

@@ -283,13 +289,15 @@
    int _vframe_id;
  
    // Cached information
    Method* _method;
    int       _bci;
+   ContinuationEntry* _cont;
  
    // Should VM activations be ignored or not
    bool _stop_at_java_call_stub;
+   Handle _continuation_scope; // stop at bottom of continuation with this scope
  
    bool fill_in_compiled_inlined_sender();
    void fill_from_compiled_frame(int decode_offset);
    void fill_from_compiled_native_frame();
  

@@ -301,26 +309,29 @@
  
    DEBUG_ONLY(void found_bad_method_frame() const;)
  
   public:
    // Constructor
-   inline vframeStreamCommon(JavaThread* thread, bool process_frames);
+   inline vframeStreamCommon(RegisterMap reg_map);
  
    // Accessors
    Method* method() const { return _method; }
    int bci() const { return _bci; }
    inline intptr_t* frame_id() const;
    address frame_pc() const { return _frame.pc(); }
    inline int vframe_id() const;
    inline int decode_offset() const;
+   inline oop continuation() const;
  
-   CodeBlob*          cb()         const { return _frame.cb();  }
+   CodeBlob*         cb()         const { return _frame.cb();  }
    CompiledMethod*   nm()         const {
        assert( cb() != NULL && cb()->is_compiled(), "usage");
        return (CompiledMethod*) cb();
    }
  
+   const RegisterMap* reg_map() { return &_reg_map; }
+ 
    javaVFrame* asJavaVFrame();
  
    // Frame type
    inline bool is_interpreted_frame() const;
    inline bool is_entry_frame() const;

@@ -337,12 +348,16 @@
  };
  
  class vframeStream : public vframeStreamCommon {
   public:
    // Constructors
-   vframeStream(JavaThread* thread, bool stop_at_java_call_stub = false, bool process_frames = true);
+   vframeStream(JavaThread* thread, bool stop_at_java_call_stub = false, bool process_frames = true, bool vthread_carrier = false);
+ 
+   vframeStream(JavaThread* thread, Handle continuation_scope, bool stop_at_java_call_stub = false);
  
    // top_frame may not be at safepoint, start with sender
    vframeStream(JavaThread* thread, frame top_frame, bool stop_at_java_call_stub = false);
+ 
+   vframeStream(oop continuation, Handle continuation_scope = Handle());
  };
  
  #endif // SHARE_RUNTIME_VFRAME_HPP
< prev index next >