src/hotspot/share/runtime/deoptimization.hpp
changeset 50623 5209d8a6303e
parent 49480 d7df2dd501ce
child 53149 259c36ef27df
equal deleted inserted replaced
50622:21b96ce2ed10 50623:5209d8a6303e
    39  public:
    39  public:
    40   // What condition caused the deoptimization?
    40   // What condition caused the deoptimization?
    41   enum DeoptReason {
    41   enum DeoptReason {
    42     Reason_many = -1,             // indicates presence of several reasons
    42     Reason_many = -1,             // indicates presence of several reasons
    43     Reason_none = 0,              // indicates absence of a relevant deopt.
    43     Reason_none = 0,              // indicates absence of a relevant deopt.
    44     // Next 7 reasons are recorded per bytecode in DataLayout::trap_bits.
    44     // Next 8 reasons are recorded per bytecode in DataLayout::trap_bits.
    45     // This is more complicated for JVMCI as JVMCI may deoptimize to *some* bytecode before the
    45     // This is more complicated for JVMCI as JVMCI may deoptimize to *some* bytecode before the
    46     // bytecode that actually caused the deopt (with inlining, JVMCI may even deoptimize to a
    46     // bytecode that actually caused the deopt (with inlining, JVMCI may even deoptimize to a
    47     // bytecode in another method):
    47     // bytecode in another method):
    48     //  - bytecode y in method b() causes deopt
    48     //  - bytecode y in method b() causes deopt
    49     //  - JVMCI deoptimizes to bytecode x in method a()
    49     //  - JVMCI deoptimizes to bytecode x in method a()
    59 #if INCLUDE_JVMCI
    59 #if INCLUDE_JVMCI
    60     Reason_unreached0             = Reason_null_assert,
    60     Reason_unreached0             = Reason_null_assert,
    61     Reason_type_checked_inlining  = Reason_intrinsic,
    61     Reason_type_checked_inlining  = Reason_intrinsic,
    62     Reason_optimized_type_check   = Reason_bimorphic,
    62     Reason_optimized_type_check   = Reason_bimorphic,
    63 #endif
    63 #endif
       
    64 
       
    65     Reason_profile_predicate,     // compiler generated predicate moved from frequent branch in a loop failed
    64 
    66 
    65     // recorded per method
    67     // recorded per method
    66     Reason_unloaded,              // unloaded class or constant pool entry
    68     Reason_unloaded,              // unloaded class or constant pool entry
    67     Reason_uninitialized,         // bad class state (uninitialized)
    69     Reason_uninitialized,         // bad class state (uninitialized)
    68     Reason_unreached,             // code is not reached, compiler
    70     Reason_unreached,             // code is not reached, compiler
    90     // Related to MethodData::_trap_hist_limit where Reason_tenured isn't included
    92     // Related to MethodData::_trap_hist_limit where Reason_tenured isn't included
    91     Reason_tenured,               // age of the code has reached the limit
    93     Reason_tenured,               // age of the code has reached the limit
    92     Reason_LIMIT,
    94     Reason_LIMIT,
    93 
    95 
    94     // Note:  Keep this enum in sync. with _trap_reason_name.
    96     // Note:  Keep this enum in sync. with _trap_reason_name.
    95     Reason_RECORDED_LIMIT = Reason_bimorphic  // some are not recorded per bc
    97     Reason_RECORDED_LIMIT = Reason_profile_predicate  // some are not recorded per bc
    96     // Note:  Reason_RECORDED_LIMIT should be < 8 to fit into 3 bits of
    98     // Note:  Reason_RECORDED_LIMIT should fit into 31 bits of
    97     // DataLayout::trap_bits.  This dependency is enforced indirectly
    99     // DataLayout::trap_bits.  This dependency is enforced indirectly
    98     // via asserts, to avoid excessive direct header-to-header dependencies.
   100     // via asserts, to avoid excessive direct header-to-header dependencies.
    99     // See Deoptimization::trap_state_reason and class DataLayout.
   101     // See Deoptimization::trap_state_reason and class DataLayout.
   100   };
   102   };
   101 
   103