RFR: 8337642: Serial: Remove redundant counter update in DefNewGeneration::gc_epilogue
Thomas Schatzl
tschatzl at openjdk.org
Fri Aug 2 07:43:32 UTC 2024
On Thu, 1 Aug 2024 09:50:50 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> > the implied contract seems to be that update_counters is called at appropriate locations
>
> Mabye we can remove it from the base class. Callers of this method always live in gc-specific location where the concrete policy-counter type is known.
Imo the point of this and similar APIs to avoid the need to think about whether a given collector uses a particular implementation, so that would run counter to the intent of such generic API about handling? I.e. that regardless of type of `GCPolicyCounters` that is actually used, one can be sure that everything is fine as long as you call that `update` method, not needing to think about the concrete policy type.
Is the single empty call that much of a (performance) issue?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20416#issuecomment-2264771219
More information about the hotspot-gc-dev
mailing list