RFR: 8313395: LotsUnloadTest.java fails with OOME transiently with libgraal

Ioi Lam iklam at openjdk.org
Thu Jul 10 21:42:45 UTC 2025


On Thu, 10 Jul 2025 15:52:15 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>>> Is the increased memory usage of Graal limited to `-Xcomp` runs?
>> 
>> Yes. Here are the logs from my comments in the bug report. Memory use goes from about 32m to about 96m when -Xcomp is used with graal.
>> 
>> 
>> $ java -Xmx64m -Xms32m -Xcomp -cp . LotsUnloadApp
>> $ java -Xmx64m -Xms32m -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -cp . LotsUnloadApp
>> $ java -Xmx64m -Xms32m -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp . LotsUnloadApp
>> 
>> Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Thread-3"
>> Exception in thread "Thread-2" java.lang.OutOfMemoryError: Java heap space
>> java.lang.OutOfMemoryError: Java heap space
>> Exception in thread "Thread-0" java.lang.OutOfMemoryError: Java heap space
>> 
>> $ java -Xmx96m -Xms32m -Xcomp -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp . LotsUnloadApp
>> $
>> 
>> $ java -Xmx48m -Xms32m -Xcomp -cp . LotsUnloadApp
>> $ java -Xmx32m -Xms32m -Xcomp -cp . LotsUnloadApp
>> $ java -Xmx32m -Xms32m -XX:+UnlockExperimentalVMOptions -XX:+UseGraalJIT -cp . LotsUnloadApp
>> $
>
>> Yes. Here are the logs from my comments in the bug report. Memory use goes from about 32m to about 96m when -Xcomp is used with graal.
> 
> Ok, thanks. I think that largely mitigates the concern about extra memory usage. Without `-Xcomp`, there will not be many libgraal compilations involving the loaded classes.
> 
> These changes look good.

Thanks @dougxc for the review

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

PR Comment: https://git.openjdk.org/jdk/pull/26230#issuecomment-3059189932


More information about the hotspot-runtime-dev mailing list