Skip to content

Commit

Permalink
add suggestion from Dean Long
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Aug 20, 2024
1 parent 370f876 commit daa9ebf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/hotspot/share/opto/bytecodeInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,8 @@ bool InlineTree::should_not_inline(ciMethod* callee_method, ciMethod* caller_met
int invoke_count = caller_method->interpreter_invocation_count();
assert(invoke_count != 0, "require invocation count greater than zero");
double freq = (double)call_site_count / (double)invoke_count;
double min_freq = 0.0;
int cp_min_inv = CompilationPolicy::min_invocations();
if (cp_min_inv == 0) {
min_freq = MinInlineFrequencyRatio;
} else {
min_freq = MAX2(MinInlineFrequencyRatio, 1.0 / cp_min_inv);
}
int cp_min_inv = MAX2(1, CompilationPolicy::min_invocations());
double min_freq = MAX2(MinInlineFrequencyRatio, 1.0 / cp_min_inv);

if (freq < min_freq) {
set_msg("low call site frequency");
Expand Down

0 comments on commit daa9ebf

Please sign in to comment.