src/share/vm/code/codeBlob.hpp

changeset 1934
e9ff18c4ace7
parent 1907
c18cbe5936b8
parent 1918
1a5913bf5e19
child 2018
7139e81efd2d
     1.1 --- a/src/share/vm/code/codeBlob.hpp	Tue Jun 01 11:48:33 2010 -0700
     1.2 +++ b/src/share/vm/code/codeBlob.hpp	Wed Jun 02 22:45:42 2010 -0700
     1.3 @@ -54,17 +54,12 @@
     1.4                                                   // that range. There is a similar range(s) on returns
     1.5                                                   // which we don't detect.
     1.6    int        _data_offset;                       // offset to where data region begins
     1.7 -  int        _oops_offset;                       // offset to where embedded oop table begins (inside data)
     1.8 -  int        _oops_length;                       // number of embedded oops
     1.9    int        _frame_size;                        // size of stack frame
    1.10    OopMapSet* _oop_maps;                          // OopMap for this CodeBlob
    1.11    CodeComments _comments;
    1.12  
    1.13    friend class OopRecorder;
    1.14  
    1.15 -  void fix_oop_relocations(address begin, address end, bool initialize_immediates);
    1.16 -  inline void initialize_immediate_oop(oop* dest, jobject handle);
    1.17 -
    1.18   public:
    1.19    // Returns the space needed for CodeBlob
    1.20    static unsigned int allocation_size(CodeBuffer* cb, int header_size);
    1.21 @@ -115,14 +110,11 @@
    1.22    address    instructions_end() const            { return (address)    header_begin() + _data_offset; }
    1.23    address    data_begin() const                  { return (address)    header_begin() + _data_offset; }
    1.24    address    data_end() const                    { return (address)    header_begin() + _size; }
    1.25 -  oop*       oops_begin() const                  { return (oop*)      (header_begin() + _oops_offset); }
    1.26 -  oop*       oops_end() const                    { return                oops_begin() + _oops_length; }
    1.27  
    1.28    // Offsets
    1.29    int relocation_offset() const                  { return _header_size; }
    1.30    int instructions_offset() const                { return _instructions_offset; }
    1.31    int data_offset() const                        { return _data_offset; }
    1.32 -  int oops_offset() const                        { return _oops_offset; }
    1.33  
    1.34    // Sizes
    1.35    int size() const                               { return _size; }
    1.36 @@ -130,40 +122,16 @@
    1.37    int relocation_size() const                    { return (address) relocation_end() - (address) relocation_begin(); }
    1.38    int instructions_size() const                  { return instructions_end() - instructions_begin();  }
    1.39    int data_size() const                          { return data_end() - data_begin(); }
    1.40 -  int oops_size() const                          { return (address) oops_end() - (address) oops_begin(); }
    1.41  
    1.42    // Containment
    1.43    bool blob_contains(address addr) const         { return header_begin()       <= addr && addr < data_end(); }
    1.44    bool relocation_contains(relocInfo* addr) const{ return relocation_begin()   <= addr && addr < relocation_end(); }
    1.45    bool instructions_contains(address addr) const { return instructions_begin() <= addr && addr < instructions_end(); }
    1.46    bool data_contains(address addr) const         { return data_begin()         <= addr && addr < data_end(); }
    1.47 -  bool oops_contains(oop* addr) const            { return oops_begin()         <= addr && addr < oops_end(); }
    1.48    bool contains(address addr) const              { return instructions_contains(addr); }
    1.49    bool is_frame_complete_at(address addr) const  { return instructions_contains(addr) &&
    1.50                                                            addr >= instructions_begin() + _frame_complete_offset; }
    1.51  
    1.52 -  // Relocation support
    1.53 -  void fix_oop_relocations(address begin, address end) {
    1.54 -    fix_oop_relocations(begin, end, false);
    1.55 -  }
    1.56 -  void fix_oop_relocations() {
    1.57 -    fix_oop_relocations(NULL, NULL, false);
    1.58 -  }
    1.59 -  relocInfo::relocType reloc_type_for_address(address pc);
    1.60 -  bool is_at_poll_return(address pc);
    1.61 -  bool is_at_poll_or_poll_return(address pc);
    1.62 -
    1.63 -  // Support for oops in scopes and relocs:
    1.64 -  // Note: index 0 is reserved for null.
    1.65 -  oop  oop_at(int index) const                   { return index == 0? (oop)NULL: *oop_addr_at(index); }
    1.66 -  oop* oop_addr_at(int index) const{             // for GC
    1.67 -    // relocation indexes are biased by 1 (because 0 is reserved)
    1.68 -    assert(index > 0 && index <= _oops_length, "must be a valid non-zero index");
    1.69 -    return &oops_begin()[index-1];
    1.70 -  }
    1.71 -
    1.72 -  void copy_oops(GrowableArray<jobject>* oops);
    1.73 -
    1.74    // CodeCache support: really only used by the nmethods, but in order to get
    1.75    // asserts and certain bookkeeping to work in the CodeCache they are defined
    1.76    // virtual here.
    1.77 @@ -175,12 +143,6 @@
    1.78  
    1.79    // GC support
    1.80    virtual bool is_alive() const                  = 0;
    1.81 -  virtual void do_unloading(BoolObjectClosure* is_alive,
    1.82 -                            OopClosure* keep_alive,
    1.83 -                            bool unloading_occurred);
    1.84 -  virtual void oops_do(OopClosure* f) = 0;
    1.85 -  // (All CodeBlob subtypes other than NMethod currently have
    1.86 -  // an empty oops_do() method.
    1.87  
    1.88    // OopMap for frame
    1.89    OopMapSet* oop_maps() const                    { return _oop_maps; }
    1.90 @@ -245,11 +207,6 @@
    1.91    // GC/Verification support
    1.92    void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f)  { /* nothing to do */ }
    1.93    bool is_alive() const                          { return true; }
    1.94 -  void do_unloading(BoolObjectClosure* is_alive,
    1.95 -                    OopClosure* keep_alive,
    1.96 -                    bool unloading_occurred)     { /* do nothing */ }
    1.97 -
    1.98 -  void oops_do(OopClosure* f)                    { /* do nothing*/ }
    1.99  
   1.100    void verify();
   1.101    void print() const                             PRODUCT_RETURN;
   1.102 @@ -334,10 +291,6 @@
   1.103    // GC/Verification support
   1.104    void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f)  { /* nothing to do */ }
   1.105    bool is_alive() const                          { return true; }
   1.106 -  void do_unloading(BoolObjectClosure* is_alive,
   1.107 -                    OopClosure* keep_alive,
   1.108 -                    bool unloading_occurred)     { /* do nothing */ }
   1.109 -  void oops_do(OopClosure* f) { /* do-nothing*/ }
   1.110  
   1.111    void verify();
   1.112    void print() const                             PRODUCT_RETURN;
   1.113 @@ -363,9 +316,6 @@
   1.114     {};
   1.115  
   1.116     bool is_alive() const                         { return true; }
   1.117 -   void do_unloading(BoolObjectClosure* is_alive,
   1.118 -                     OopClosure* keep_alive,
   1.119 -                     bool unloading_occurred)    { /* do-nothing*/ }
   1.120  
   1.121     void verify(); // does nothing
   1.122     void print() const                            PRODUCT_RETURN;
   1.123 @@ -423,9 +373,6 @@
   1.124    // GC for args
   1.125    void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { /* Nothing to do */ }
   1.126  
   1.127 -  // Iteration
   1.128 -  void oops_do(OopClosure* f) {}
   1.129 -
   1.130    // Printing
   1.131    void print_value_on(outputStream* st) const PRODUCT_RETURN;
   1.132  
   1.133 @@ -477,9 +424,6 @@
   1.134  
   1.135    // Typing
   1.136    bool is_uncommon_trap_stub() const             { return true; }
   1.137 -
   1.138 -  // Iteration
   1.139 -  void oops_do(OopClosure* f) {}
   1.140  };
   1.141  
   1.142  
   1.143 @@ -512,9 +456,6 @@
   1.144  
   1.145    // Typing
   1.146    bool is_exception_stub() const                 { return true; }
   1.147 -
   1.148 -  // Iteration
   1.149 -  void oops_do(OopClosure* f) {}
   1.150  };
   1.151  #endif // COMPILER2
   1.152  
   1.153 @@ -548,7 +489,4 @@
   1.154  
   1.155    // Typing
   1.156    bool is_safepoint_stub() const                 { return true; }
   1.157 -
   1.158 -  // Iteration
   1.159 -  void oops_do(OopClosure* f) {}
   1.160  };

mercurial