< prev index next >

src/hotspot/share/oops/methodCounters.hpp

Print this page
*** 28,10 ***
--- 28,11 ---
  #include "compiler/compilerDefinitions.hpp"
  #include "interpreter/invocationCounter.hpp"
  #include "oops/metadata.hpp"
  #include "utilities/align.hpp"
  
+ class AOTCodeEntry;
  class MethodTrainingData;
  
  class MethodCounters : public Metadata {
   friend class VMStructs;
   friend class JVMCIVMStructs;

*** 47,15 ***
--- 48,21 ---
  
    // Back pointer to the Method*
    Method* _method;
  
    Metadata*         _method_training_data;
+ #if INCLUDE_CDS
+   AOTCodeEntry*     _aot_preload_code_entry;      // AOT Code Cache entry for preload code
+ #endif
    jlong             _prev_time;                   // Previous time the rate was acquired
    float             _rate;                        // Events (invocation and backedge counter increments) per millisecond
    int               _invoke_mask;                 // per-method Tier0InvokeNotifyFreqLog
    int               _backedge_mask;               // per-method Tier0BackedgeNotifyFreqLog
    int               _prev_event_count;            // Total number of events saved at previous callback
+ #if INCLUDE_CDS
+   int               _aot_code_invocation_count;   // AP4 and A4 AOT code invocations count
+ #endif
  #if COMPILER2_OR_JVMCI
    u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
  #endif
  #if INCLUDE_JVMTI
    u2                _number_of_breakpoints;      // fullspeed debugging support

*** 70,11 ***
    virtual bool is_methodCounters() const { return true; }
    Method* method() const { return _method; }
    static MethodCounters* allocate_no_exception(const methodHandle& mh);
    static MethodCounters* allocate_with_exception(const methodHandle& mh, TRAPS);
  
!   void deallocate_contents(ClassLoaderData* loader_data) {}
  
    static int method_counters_size() {
      return align_up((int)sizeof(MethodCounters), wordSize) / wordSize;
    }
    virtual int size() const {
--- 77,11 ---
    virtual bool is_methodCounters() const { return true; }
    Method* method() const { return _method; }
    static MethodCounters* allocate_no_exception(const methodHandle& mh);
    static MethodCounters* allocate_with_exception(const methodHandle& mh, TRAPS);
  
!   void deallocate_contents(ClassLoaderData* loader_data) NOT_CDS_RETURN;
  
    static int method_counters_size() {
      return align_up((int)sizeof(MethodCounters), wordSize) / wordSize;
    }
    virtual int size() const {

*** 164,10 ***
--- 171,23 ---
      }
      return false;
    }
  
  #if INCLUDE_CDS
+   static ByteSize aot_code_invocation_counter_offset()  {
+     return byte_offset_of(MethodCounters, _aot_code_invocation_count);
+   }
+ 
+   int  aot_code_invocation_count() const         { return _aot_code_invocation_count;}
+   void set_aot_code_invocation_count(int count)  { _aot_code_invocation_count = count; }
+   bool aot_code_recompile_requested() const      { return (_aot_code_invocation_count & 1) != 0;}
+ 
+   void set_aot_preload_code_entry(AOTCodeEntry* entry);
+   AOTCodeEntry* aot_preload_code_entry() const   {
+     return _aot_preload_code_entry;
+   }
+ 
    void remove_unshareable_info();
    void restore_unshareable_info(TRAPS);
  #endif
  
    // Printing
< prev index next >