RFR: 8275868: ciReplay: Inlining fails with "unloaded signature classes" due to wrong protection domains
Christian Hagedorn
chagedorn at openjdk.java.net
Fri Oct 29 07:28:12 UTC 2021
On Thu, 28 Oct 2021 15:01:03 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
> Replay compilation can fail to inline a method which was inlined in the normal run due to unresolved classes in the signature of an inlinee. The reason is that ciReplay is not resolving Java API classes with the protection domain of the holder class of the method to be replay compiled. Compiler replay is currently only resolving classes without a protection domain (i.e. an empty handle):
> https://github.com/openjdk/jdk/blob/593401fe8b38bbb8d331a862818fe077af157fcb/src/hotspot/share/ci/ciReplay.cpp#L139-L142
>
> A more detailed description can be found in the description of [JDK-8275868](https://bugs.openjdk.java.net/browse/JDK-8275868).
>
> This patch fixes that and takes the protection domain of the holder class of the method to be compiled to resolve all other classes used for ciReplay. The unloaded classes check is done in `ciMethod::has_unloaded_classes_in_signature()` and bypasses the whitelist introduced by JDK-8262912. However, this is fine since the inlining decision is enforced by the inlining information in the replay file.
>
> To test the various scenarios mentioned in the description of JDK-8275868, I've added some support to use `DumpReplay` to not require a crash. I parse the inlining information from the hotspot log file to check that ciReplay applies the same inlining decisions as the normal run.
>
> Thanks,
> Christian
Thanks Vladimir and Dean for your reviews!
-------------
PR: https://git.openjdk.java.net/jdk/pull/6159
More information about the hotspot-compiler-dev
mailing list