src/share/vm/code/nmethod.hpp

Print this page
rev 2893 : 7121756: Improve C1 inlining policy by using profiling at call sites
Summary: profile based recompilation of methods with C1 with more inlining.
Reviewed-by:

@@ -167,10 +167,12 @@
   bool _speculatively_disconnected;          // Marked for potential unload
 
   bool _marked_for_reclamation;              // Used by NMethodSweeper (set only by sweeper)
   bool _marked_for_deoptimization;           // Used for stack deoptimization
 
+  bool _has_profiled_calls;                   // Any c1 profile call sites?
+
   // used by jvmti to track if an unload event has been posted for this nmethod.
   bool _unload_reported;
 
   // set during construction
   unsigned int _has_unsafe_access:1;         // May fault due to unsafe access.

@@ -220,10 +222,14 @@
   // JVMTI's GetLocalInstance() also uses these offsets to find the receiver
   // for non-static native wrapper frames.
   ByteSize _native_receiver_sp_offset;
   ByteSize _native_basic_lock_sp_offset;
 
+#ifdef COMPILER1
+  bool _needs_recomp;
+#endif
+
   friend class nmethodLocker;
 
   // For native wrappers
   nmethod(methodOop method,
           int nmethod_size,

@@ -430,10 +436,13 @@
   void  set_has_method_handle_invokes(bool z)     { _has_method_handle_invokes = z; }
 
   bool  is_speculatively_disconnected() const     { return _speculatively_disconnected; }
   void  set_speculatively_disconnected(bool z)     { _speculatively_disconnected = z; }
 
+  bool  has_profiled_calls() const                { return _has_profiled_calls; }
+  void  set_has_profiled_calls(bool z)            { _has_profiled_calls = z; }
+
   int   comp_level() const                        { return _comp_level; }
 
   // Support for oops in scopes and relocs:
   // Note: index 0 is reserved for null.
   oop   oop_at(int index) const                   { return index == 0 ? (oop) NULL: *oop_addr_at(index); }

@@ -510,10 +519,16 @@
   void cleanup_inline_caches();
   bool inlinecache_check_contains(address addr) const {
     return (addr >= code_begin() && addr < verified_entry_point());
   }
 
+#ifdef COMPILER1
+  // recompilation with c1
+  bool needs_recomp() const { return _needs_recomp; }
+  void set_needs_recomp(bool v) { _needs_recomp = v; }
+#endif
+
   // unlink and deallocate this nmethod
   // Only NMethodSweeper class is expected to use this. NMethodSweeper is not
   // expected to use any other private methods/data in this class.
 
  protected:

@@ -592,10 +607,12 @@
   static address get_deopt_original_pc(const frame* fr);
 
   // MethodHandle
   bool is_method_handle_return(address return_pc);
 
+  bool is_profiled_call(address call_pc);
+
   // jvmti support:
   void post_compiled_method_load_event();
   jmethodID get_and_cache_jmethod_id();
 
   // verify operations