RFR: 8339299: C1 will miss type profile when inline final method

Vladimir Ivanov vlivanov at openjdk.org
Fri Aug 30 23:06:22 UTC 2024


On Fri, 30 Aug 2024 22:34:35 GMT, Dean Long <dlong at openjdk.org> wrote:

>> IMO a better option is to simply drop `can_be_statically_bound()` check here. As this bug demonstrates, selected method at call site (represented by `_profiled_callee`) is not an accurate representation of call site behavior.
>> 
>> Instead, to keep things simple, a check for private methods (which don't participate in virtual dispatch) can be introduced.
>
> Would it be more appropriate to use can_be_statically_bound(ciInstanceKlass* context) here, where in this case _profiled_callee is Child1 and context is Parent?

That's definitely an option, but then you need to determine the context. Do you propose to use declared method holder as a context here?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20786#discussion_r1739499938


More information about the hotspot-compiler-dev mailing list