src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/compile.cpp	Mon Jan 20 11:14:23 2014
--- new/src/share/vm/opto/compile.cpp	Mon Jan 20 11:14:23 2014

*** 3270,3280 **** --- 3270,3281 ---- if (md->is_empty()) { // Assume the trap has not occurred, or that it occurred only // because of a transient condition during start-up in the interpreter. return false; } if (md->has_trap_at(bci, reason) != 0) { + ciMethod* m = Deoptimization::reason_is_speculate(reason) ? this->method() : NULL; + if (md->has_trap_at(bci, m, reason) != 0) { // Assume PerBytecodeTrapLimit==0, for a more conservative heuristic. // Also, if there are multiple reasons, or if there is no per-BCI record, // assume the worst. if (log()) log()->elem("observe trap='%s' count='%d'",
*** 3288,3298 **** --- 3289,3299 ---- } // Less-accurate variant which does not require a method and bci. bool Compile::too_many_traps(Deoptimization::DeoptReason reason, ciMethodData* logmd) { ! if (trap_count(reason) >= (uint)PerMethodTrapLimit) { ! if (trap_count(reason) >= Deoptimization::per_method_trap_limit(reason)) { // Too many traps globally. // Note that we use cumulative trap_count, not just md->trap_count. if (log()) { int mcount = (logmd == NULL)? -1: (int)logmd->trap_count(reason); log()->elem("observe trap='%s' count='0' mcount='%d' ccount='%d'",
*** 3323,3336 **** --- 3324,3338 ---- // Pick a cutoff point well within PerBytecodeRecompilationCutoff. uint bc_cutoff = (uint) PerBytecodeRecompilationCutoff / 8; uint m_cutoff = (uint) PerMethodRecompilationCutoff / 2 + 1; // not zero Deoptimization::DeoptReason per_bc_reason = Deoptimization::reason_recorded_per_bytecode_if_any(reason); + ciMethod* m = Deoptimization::reason_is_speculate(reason) ? this->method() : NULL; if ((per_bc_reason == Deoptimization::Reason_none ! || md->has_trap_at(bci, m, reason) != 0) // The trap frequency measure we care about is the recompile count: ! && md->trap_recompiled_at(bci, m) && md->overflow_recompile_count() >= bc_cutoff) { // Do not emit a trap here if it has already caused recompilations. // Also, if there are multiple reasons, or if there is no per-BCI record, // assume the worst. if (log())

src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File