RFR: 8335843: C2 hits assert(_print_inlining_stream->size() > 0) failed: missing inlining msg

Roland Westrelin roland at openjdk.org
Thu Jul 18 08:20:02 UTC 2024


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()`.

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

Commit messages:
 - test & fix

Changes: https://git.openjdk.org/jdk/pull/20230/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20230&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8335843
  Stats: 88 lines in 3 files changed: 85 ins; 2 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/20230.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20230/head:pull/20230

PR: https://git.openjdk.org/jdk/pull/20230


More information about the hotspot-compiler-dev mailing list