RFR: Move periodic GC decision making to base GC heuristics class
Aleksey Shipilev
shade at redhat.com
Thu Jul 19 18:38:29 UTC 2018
On 07/19/2018 08:34 PM, Zhengyu Gu wrote:
> Please review this simple cleanup.
>
> Currently, the same periodic GC decision is made by heuristics subclasses overall the places, while
> it can be made by base class.
>
>
> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/periodic_gc/webrev.00/
Looks good. You can avoid excess branches like this:
bool ShenandoahCompactHeuristics::should_start_normal_gc() {
...
if (available < threshold_bytes_allocated || bytes_allocated > threshold_bytes_allocated) {
...
return true;
}
return ShenandoahHeuristics::should_start_normal_gc();
}
It also highlights we fallback to super-implementation if nothing is taken in this method.
-Aleksey
More information about the shenandoah-dev
mailing list