RFR: 8339299: C1 will miss type profile when inline final method
Vladimir Ivanov
vlivanov at openjdk.org
Fri Aug 30 22:41:18 UTC 2024
On Fri, 30 Aug 2024 07:25:59 GMT, kuaiwei <duke at openjdk.org> wrote:
> I found sometimes C1 will miss type profile and I tried to write a test to demonstrate it.
> It will happen with these conditions
> 1 It's a virtual call and the callee is a final method. So c1 will think it's static bound.
> 2 The interpreter never touch the callsite, so interpreter does not add type profile.
> 3 In c1 compilation, it will be inlined based on CHA.
> 4 In c2 compilation, the CHA is broken, but type profile is missing, so c2 can not inline it.
test/hotspot/jtreg/compiler/cha/cha_control.txt line 1:
> 1: [
Currently, the prevalent way to specify compiler directives is through WhiteBox API at runtime (through `WhiteBox.addCompilerDirective(String directive)`). Please, follow the same pattern here. I find it more convenient to reason about test logic when all the pieces are present in a single place.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20786#discussion_r1739488135
More information about the hotspot-compiler-dev
mailing list