RFR: 8339299: C1 will miss type profile when inline final method [v3]
Vladimir Ivanov
vlivanov at openjdk.org
Fri Sep 6 19:30:05 UTC 2024
On Tue, 3 Sep 2024 06:30:00 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.
>
> kuaiwei has updated the pull request incrementally with one additional commit since the last revision:
>
> Simplify should_profile_receiver_type
Looks good.
-------------
Marked as reviewed by vlivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20786#pullrequestreview-2287023459
More information about the hotspot-compiler-dev
mailing list