On Fri, 12 Sep 2025 15:52:06 GMT, Christian Hagedorn <[email protected]> wrote:
> The `compiler/intrinsics/bmi` tests started to fail with new AOT changes > merged in. > > ### AOT Warnings with Valhalla due to Adapter Hash Collision > From the log messages, I saw that we have the following warning message > printed with UL: > > '[0.020s][warning][aot,codecache,stubs] Saved blob's name 'IIIIIIIL' is > different from the expected name 'LIIIIIII' > > This warning can be traced back to a collision in caching adapters with AOT > where two adapters have the same hash. As a result, we need to drop one of > the adapters in the AOT cache which is unfortunate but not a problem in > correctness. This hash collision seems to be specific to Valhalla because we > have a lot more adapters compared to mainline. There is currently an open RFE > in mainline ([JDK-8364929](https://bugs.openjdk.org/browse/JDK-8364929)) > which tries to improve the situation to give each adapters a unique id. > > ### Comparison of `Xint` and `Xcomp` Output Fails due to different Timestamps > The `compiler/intrinsics/bmi` tests call `BMITestRunner` which will run the > same test with `-Xint` and `-Xcomp` and then compare the output: > https://github.com/openjdk/valhalla/blob/28b96c080081b8ebab2656d5dc0f904072d15e40/test/hotspot/jtreg/compiler/intrinsics/bmi/BMITestRunner.java#L87-L100 > We see the AOT warning actually in both runs. The comparison fails because we > have a different timestamp in the log for `-Xint` and `-Xcomp`: > > [0.020s][warning][aot,codecache,stubs] Saved blob's name 'IIIIIIIL' is > different from the expected name 'LIIIIIII' > [0.013s][warning][aot,codecache,stubs] Saved blob's name 'IIIIIIIL' is > different from the expected name 'LIIIIIII' > > So, the fix would be to get rid of the timestamps. > > ### Getting Rid of Timestamps already Implemented but Wrongly > However, we already have some special code that actually wants to remove > timestamps and all AOT logs altogether (introduced with > https://github.com/openjdk/valhalla/commit/3b32f6a8ec37338764d3e6713247ff96e49bf5b3 > for some Graal specific failure) : > https://github.com/openjdk/valhalla/blob/28b96c080081b8ebab2656d5dc0f904072d15e40/test/hotspot/jtreg/compiler/intrinsics/bmi/BMITestRunner.java#L125-L129 > But this does not seem to work. I played around with `Xlog` and found that > surprisingly this: > > -Xlog:all=warning:stdout:level,tags -Xlog:aot=off > > seems to be expanded to > > -Xlog:all=warning:stdout:level,tags -Xlog:aot=off:stdout:<default decorators> > > and the second `Xlog` overrides the decorators and reintroduces the > timestamps again. > > ### Proposed Fix > The ... This pull request has now been integrated. Changeset: 1c011a37 Author: Christian Hagedorn <[email protected]> URL: https://git.openjdk.org/valhalla/commit/1c011a377002de35f8086a8ba4fdce1ed898cfca Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 8367548: compiler/intrinsics/bmi tests fail with -XX:+AOTClassLinking ------------- PR: https://git.openjdk.org/valhalla/pull/1582
