hotspot/src/share/vm/code/codeBlob.hpp
changeset 42064 a530dbabe64f
parent 42040 70ec5a09a0d5
child 42581 2fdb039ea5b5
--- a/hotspot/src/share/vm/code/codeBlob.hpp	Thu Sep 22 18:29:15 2016 +0200
+++ b/hotspot/src/share/vm/code/codeBlob.hpp	Wed Oct 05 15:20:35 2016 +0200
@@ -30,6 +30,7 @@
 #include "compiler/oopMap.hpp"
 #include "runtime/frame.hpp"
 #include "runtime/handles.hpp"
+#include "utilities/macros.hpp"
 
 // CodeBlob Types
 // Used in the CodeCache to assign CodeBlobs to different CodeHeaps
@@ -95,6 +96,7 @@
   bool                _caller_must_gc_arguments;
   CodeStrings         _strings;
   const char*         _name;
+  S390_ONLY(int       _ctable_offset;)
 
   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);
@@ -140,6 +142,12 @@
   address code_end() const            { return _code_end; }
   address data_end() const            { return _data_end;      }
 
+  // This field holds the beginning of the const section in the old code buffer.
+  // It is needed to fix relocations of pc-relative loads when resizing the
+  // the constant pool or moving it.
+  S390_ONLY(address ctable_begin() const { return header_begin() + _ctable_offset; })
+  void set_ctable_begin(address ctable) { S390_ONLY(_ctable_offset = ctable - header_begin();) }
+
   // Sizes
   int size() const                               { return _size; }
   int header_size() const                        { return _header_size; }