< prev index next >

src/hotspot/share/code/compiledMethod.hpp

Print this page
*** 154,10 ***
--- 154,11 ---
  
    // set during construction
    unsigned int _has_unsafe_access:1;         // May fault due to unsafe access.
    unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
    unsigned int _has_wide_vectors:1;          // Preserve wide vectors at safepoints
+   unsigned int _has_monitors:1;              // Fastpath monitor detection for continuations
  
    Method*   _method;
    address _scopes_data_begin;
    // All deoptee's will resume execution at this location described by
    // this address.

*** 170,28 ***
    ExceptionCache * volatile _exception_cache;
  
    void* _gc_data;
  
    virtual void flush() = 0;
  protected:
!   CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments);
!   CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
  
  public:
    // Only used by unit test.
    CompiledMethod() {}
  
-   virtual bool is_compiled() const                { return true; }
- 
    template<typename T>
    T* gc_data() const                              { return reinterpret_cast<T*>(_gc_data); }
    template<typename T>
    void set_gc_data(T* gc_data)                    { _gc_data = reinterpret_cast<void*>(gc_data); }
  
    bool  has_unsafe_access() const                 { return _has_unsafe_access; }
    void  set_has_unsafe_access(bool z)             { _has_unsafe_access = z; }
  
    bool  has_method_handle_invokes() const         { return _has_method_handle_invokes; }
    void  set_has_method_handle_invokes(bool z)     { _has_method_handle_invokes = z; }
  
    bool  has_wide_vectors() const                  { return _has_wide_vectors; }
    void  set_has_wide_vectors(bool z)              { _has_wide_vectors = z; }
--- 171,30 ---
    ExceptionCache * volatile _exception_cache;
  
    void* _gc_data;
  
    virtual void flush() = 0;
+ 
  protected:
!   CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments, bool compiled);
!   CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments, bool compiled);
  
  public:
    // Only used by unit test.
    CompiledMethod() {}
  
    template<typename T>
    T* gc_data() const                              { return reinterpret_cast<T*>(_gc_data); }
    template<typename T>
    void set_gc_data(T* gc_data)                    { _gc_data = reinterpret_cast<void*>(gc_data); }
  
    bool  has_unsafe_access() const                 { return _has_unsafe_access; }
    void  set_has_unsafe_access(bool z)             { _has_unsafe_access = z; }
  
+   bool  has_monitors() const                      { return _has_monitors; }
+   void  set_has_monitors(bool z)                  { _has_monitors = z; }
+ 
    bool  has_method_handle_invokes() const         { return _has_method_handle_invokes; }
    void  set_has_method_handle_invokes(bool z)     { _has_method_handle_invokes = z; }
  
    bool  has_wide_vectors() const                  { return _has_wide_vectors; }
    void  set_has_wide_vectors(bool z)              { _has_wide_vectors = z; }

*** 239,10 ***
--- 242,12 ---
    bool is_at_poll_or_poll_return(address pc);
  
    bool  is_marked_for_deoptimization() const { return _mark_for_deoptimization_status != not_marked; }
    void  mark_for_deoptimization(bool inc_recompile_counts = true);
  
+   virtual void  make_deoptimized() { assert(false, "not supported"); };
+ 
    bool update_recompile_counts() const {
      // Update recompile counts when either the update is explicitly requested (deoptimize)
      // or the nmethod is not marked for deoptimization at all (not_marked).
      // The latter happens during uncommon traps when deoptimized nmethod is made not entrant.
      return _mark_for_deoptimization_status != deoptimize_noupdate;

*** 294,11 ***
    bool nul_chk_table_contains(address addr) const { return nul_chk_table_begin() <= addr && addr < nul_chk_table_end(); }
    int nul_chk_table_size() const { return nul_chk_table_end() - nul_chk_table_begin(); }
  
    virtual oop* oop_addr_at(int index) const = 0;
    virtual Metadata** metadata_addr_at(int index) const = 0;
-   virtual void    set_original_pc(const frame* fr, address pc) = 0;
  
  protected:
    // Exception cache support
    // Note: _exception_cache may be read and cleaned concurrently.
    ExceptionCache* exception_cache() const         { return _exception_cache; }
--- 299,10 ---

*** 316,17 ***
    // MethodHandle
    bool is_method_handle_return(address return_pc);
    address deopt_mh_handler_begin() const  { return _deopt_mh_handler_begin; }
  
    address deopt_handler_begin() const { return _deopt_handler_begin; }
!   virtual address get_original_pc(const frame* fr) = 0;
    // Deopt
    // Return true is the PC is one would expect if the frame is being deopted.
    inline bool is_deopt_pc(address pc);
    inline bool is_deopt_mh_entry(address pc);
    inline bool is_deopt_entry(address pc);
  
    virtual bool can_convert_to_zombie() = 0;
    virtual const char* compile_kind() const = 0;
    virtual int get_state() const = 0;
  
    const char* state() const;
--- 320,26 ---
    // MethodHandle
    bool is_method_handle_return(address return_pc);
    address deopt_mh_handler_begin() const  { return _deopt_mh_handler_begin; }
  
    address deopt_handler_begin() const { return _deopt_handler_begin; }
!   address* deopt_handler_begin_addr()        { return &_deopt_handler_begin; }
    // Deopt
    // Return true is the PC is one would expect if the frame is being deopted.
    inline bool is_deopt_pc(address pc);
    inline bool is_deopt_mh_entry(address pc);
    inline bool is_deopt_entry(address pc);
  
+   // Accessor/mutator for the original pc of a frame before a frame was deopted.
+   address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); }
+   void    set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; }
+ 
+   virtual int orig_pc_offset() = 0;
+ private:
+   address* orig_pc_addr(const frame* fr);
+ 
+ public:
    virtual bool can_convert_to_zombie() = 0;
    virtual const char* compile_kind() const = 0;
    virtual int get_state() const = 0;
  
    const char* state() const;
< prev index next >