RFR: 8280579: Shenandoah: Skip regions in the back of sorted array when choosing cset
Aleksey Shipilev
shade at openjdk.java.net
Tue Jan 25 16:00:29 UTC 2022
On Tue, 25 Jan 2022 10:10:04 GMT, Yude Lin <duke at openjdk.java.net> wrote:
> Can I have review on this small change that skips some unnecessary work in cset choosing?
>
> When choosing regions to add to cset, we sort the regions from most garbage to least garbage. We then iterate the sorted array. We can break early from the loop if we find a region with (garbage <= garbage_threshold). Because we know the regions left won't have enough garbage and won't be added anyway.
Huh, this might actually work, let me take a closer look.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7211
More information about the hotspot-gc-dev
mailing list