On Fri, 20 Mar 2026 10:02:19 GMT, Christian Hagedorn <[email protected]> wrote:
> When compiling a method, we check whether it is a trivial method like a > simple getter. When this is the case, we only directly compile it with C1 > without profiling (level 1) because we cannot optimize it better with C2. In > Valhalla, we want to special case this with a value class: We still want to > C2 compile such trivial methods in order to be able to use the scalarized > calling convention. `compiler/valhalla/inlinetypes/TestTrivialMethods.java` > checks that this special casing works. > > Before [JDK-8380053](https://bugs.openjdk.org/browse/JDK-8380053), > `TestTrivialMethods` passed even with `-XX:-PreloadClasses` because it > contained at least one `@NullRestricted` field which triggered a mandatory > class preloading. JDK-8380053 now removed this mandatory preloading. When > then running `TestTrivialMethods` with `-XX:-PreloadClasses`, no preloading > will be done anymore and the test starts to fail. I'm therefore proposing to > simply pass `-XX:+PreloadClasses` to the test such that it works with our CI > stress testing job that also runs tests with `-XX:-PreloadClasses`. > > Thanks, > Christian This pull request has now been integrated. Changeset: bcc3ca61 Author: Christian Hagedorn <[email protected]> URL: https://git.openjdk.org/valhalla/commit/bcc3ca61215de6103e5488c642a169c708e90b9e Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8380520: [lworld] compiler/valhalla/inlinetypes/TestTrivialMethods.java fails with -XX:-PreloadClasses after JDK-8380053 Reviewed-by: mchevalier, thartmann ------------- PR: https://git.openjdk.org/valhalla/pull/2247
