RFR: JDK-8226757: Shenandoah: Make Traversal a separate mode

Roman Kennke rkennke at redhat.com
Fri Jun 28 18:13:52 UTC 2019


Hi Aleksey,

New webrev:
http://cr.openjdk.java.net/~rkennke/JDK-8226757/webrev.01/

I addressed all issues you mentioned. I introduced a new ShenandoahMode
and 3 subclasses for traversal, normal and passive. I also had to adjust
all tests which was sometimes a bit hairy.

Sorry, I messed up to make an incremental webrev. Only full one here.

Better now?

Roman


> Brief look:
> 
> *) I wonder if it makes sense to rework it more thoroughly:
>  modes:      {passive, normal, traversal}
>  heuristics: {aggressive, compact, adaptive, static}
> 
>  ...so that modes select barriers, and heuristics only selects when to start the cycle.
> 
> *) should_start_normal_gc() is now simply should_start_gc()?
> 
> *) I guess this can be done in "default_cause", near "default_mode":
> 
>  156         cause = mode == concurrent_traversal ? GCCause::_shenandoah_traversal_gc :
> GCCause::_shenandoah_concurrent_gc;
> 
> *) Looks to me, there would be no message printed if we supply wrong mode?
> 
> *) I don't think it is fair to call it scavenge. Description also implies "normal" is not
> concurrent? I'd say "normal (mark, then evac, then update)" and "traversal (mark+evac+update)".
> 
>   75   experimental(ccstr, ShenandoahGCMode, "normal",                           \
>   76           "The GC mode to use in Shenandoah GC. Possible values"            \
>   77           " *) normal    - normal GC (mark-evac-update)"                    \
>   78           " *) traversal - Traversal GC (concurent scavange)")              \
> 
> *) TestWrongBarrierDisable.java: indenting, L58:
> 
>   54         shouldFailAll("-XX:ShenandoahGCHeuristics=adaptive",   concurrent);
>   55         shouldFailAll("-XX:ShenandoahGCHeuristics=static",     concurrent);
>   56         shouldFailAll("-XX:ShenandoahGCHeuristics=compact",    concurrent);
>   57         shouldFailAll("-XX:ShenandoahGCHeuristics=aggressive", concurrent);
>   58         shouldFailAll("-XX:ShenandoahGCMode=traversal",  traversal);
>   59         shouldPassAll("-XX:ShenandoahGCHeuristics=passive",    concurrent);
>   60         shouldPassAll("-XX:ShenandoahGCHeuristics=passive",    traversal);
> 




More information about the hotspot-gc-dev mailing list