src/hotspot/share/code/compiledMethod.hpp
changeset 52660 9cb53c505acd
parent 52659 8b26bd8b1832
child 52781 436097b038a1
--- a/src/hotspot/share/code/compiledMethod.hpp	Thu Nov 22 09:46:24 2018 +0100
+++ b/src/hotspot/share/code/compiledMethod.hpp	Thu Nov 22 09:55:44 2018 +0100
@@ -169,6 +169,8 @@
   PcDescContainer _pc_desc_container;
   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);
@@ -177,6 +179,11 @@
 public:
   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; }