RFR: 8355512: Test compiler/vectorization/TestVectorZeroCount.java times out with -XX:TieredStopAtLevel=3

Jasmine Karthikeyan jkarthikeyan at openjdk.org
Mon May 19 05:01:44 UTC 2025


On Thu, 15 May 2025 14:12:31 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Hi all,
>> This is a small patch to TestVectorZeroCount to make it only execute when C2 is enabled, to fix a timeout with -XX:TieredStopAtLevel=3. This test takes a long time to finish without C2 because it iterates through all of the integers twice. Since the intention of the test is to stress the C2-specific `numberOfLeadingZeros` and `numberOfTrailingZeros` intrinsics, I think it makes sense to limit it to running with C2 only.
>> 
>> Reviews would be appreciated!
>
> @jaskarth @chhagedorn Hmm, this means that this test could not be run with GraalVM, for example. That's a shame.
> Do we not have some way to assert that there should be "some fast compiler"? Ah, what does `vm.flavor == "server"` do? Because I have seen lines like `vm.flavor == "server" & !vm.graal.enabled` before.

@eme64 I think `vm.flavor == "server"` ensures that the test runs on server-class VMs, but I wasn't sure if manually setting the `TieredStopAtLevel` changes that designation. I looked at some more tests and I saw that they were using `@requires vm.flavor == "server" & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 4)`, which looks like a good way to check for any tier4 compiler. I've updated the patch to use that method instead, which should let it run on graal as well.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25243#issuecomment-2889616594


More information about the hotspot-compiler-dev mailing list