Under -XX:+DeoptimizeALot with -XX:CompileThresholdScaling=0.01 added the count comes out 100 to 150 above 6000. The sampler counts every sampled allocation in the window, not only the test's arrays, and objects reallocated at deoptimization go through the same allocation path. The same failure showed up once in 2019 with smaller counts.
The check now uses the 10% band the other HeapMonitor tests use. --- Testing: - [x] The test with -XX:CompileThresholdScaling=0.01 under tiered, non tiered, C1 level 2, C1 level 3 with -Xcomp and the two DeoptimizeALot -Xcomp configurations, five times each on linux-x64 and linux-aarch64 debug, plus a default run, all passing. tier1-3 on linux-x64 and linux-aarch64 together with the four related test fixes, one unrelated certpath failure on both platforms --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8395812: serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorMultiArrayTest.java fails with -XX:CompileThresholdScaling=0.01 Changes: https://git.openjdk.org/jdk/pull/33574/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33574&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8395812 Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/33574.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33574/head:pull/33574 PR: https://git.openjdk.org/jdk/pull/33574
