RFR: 8194823: Serial GC does not account GCs caused by TLAB allocation in GC overhead limit [v2]
Guoxiong Li
gli at openjdk.org
Thu May 25 15:34:03 UTC 2023
On Thu, 25 May 2023 13:31:59 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> Do you have a small example to trigger `java.lang.OutOfMemoryError: GC Overhead Limit Exceeded` for Serial GC. I was under the impression that Serial doesn't support `UseGCOverheadLimit`.
I re-read the related code and now I think you are right.
Currently, only the parallel GC supports `UseGCOverheadLimit`.
In detail, the methods `GCOverheadChecker::check_gc_overhead_limit`
and `AdaptiveSizePolicy::check_gc_overhead_limit` are only used by
`PSScavenge::invoke_no_policy` and `PSParallelCompact::invoke_no_policy`
under the condition **UseAdaptiveSizePolicy is true**.
And the `UseAdaptiveSizePolicy` is only used by paralled gc, too.
Several problems need to be confirmed before continuing the work:
The `UseGCOverheadLimit` is only used when `UseAdaptiveSizePolicy` is true. Is it intentional?
If it is intentional and only the parallel GC uses the `UseAdaptiveSizePolicy` now,
should I remove the `UseGCOverheadLimit` related code in serial GC?
Or we should implement the feature about `UseAdaptiveSizePolicy`
and `UseGCOverheadLimit` in serial GC (seems a large change) ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14120#issuecomment-1563110554
More information about the shenandoah-dev
mailing list