< prev index next >

src/hotspot/share/code/relocInfo.hpp

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_CODE_RELOCINFO_HPP
  26 #define SHARE_VM_CODE_RELOCINFO_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/os.hpp"
  30 #include "utilities/macros.hpp"
  31 
  32 class nmethod;
  33 class CompiledMethod;
  34 class Metadata;
  35 class NativeMovConstReg;
  36 
  37 // Types in this file:
  38 //    relocInfo
  39 //      One element of an array of halfwords encoding compressed relocations.
  40 //      Also, the source of relocation types (relocInfo::oop_type, ...).
  41 //    Relocation
  42 //      A flyweight object representing a single relocation.
  43 //      It is fully unpacked from the compressed relocation array.
  44 //    metadata_Relocation, ... (subclasses of Relocation)
  45 //      The location of some type-specific operations (metadata_addr, ...).
  46 //      Also, the source of relocation specs (metadata_Relocation::spec, ...).
  47 //    oop_Relocation, ... (subclasses of Relocation)
  48 //      oops in the code stream (strings, class loaders)
  49 //      Also, the source of relocation specs (oop_Relocation::spec, ...).
  50 //    RelocationHolder
  51 //      A ValueObj type which acts as a union holding a Relocation object.
  52 //      Represents a relocation spec passed into a CodeBuffer during assembly.
  53 //    RelocIterator
  54 //      A StackObj which iterates over the relocations associated with
  55 //      a range of code addresses.  Can be used to operate a copy of code.
  56 //    BoundRelocation
  57 //      An _internal_ type shared by packers and unpackers of relocations.
  58 //      It pastes together a RelocationHolder with some pointers into
  59 //      code and relocInfo streams.
  60 
  61 
  62 // Notes on relocType:
  63 //
  64 // These hold enough information to read or write a value embedded in
  65 // the instructions of an CodeBlob.  They're used to update:
  66 //
  67 //   1) embedded oops     (isOop()          == true)
  68 //   2) inline caches     (isIC()           == true)
  69 //   3) runtime calls     (isRuntimeCall()  == true)
  70 //   4) internal word ref (isInternalWord() == true)
  71 //   5) external word ref (isExternalWord() == true)




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_CODE_RELOCINFO_HPP
  26 #define SHARE_VM_CODE_RELOCINFO_HPP
  27 

  28 #include "runtime/os.hpp"
  29 #include "utilities/macros.hpp"
  30 
  31 class nmethod;
  32 class CompiledMethod;
  33 class Metadata;
  34 class NativeMovConstReg;
  35 
  36 // Types in this file:
  37 //    relocInfo
  38 //      One element of an array of halfwords encoding compressed relocations.
  39 //      Also, the source of relocation types (relocInfo::oop_type, ...).
  40 //    Relocation
  41 //      A flyweight object representing a single relocation.
  42 //      It is fully unpacked from the compressed relocation array.
  43 //    metadata_Relocation, ... (subclasses of Relocation)
  44 //      The location of some type-specific operations (metadata_addr, ...).
  45 //      Also, the source of relocation specs (metadata_Relocation::spec, ...).
  46 //    oop_Relocation, ... (subclasses of Relocation)
  47 //      oops in the code stream (strings, class loaders)
  48 //      Also, the source of relocation specs (oop_Relocation::spec, ...).
  49 //    RelocationHolder
  50 //      A value type which acts as a union holding a Relocation object.
  51 //      Represents a relocation spec passed into a CodeBuffer during assembly.
  52 //    RelocIterator
  53 //      A StackObj which iterates over the relocations associated with
  54 //      a range of code addresses.  Can be used to operate a copy of code.
  55 //    BoundRelocation
  56 //      An _internal_ type shared by packers and unpackers of relocations.
  57 //      It pastes together a RelocationHolder with some pointers into
  58 //      code and relocInfo streams.
  59 
  60 
  61 // Notes on relocType:
  62 //
  63 // These hold enough information to read or write a value embedded in
  64 // the instructions of an CodeBlob.  They're used to update:
  65 //
  66 //   1) embedded oops     (isOop()          == true)
  67 //   2) inline caches     (isIC()           == true)
  68 //   3) runtime calls     (isRuntimeCall()  == true)
  69 //   4) internal word ref (isInternalWord() == true)
  70 //   5) external word ref (isExternalWord() == true)


< prev index next >