RFR: 8280579: Shenandoah: Skip regions in the back of sorted array when choosing cset [v3]

Yude Lin duke at openjdk.java.net
Wed Jan 26 04:44:05 UTC 2022


On Tue, 25 Jan 2022 17:00:19 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> I am still not quite convinced about the performance gains here -- my point tests show there is slight regression in "Choose Collection Set" (use `-Xlog:gc+stats` to get it, and look at the table before JVM shutdown). Have you have any promising performance data?
> 

I found this in a small test case where the algorithm would iterate over tens of regions for nothing. With the change the test goes from ~5us to ~1us, measuring the thread cpu time* of the choosing cset loop. I noticed that most of "Choose Collection Set" (which is ~50us) is taken by the sorting work before the loop. So in general the difference wouldn't be noticeable. I simply think it's wasted some time and the change is the more proper way.

Update with the suggested change.

* I put something like this ``clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp);`` around the loop.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7211



More information about the hotspot-gc-dev mailing list