Integrated: 8275868: ciReplay: Inlining fails with "unloaded signature classes" due to wrong protection domains
Christian Hagedorn
chagedorn at openjdk.java.net
Mon Nov 1 08:26:25 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
This pull request has now been integrated.
Changeset: 5bb1992b
Author: Christian Hagedorn <chagedorn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/5bb1992b8408a0d196b1afa308bc00d007458dbd
Stats: 438 lines in 5 files changed: 434 ins; 0 del; 4 mod
8275868: ciReplay: Inlining fails with "unloaded signature classes" due to wrong protection domains
Reviewed-by: kvn, dlong, thartmann
-------------
PR: https://git.openjdk.java.net/jdk/pull/6159
More information about the hotspot-compiler-dev
mailing list