RFR: 8280579: Shenandoah: Skip regions in the back of sorted array when choosing cset
Yude Lin
duke at openjdk.java.net
Tue Jan 25 10:17:06 UTC 2022
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.
-------------
Commit messages:
- 8280579: Shenandoah: Skip regions in the back of sorted array when choosing cset
Changes: https://git.openjdk.java.net/jdk/pull/7211/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7211&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8280579
Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk/pull/7211.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/7211/head:pull/7211
PR: https://git.openjdk.java.net/jdk/pull/7211
More information about the hotspot-gc-dev
mailing list