src/share/vm/runtime/deoptimization.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp-hsx Sdiff src/share/vm/runtime

src/share/vm/runtime/deoptimization.hpp

Print this page




  30 
  31 class ProfileData;
  32 class vframeArray;
  33 class MonitorValue;
  34 class ObjectValue;
  35 
  36 class Deoptimization : AllStatic {
  37  public:
  38   // What condition caused the deoptimization?
  39   enum DeoptReason {
  40     Reason_many = -1,             // indicates presence of several reasons
  41     Reason_none = 0,              // indicates absence of a relevant deopt.
  42     // Next 7 reasons are recorded per bytecode in DataLayout::trap_bits
  43     Reason_null_check,            // saw unexpected null or zero divisor (@bci)
  44     Reason_null_assert,           // saw unexpected non-null or non-zero (@bci)
  45     Reason_range_check,           // saw unexpected array index (@bci)
  46     Reason_class_check,           // saw unexpected object class (@bci)
  47     Reason_array_check,           // saw unexpected array class (aastore @bci)
  48     Reason_intrinsic,             // saw unexpected operand to intrinsic (@bci)
  49     Reason_bimorphic,             // saw unexpected object class in bimorphic inlining (@bci)


  50 
  51     Reason_unloaded,              // unloaded class or constant pool entry
  52     Reason_uninitialized,         // bad class state (uninitialized)
  53     Reason_unreached,             // code is not reached, compiler
  54     Reason_unhandled,             // arbitrary compiler limitation
  55     Reason_constraint,            // arbitrary runtime constraint violated
  56     Reason_div0_check,            // a null_check due to division by zero
  57     Reason_age,                   // nmethod too old; tier threshold reached
  58     Reason_predicate,             // compiler generated predicate failed
  59     Reason_loop_limit_check,      // compiler generated loop limits check failed
  60     Reason_LIMIT,
  61     // Note:  Keep this enum in sync. with _trap_reason_name.
  62     Reason_RECORDED_LIMIT = Reason_bimorphic  // some are not recorded per bc
  63     // Note:  Reason_RECORDED_LIMIT should be < 8 to fit into 3 bits of
  64     // DataLayout::trap_bits.  This dependency is enforced indirectly
  65     // via asserts, to avoid excessive direct header-to-header dependencies.
  66     // See Deoptimization::trap_state_reason and class DataLayout.
  67   };
  68 
  69   // What action must be taken by the runtime?
  70   enum DeoptAction {
  71     Action_none,                  // just interpret, do not invalidate nmethod
  72     Action_maybe_recompile,       // recompile the nmethod; need not invalidate
  73     Action_reinterpret,           // invalidate the nmethod, reset IC, maybe recompile
  74     Action_make_not_entrant,      // invalidate the nmethod, recompile (probably)
  75     Action_make_not_compilable,   // invalidate the nmethod and do not compile
  76     Action_LIMIT
  77     // Note:  Keep this enum in sync. with _trap_action_name.
  78   };
  79 
  80   enum {
  81     _action_bits = 3,
  82     _reason_bits = 5,
  83     _action_shift = 0,




  30 
  31 class ProfileData;
  32 class vframeArray;
  33 class MonitorValue;
  34 class ObjectValue;
  35 
  36 class Deoptimization : AllStatic {
  37  public:
  38   // What condition caused the deoptimization?
  39   enum DeoptReason {
  40     Reason_many = -1,             // indicates presence of several reasons
  41     Reason_none = 0,              // indicates absence of a relevant deopt.
  42     // Next 7 reasons are recorded per bytecode in DataLayout::trap_bits
  43     Reason_null_check,            // saw unexpected null or zero divisor (@bci)
  44     Reason_null_assert,           // saw unexpected non-null or non-zero (@bci)
  45     Reason_range_check,           // saw unexpected array index (@bci)
  46     Reason_class_check,           // saw unexpected object class (@bci)
  47     Reason_array_check,           // saw unexpected array class (aastore @bci)
  48     Reason_intrinsic,             // saw unexpected operand to intrinsic (@bci)
  49     Reason_bimorphic,             // saw unexpected object class in bimorphic inlining (@bci)
  50     Reason_unhandled,             // arbitrary compiler limitation
  51 
  52 
  53     Reason_unloaded,              // unloaded class or constant pool entry
  54     Reason_uninitialized,         // bad class state (uninitialized)
  55     Reason_unreached,             // code is not reached, compiler

  56     Reason_constraint,            // arbitrary runtime constraint violated
  57     Reason_div0_check,            // a null_check due to division by zero
  58     Reason_age,                   // nmethod too old; tier threshold reached
  59     Reason_predicate,             // compiler generated predicate failed
  60     Reason_loop_limit_check,      // compiler generated loop limits check failed
  61     Reason_LIMIT,
  62     // Note:  Keep this enum in sync. with _trap_reason_name.
  63     Reason_RECORDED_LIMIT = Reason_unhandled  // some are not recorded per bc
  64     // Note:  Reason_RECORDED_LIMIT should be < 16 to fit into 4 bits of
  65     // DataLayout::trap_bits.  This dependency is enforced indirectly
  66     // via asserts, to avoid excessive direct header-to-header dependencies.
  67     // See Deoptimization::trap_state_reason and class DataLayout.
  68   };
  69 
  70   // What action must be taken by the runtime?
  71   enum DeoptAction {
  72     Action_none,                  // just interpret, do not invalidate nmethod
  73     Action_maybe_recompile,       // recompile the nmethod; need not invalidate
  74     Action_reinterpret,           // invalidate the nmethod, reset IC, maybe recompile
  75     Action_make_not_entrant,      // invalidate the nmethod, recompile (probably)
  76     Action_make_not_compilable,   // invalidate the nmethod and do not compile
  77     Action_LIMIT
  78     // Note:  Keep this enum in sync. with _trap_action_name.
  79   };
  80 
  81   enum {
  82     _action_bits = 3,
  83     _reason_bits = 5,
  84     _action_shift = 0,


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