On Sun, 18 May 2025 18:06:15 GMT, Guoxiong Li <g...@openjdk.org> wrote:

>> src/hotspot/share/gc/parallel/parallelScavengeHeap.cpp line 343:
>> 
>>> 341:       if (_gc_overhead_counter >= GCOverheadLimitThreshold) {
>>> 342:         return nullptr;
>>> 343:       }
>> 
>> Returning `nullptr` means the `OutOfMemoryError` will be thrown later. Is it 
>> good to add a `error` level log here?
>
> And notice: we can't identify whether the `OutOfMemoryError` is because of 
> `gc overhead limit exceeded`.
> 
> As I pointed out before: `the field 
> MemAllocator::Allocation::_overhead_limit_exceeded are not used now`.

The one inside the safepoint will print sth 
`log_info(gc)("GCOverheadLimitThreshold ...`. There can be multiple concurrent 
mutators reaching here; printing here is undesirable.

I don't think throwing OOM, from gc's perspective, is an "error".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25000#discussion_r2094899794

Reply via email to