RFR: 8337642: Serial: Remove redundant counter update in DefNewGeneration::gc_epilogue

Thomas Schatzl tschatzl at openjdk.org
Mon Aug 5 09:18:31 UTC 2024


On Mon, 5 Aug 2024 08:01:27 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> > so that would run counter to the intent of such generic API about handling
> 
> One can view `GCPolicyCounters` as a plain data-structure with only getters. The only two non-getter methods are the empty `update_counters` and the unused `kind`. If both are removed, `GCPolicyCounters` doesn't expose any action-related APIs any more.

Then let's do that instead of removing only the call. The `update_counters` API as it is used now does not seem to help at all.

The `gc_overhead_limit_exceeded_counter` could also be moved into the Parallel specific class because it's only used there.

I object to only remove the call and keep the bad API; removing them isn't that much more work.

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

PR Comment: https://git.openjdk.org/jdk/pull/20416#issuecomment-2268573514


More information about the hotspot-gc-dev mailing list