On Thu, 19 Mar 2026 09:29:22 GMT, Roland Westrelin <[email protected]> wrote:
>> test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestBufferLost.java line
>> 148:
>>
>>> 146:
>>> 147: MemoryMXBean mem = ManagementFactory.getMemoryMXBean();
>>> 148: System.out.println("Heap size: " +
>>> mem.getHeapMemoryUsage().getUsed() / (1024*1024) + " MB");
>>
>> Should we assert some max heap size here?
>
> I wondered about that. Isn't there a risk that the test becomes fragile? What
> would you pick?
I think if the difference of the heap size with and without your fix is large,
we can just pick a large enough value for the assert that would then trigger
without your fix and still be large enough to account for fluctuations.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2062#discussion_r2961344067