RFR: Traveral GC heuristics
Roman Kennke
rkennke at redhat.com
Wed Jan 17 15:08:19 UTC 2018
Am 17.01.2018 um 15:44 schrieb Aleksey Shipilev:
> On 01/17/2018 03:37 PM, Roman Kennke wrote:
>> Testing showed up some regressions in non-traversal code and two issues that I introduced (or
>> haven't fixed) when single-flag patch arrived.
>>
>> The following now passes hotspot_gc_shenandoah tests and runs of specjvm with fastdebug with
>> -XX:+ShenandoahVerify -XX:+ShenandoahGCHeuristics=traversal, with -XX:TieredStopAtLevel=0|1|4
>>
>> Differential:
>> http://cr.openjdk.java.net/~rkennke/traversal/webrev.01.diff/
>
> Small-ish questions:
>
> *) This solves some Partial GC bug, not Traversal GC bug? If so, can you RFR and push it separately?
>
> --- old/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp 2018-01-17 15:32:54.756247073 +0100
> +++ new/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.cpp 2018-01-17 15:32:54.391251897 +0100
> @@ -169,7 +169,7 @@
> }
>
> bool ShenandoahBarrierSet::need_update_refs_barrier() {
> - if (_heap->is_concurrent_partial_in_progress() || _heap->is_concurrent_traversal_in_progress()) {
> + if (UseShenandoahMatrix || _heap->is_concurrent_traversal_in_progress()) {
> return true;
> }
> if (_heap->shenandoahPolicy()->update_refs()) {
>
>
No, this is a bug that I introduced with webrev.00 and reverted back
with webrev.01. When using matrix, we always need to do the
update-matrix-stuff, not only when partial GC is in progress. With
traversal, we only need to go into the barrier when the traversal GC is
in progress.
> *) I think we have discussed the RFR for this -- does it turn out to be needed after all?
>
> --- old/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp 2018-01-17 15:32:54.135255280 +0100
> +++ new/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp 2018-01-17 15:32:53.869258796 +0100
> @@ -727,7 +727,7 @@
> const int referent_offset = java_lang_ref_Reference::referent_offset;
> guarantee(referent_offset > 0, "referent offset not initialized");
>
> - if (UseG1GC || UseShenandoahGC) {
> + if (UseG1GC || (UseShenandoahGC && ShenandoahKeepAliveBarrier)) {
> Label slow_path;
> // rbx: method
Oops. Reverted here:
Diff:
http://cr.openjdk.java.net/~rkennke/traversal/webrev.02.diff/
Full:
http://cr.openjdk.java.net/~rkennke/traversal/webrev.02/
(give it some seconds to upload)
Better?
Roman
More information about the shenandoah-dev
mailing list