hotspot/src/share/vm/opto/compile.cpp
changeset 31228 8e427370cdd1
parent 30624 2e1803c8a26d
child 32082 2a3323e25de1
equal deleted inserted replaced
31133:3e7542b42a61 31228:8e427370cdd1
  3388 // Report if there are too many traps at the current method and bci.
  3388 // Report if there are too many traps at the current method and bci.
  3389 // Return true if there was a trap, and/or PerMethodTrapLimit is exceeded.
  3389 // Return true if there was a trap, and/or PerMethodTrapLimit is exceeded.
  3390 bool Compile::too_many_traps(ciMethod* method,
  3390 bool Compile::too_many_traps(ciMethod* method,
  3391                              int bci,
  3391                              int bci,
  3392                              Deoptimization::DeoptReason reason) {
  3392                              Deoptimization::DeoptReason reason) {
  3393   if (method->has_injected_profile()) {
       
  3394     return false;
       
  3395   }
       
  3396   ciMethodData* md = method->method_data();
  3393   ciMethodData* md = method->method_data();
  3397   if (md->is_empty()) {
  3394   if (md->is_empty()) {
  3398     // Assume the trap has not occurred, or that it occurred only
  3395     // Assume the trap has not occurred, or that it occurred only
  3399     // because of a transient condition during start-up in the interpreter.
  3396     // because of a transient condition during start-up in the interpreter.
  3400     return false;
  3397     return false;
  3440 // Is not eager to return true, since this will cause the compiler to use
  3437 // Is not eager to return true, since this will cause the compiler to use
  3441 // Action_none for a trap point, to avoid too many recompilations.
  3438 // Action_none for a trap point, to avoid too many recompilations.
  3442 bool Compile::too_many_recompiles(ciMethod* method,
  3439 bool Compile::too_many_recompiles(ciMethod* method,
  3443                                   int bci,
  3440                                   int bci,
  3444                                   Deoptimization::DeoptReason reason) {
  3441                                   Deoptimization::DeoptReason reason) {
  3445   if (method->has_injected_profile()) {
       
  3446     return false;
       
  3447   }
       
  3448   ciMethodData* md = method->method_data();
  3442   ciMethodData* md = method->method_data();
  3449   if (md->is_empty()) {
  3443   if (md->is_empty()) {
  3450     // Assume the trap has not occurred, or that it occurred only
  3444     // Assume the trap has not occurred, or that it occurred only
  3451     // because of a transient condition during start-up in the interpreter.
  3445     // because of a transient condition during start-up in the interpreter.
  3452     return false;
  3446     return false;