RFR: 8290223: Initialize G1CardClosure in card scanning once
Kim Barrett
kbarrett at openjdk.org
Thu Jul 14 02:27:03 UTC 2022
On Wed, 13 Jul 2022 09:16:29 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this minor change to avoid repeatedly initializing `G1CardClosure` in card scanning.
>
> Testing: gha, local compilation
>
> Thanks,
> Thomas
The JBS issue is labled `gc-performance`. Is it measurable?
I'm not strongly opposed to the change, but it increases the scope of the
scan closure (which is slightly unhelpful for code understanding). It also
passes the _heap_roots_found counter (by reference) to the closure constructor
before it's value has been initialized, so have to make sure the closure
constructor doesn't access the value. So I'd like to know what the benefit
might be.
-------------
PR: https://git.openjdk.org/jdk/pull/9478
More information about the hotspot-gc-dev
mailing list