[lworld] Integrated: 8366973: [lworld] Deopt/recompilation cycle due to call to method with unloaded return type
Tobias Hartmann
thartmann at openjdk.org
Tue Sep 9 14:49:20 UTC 2025
On Tue, 9 Sep 2025 08:38:06 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
> In some benchmarks we hit an endless deopt/recompilation cycle because of this bailout in C2 when we compile a method with an unloaded return type:
> https://github.com/openjdk/valhalla/blob/858be30119bd5bc37a69d16042523f53bea71a36/src/hotspot/share/ci/ciTypeFlow.cpp#L766-L772
>
> It's a regression / limitation from [JDK-8301007](https://bugs.openjdk.org/browse/JDK-8301007) that I had planned to fix later with [JDK-8284443](https://bugs.openjdk.org/browse/JDK-8284443) because I thought it wouldn't have an impact on performance. Turns out it does, so I'll fix it with this issue similar to what we do in `PhaseMacroExpand::expand_mh_intrinsic_return`.
>
> For testing, I added a new `PreloadClasses` debug flag that's enabled by default. Disabling it will disable preloading of all classes from the LoadableDescriptors attributes. Running testing with this caught some more issues that I fixed in this PR as well. I'll add it to our (internal) stress testing job separately.
>
> I also fixed some inconsistency in the preload logging and adjusted the corresponding tests.
>
> Thanks,
> Tobias
This pull request has now been integrated.
Changeset: 9014ec21
Author: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/valhalla/commit/9014ec219423a83cf1fb63c496b86fca05c40a8f
Stats: 319 lines in 27 files changed: 207 ins; 18 del; 94 mod
8366973: [lworld] Deopt/recompilation cycle due to call to method with unloaded return type
-------------
PR: https://git.openjdk.org/valhalla/pull/1554
More information about the valhalla-dev
mailing list