On Mon, 9 Nov 2026 19:28:18 GMT, Chris Plummer <[email protected]> wrote:
>> Shiv Shah has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Test with and without C2 expanding the multi array and with and without
>> DeoptimizeALot
>
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorMultiArrayTest.java
> line 93:
>
>> 91: int maxNumber = mayRepeat ? 2 * expectedNumber : expectedNumber;
>> 92: System.out.println("Number of samples: " + sampledEvents);
>> 93: if (sampledEvents < expectedNumber || sampledEvents > maxNumber) {
>
> For the "mayRepeat" case, should we require that there be more than
> expectedNumber? In other words, at least once the test triggers a deopt after
> having done the allocations. I'm just wondering if even though theoretically
> this reallocations may never happen, reality is with 1000 iterations it is
> highly improbably that it doesn't happen at least once.
Makes sense, but it would fail as the id is now. Without -Xcomp the loop never
gets to C2 in 1000 iterations, so nothing is replayed and it prints exactly
6000 every time, tier1-3 included. Only the -Xcomp runs went above 6000.
The deopt ids would need -Xcomp -XX:-TieredCompilation first then more than
expected can be required here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33574#discussion_r4517405821