Skip to content

Commit

Permalink
JDK-8333098
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Aug 16, 2024
1 parent ddbc0b6 commit 370f876
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/hotspot/share/opto/bytecodeInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -315,7 +315,13 @@ 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 = MAX2(MinInlineFrequencyRatio, 1.0 / CompilationPolicy::min_invocations());
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);
}

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

0 comments on commit 370f876

Please sign in to comment.