RFR: 8370519: C2: Hit MemLimit when running with +VerifyLoopOptimizations [v6]
Roland Westrelin
roland at openjdk.org
Fri Dec 19 14:10:11 UTC 2025
On Fri, 19 Dec 2025 10:21:29 GMT, Benoît Maillard <bmaillard at openjdk.org> wrote:
> I think we should use the following test, which is quite concise and only takes a few seconds to execute thanks to setting `memlimit` to `100M`.
Thanks for working on that. Without the patch and no limit on memory usage, I see:
Arena Usage by Arena Type and compilation phase, at arena usage peak of 106292736
idealLoop 11723824 0 2814728 8516320 392776 0 0 0 0 0 0 0 0
output 84858328 84858328 0 0 0 0 0 0 0 0 0 0 0
With the fix:
Arena Usage by Arena Type and compilation phase, at arena usage peak of 98628104
idealLoop 4288448 0 2814728 1080944 0 392776 0 0 0 0 0 0 0 0
output 84858328 84858328 0 0 0 0 0 0 0 0 0 0 0 0
So 7+ MB of memory is saved but most of the memory is used by `output` anyway. As a consequence, with the fix, memory usage is still close to 100MB. I wonder how robust the test is going to be on other platforms (`output` memory usage could be higher) or as the C2 code evolves and memory usage changes.
Have you run it on other platforms with the fix to make sure it does pass everywhere?
If , say `idealLoop` usage was about as high as `output` without the fix, that would make the test more robust. In the process of coming up with that test, was there any other tests you try that took a bit longer to run but used a bit more memory?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28581#issuecomment-3675211322
More information about the hotspot-dev
mailing list