src/share/vm/oops/methodCounters.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8078554 Sdiff src/share/vm/oops

src/share/vm/oops/methodCounters.hpp

Print this page




  25 #ifndef SHARE_VM_OOPS_METHODCOUNTERS_HPP
  26 #define SHARE_VM_OOPS_METHODCOUNTERS_HPP
  27 
  28 #include "oops/metadata.hpp"
  29 #include "compiler/compilerOracle.hpp"
  30 #include "interpreter/invocationCounter.hpp"
  31 #include "runtime/arguments.hpp"
  32 
  33 class MethodCounters: public MetaspaceObj {
  34  friend class VMStructs;
  35  private:
  36   int               _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered)
  37   u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
  38   u2                _number_of_breakpoints;      // fullspeed debugging support
  39   InvocationCounter _invocation_counter;         // Incremented before each activation of the method - used to trigger frequency-based optimizations
  40   InvocationCounter _backedge_counter;           // Incremented before each backedge taken - used to trigger frequencey-based optimizations
  41   // NMethod age is a counter for warm methods detection in the code cache sweeper.
  42   // The counter is reset by the sweeper and is decremented by some of the compiled
  43   // code. The counter values are interpreted as follows:
  44   // 1. (HotMethodDetection..INT_MAX] - initial value, no counters inserted
  45   // 2. (1..HotMethodDetectionLimit)  - the method is warm, the counter is used
  46   //                                    to figure out which methods can be flushed.
  47   // 3. (INT_MIN..0]                  - method is hot and will deopt and get
  48   //                                    recompiled without the counters
  49   int               _nmethod_age;
  50   int               _interpreter_invocation_limit;        // per-method InterpreterInvocationLimit
  51   int               _interpreter_backward_branch_limit;   // per-method InterpreterBackwardBranchLimit
  52   int               _interpreter_profile_limit;           // per-method InterpreterProfileLimit
  53   int               _invoke_mask;                         // per-method Tier0InvokeNotifyFreqLog
  54   int               _backedge_mask;                       // per-method Tier0BackedgeNotifyFreqLog
  55 #ifdef TIERED
  56   float             _rate;                        // Events (invocation and backedge counter increments) per millisecond
  57   jlong             _prev_time;                   // Previous time the rate was acquired
  58   u1                _highest_comp_level;          // Highest compile level this method has ever seen.
  59   u1                _highest_osr_comp_level;      // Same for OSR level
  60 #endif
  61 
  62   MethodCounters(methodHandle mh) : _interpreter_invocation_count(0),
  63                                     _interpreter_throwout_count(0),
  64                                     _number_of_breakpoints(0),
  65                                     _nmethod_age(INT_MAX)




  25 #ifndef SHARE_VM_OOPS_METHODCOUNTERS_HPP
  26 #define SHARE_VM_OOPS_METHODCOUNTERS_HPP
  27 
  28 #include "oops/metadata.hpp"
  29 #include "compiler/compilerOracle.hpp"
  30 #include "interpreter/invocationCounter.hpp"
  31 #include "runtime/arguments.hpp"
  32 
  33 class MethodCounters: public MetaspaceObj {
  34  friend class VMStructs;
  35  private:
  36   int               _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered)
  37   u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
  38   u2                _number_of_breakpoints;      // fullspeed debugging support
  39   InvocationCounter _invocation_counter;         // Incremented before each activation of the method - used to trigger frequency-based optimizations
  40   InvocationCounter _backedge_counter;           // Incremented before each backedge taken - used to trigger frequencey-based optimizations
  41   // NMethod age is a counter for warm methods detection in the code cache sweeper.
  42   // The counter is reset by the sweeper and is decremented by some of the compiled
  43   // code. The counter values are interpreted as follows:
  44   // 1. (HotMethodDetection..INT_MAX] - initial value, no counters inserted
  45   // 2. [1..HotMethodDetectionLimit)  - the method is warm, the counter is used
  46   //                                    to figure out which methods can be flushed.
  47   // 3. (INT_MIN..0]                  - method is hot and will deopt and get
  48   //                                    recompiled without the counters
  49   int               _nmethod_age;
  50   int               _interpreter_invocation_limit;        // per-method InterpreterInvocationLimit
  51   int               _interpreter_backward_branch_limit;   // per-method InterpreterBackwardBranchLimit
  52   int               _interpreter_profile_limit;           // per-method InterpreterProfileLimit
  53   int               _invoke_mask;                         // per-method Tier0InvokeNotifyFreqLog
  54   int               _backedge_mask;                       // per-method Tier0BackedgeNotifyFreqLog
  55 #ifdef TIERED
  56   float             _rate;                        // Events (invocation and backedge counter increments) per millisecond
  57   jlong             _prev_time;                   // Previous time the rate was acquired
  58   u1                _highest_comp_level;          // Highest compile level this method has ever seen.
  59   u1                _highest_osr_comp_level;      // Same for OSR level
  60 #endif
  61 
  62   MethodCounters(methodHandle mh) : _interpreter_invocation_count(0),
  63                                     _interpreter_throwout_count(0),
  64                                     _number_of_breakpoints(0),
  65                                     _nmethod_age(INT_MAX)


src/share/vm/oops/methodCounters.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File