On Mon, 26 Oct 2026 19:57:08 GMT, Shiv Shah <[email protected]> wrote:
> 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). I've posted one question. Otherwise, the fix looks good to me. test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorMultiArrayTest.java line 57: > 55: // Other allocations in the window get sampled too. > 56: if (!HeapMonitor.statsHaveExpectedNumberSamples(expectedNumber, 10)) { > 57: throw new RuntimeException("Number of samples (" + sampledEvents + > ") not within 10% of the expected (" Q: My understanding is that a number of samples below `expectedNumber` which `6000` will be acceptable. Should we make this check stronger and reject sample numbers below the `expectedNumber`? For instance: if (sampledEvents < expectedNumber || !HeapMonitor.statsHaveExpectedNumberSamples(expectedNumber, 10)) { throw new RuntimeException("Number of samples (" + sampledEvents + ") not within 10% of the expected (" . . . ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/33574#pullrequestreview-5777654319 PR Review Comment: https://git.openjdk.org/jdk/pull/33574#discussion_r4474826674
