On Mon, 9 Nov 2026 20:07:42 GMT, Shiv Shah <[email protected]> wrote:

>> 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.

Ok, so currently we only see more than 6000 for the "mayRepeat" case when the 
user also adds `-Xcomp -XX:-TieredCompilation`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33574#discussion_r4517897721

Reply via email to