On Tue, 27 May 2025 01:02:22 GMT, Zhengyu Gu <z...@openjdk.org> wrote:
>> Revised a bit; the limitation of what we have on master is that it doesn't >> detect gc-overhead for young-gcs. If many young-gcs are run, gc-overhead >> checking should kick in as well. > > I wonder if you should try `expand_heap_and_allocate()` under > `_is_heap_almost_full` situation as well. I am afraid that it might throw > OOM before heap is fully expanded again, because compact GC does not expand > heap. `expand_heap_and_allocate` is invoked in both situations; also, heap is expanded inside `summary_phase` in order to hold all live-objs inside old-gen. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25000#discussion_r2108377133