Unused GC causes

Jon Masamitsu jon.masamitsu at oracle.com
Thu Sep 24 18:59:58 UTC 2015



On 09/23/2015 12:33 PM, Jesper Wilhelmsson wrote:
> Hi,
>
> I found that there are a few GC causes that are unused:
>
> _allocation_profiler
> _tenured_generation_full
> _cms_generation_full
> _old_generation_expanded_on_last_scavenge

> _old_generation_too_full_to_scavenge

This one could be used in the situation

- Young  gen full - start scavenge with cause "allocation failure"
- Some test ("should_scavenge()?") says that there is likely not
enough free space in the old gen to successfully do a scavenge.
- Skip scavenge and do a full GC - probably uses the "allocation
failure" cause (which seems fair).

Since no one has felt the need to be more precise with the cause
(and more precise would be somewhat confusing to users who do
not know how precisely the GC policies work),  I'd remove them.

Jon

>
> A few of these are used in asserts and similar, but none of them are 
> ever used to set the cause for a GC.
>
> Is there a reason to why these exists but are unused, is it a bug that 
> they are unused, or should we just remove them?
>
> Thanks,
> /Jesper




More information about the hotspot-gc-dev mailing list