< prev index next >

src/hotspot/share/code/codeBlob.hpp

Print this page
*** 25,10 ***
--- 25,11 ---
  #ifndef SHARE_CODE_CODEBLOB_HPP
  #define SHARE_CODE_CODEBLOB_HPP
  
  #include "asm/codeBuffer.hpp"
  #include "compiler/compilerDefinitions.hpp"
+ #include "compiler/oopMap.inline.hpp"
  #include "runtime/javaFrameAnchor.hpp"
  #include "runtime/frame.hpp"
  #include "runtime/handles.hpp"
  #include "utilities/align.hpp"
  #include "utilities/macros.hpp"

*** 104,10 ***
--- 105,12 ---
                                                   // address    _content_end - not required, for all CodeBlobs _code_end == _content_end for now
    address    _data_end;
    address    _relocation_begin;
    address    _relocation_end;
  
+   bool       _is_compiled;
+ 
    ImmutableOopMapSet* _oop_maps;                 // OopMap for this CodeBlob
    bool                _caller_must_gc_arguments;
  
    const char*         _name;
    S390_ONLY(int       _ctable_offset;)

*** 120,13 ***
      _asm_remarks.clear();
      _dbg_strings.clear();
    }
  #endif // not PRODUCT
  
!   CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments);
!   CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
- 
  public:
    // Only used by unit test.
    CodeBlob() : _type(compiler_none) {}
  
    // Returns the space needed for CodeBlob
--- 123,12 ---
      _asm_remarks.clear();
      _dbg_strings.clear();
    }
  #endif // not PRODUCT
  
!   CodeBlob(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 = false);
!   CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments, bool compiled = false);
  public:
    // Only used by unit test.
    CodeBlob() : _type(compiler_none) {}
  
    // Returns the space needed for CodeBlob

*** 145,11 ***
    virtual bool is_exception_stub() const              { return false; }
    virtual bool is_safepoint_stub() const              { return false; }
    virtual bool is_adapter_blob() const                { return false; }
    virtual bool is_vtable_blob() const                 { return false; }
    virtual bool is_method_handles_adapter_blob() const { return false; }
!   virtual bool is_compiled() const                    { return false; }
    virtual bool is_optimized_entry_blob() const                  { return false; }
  
    inline bool is_compiled_by_c1() const    { return _type == compiler_c1; };
    inline bool is_compiled_by_c2() const    { return _type == compiler_c2; };
    inline bool is_compiled_by_jvmci() const { return _type == compiler_jvmci; };
--- 147,12 ---
    virtual bool is_exception_stub() const              { return false; }
    virtual bool is_safepoint_stub() const              { return false; }
    virtual bool is_adapter_blob() const                { return false; }
    virtual bool is_vtable_blob() const                 { return false; }
    virtual bool is_method_handles_adapter_blob() const { return false; }
!   bool is_compiled() const                            { return _is_compiled; }
+   const bool* is_compiled_addr() const                { return &_is_compiled; }
    virtual bool is_optimized_entry_blob() const                  { return false; }
  
    inline bool is_compiled_by_c1() const    { return _type == compiler_c1; };
    inline bool is_compiled_by_c2() const    { return _type == compiler_c2; };
    inline bool is_compiled_by_jvmci() const { return _type == compiler_jvmci; };

*** 215,11 ***
    virtual bool is_alive() const                  = 0;
  
    // OopMap for frame
    ImmutableOopMapSet* oop_maps() const           { return _oop_maps; }
    void set_oop_maps(OopMapSet* p);
!   const ImmutableOopMap* oop_map_for_return_address(address return_address);
    virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) = 0;
  
    // Frame support. Sizes are in word units.
    int  frame_size() const                        { return _frame_size; }
    void set_frame_size(int size)                  { _frame_size = size; }
--- 218,18 ---
    virtual bool is_alive() const                  = 0;
  
    // OopMap for frame
    ImmutableOopMapSet* oop_maps() const           { return _oop_maps; }
    void set_oop_maps(OopMapSet* p);
! 
+   const ImmutableOopMap* oop_map_for_slot(int slot, address return_address) const {
+     assert(_oop_maps != NULL, "nope");
+     return _oop_maps->find_map_at_slot(slot, (intptr_t) return_address - (intptr_t) code_begin());
+   }
+ 
+   //const ImmutableOopMap* oop_map_for_slot(int slot, address return_address) const;
+   const ImmutableOopMap* oop_map_for_return_address(address return_address) const;
    virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) = 0;
  
    // Frame support. Sizes are in word units.
    int  frame_size() const                        { return _frame_size; }
    void set_frame_size(int size)                  { _frame_size = size; }
< prev index next >