RFR: 8227226: Segmented array clearing for ZGC
Thomas Schatzl
thomas.schatzl at oracle.com
Wed Jul 31 17:59:42 UTC 2019
Hi,
On 31.07.19 10:19, Per Liden wrote:
> Hi,
>
> I found some time to benchmark the "GC clears pages"-approach, and it's
> fairly clear that it's not paying off. So ditching that idea.
>
> However, I'm still looking for something that would not just do
> segmented clearing of arrays in large zpages. Letting oop arrays
> temporarily be typed arrays while it's being cleared could be an option.
> I did a prototype for that, which looks like this:
>
> http://cr.openjdk.java.net/~pliden/8227226/webrev.1
>
> There's at least one issue here, the code doing allocation sampling will
> see that we allocated long arrays instead of oop arrays, so the
> reporting there will be skewed. That can be addressed if we go down this
> path. The code is otherwise fairly simple and contained. Feel free to
> spot any issues.
that looks like a really neat way of doing this.
Looking over this there does not seem to be any real dependency on ZGC
code, so if you went this way, would it be possible to provide this
solution for all collectors?
For other collectors slightly larger segment sizes might be sufficient
too to slightly favor performance.
Did you measure the impact on zeroing throughput of this?
Thanks,
Thomas
More information about the hotspot-gc-dev
mailing list