RFR: 8335843: C2 hits assert(_print_inlining_stream->size() > 0) failed: missing inlining msg
Tobias Hartmann
thartmann at openjdk.org
Thu Jul 18 11:23:38 UTC 2024
On Thu, 18 Jul 2024 08:14:02 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> This is similar to 8327741 but for method handle calls. When a method
> handle call can be resolved late so it can't be inlined but the target
> of the call is changed, no new inlining message is produced. The fix I
> propose is similar to the fix for 8327741. I also made a small change
> to the fix for 8327741 so `PrintInlining` now reports the resolved
> method. With:
>
>
> static class A {
> void m() {
>
> }
> }
>
> static class B extends A {
> void m() {
>
> }
> }
>
>
> If the virtual call to `A.m()` is resolved to a call to
> `B.m()`. Before this change, the `PrintInlining` output reports a call
> to `A.m()` and now it reports the actual target `B.m()`.
Nice test. The fix looks good to me otherwise. I submitted some testing and will report back once it passed.
test/hotspot/jtreg/compiler/print/TestPrintInliningLateVirtualCall.java line 49:
> 47: a = fieldB;
> 48: } else if (i > 10) {
> 49: a = fieldA;
Why do you need these changes?
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20230#pullrequestreview-2185537376
PR Review Comment: https://git.openjdk.org/jdk/pull/20230#discussion_r1682669687
More information about the hotspot-compiler-dev
mailing list