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

Aleksey Shipilev shade at redhat.com
Wed Jul 3 08:33:10 UTC 2019


On 7/2/19 11:32 AM, Roman Kennke wrote:
> There was a small mistake in one of the tests. Updated webrev:
> 
> http://cr.openjdk.java.net/~rkennke/JDK-8226757/webrev.02/
*) Looks like the synopsis is incorrect. Should be e.g. "Make passive/normal/traversal modes
explicit", or something.

*) Please make sure it builds with --disable-precompiled-headers

*) Changes like these are not exactly for making a separate mode? The condition seems superficial
even without explicit mode: ShenandoahSATBBarrier should not be active with traversal? If so, might
be worthwhile to split out, this would make current changeset a bit less denser.

-    if (ShenandoahSATBBarrier && !dest_uninitialized &&
!ShenandoahHeap::heap()->heuristics()->can_do_traversal_gc()) {
+    if (ShenandoahSATBBarrier && !dest_uninitialized) {

*) Rewrite this:

  GCMode default_mode = heap->is_traversal_mode() ? concurrent_traversal : concurrent_normal;
  GCCause::Cause default_cause = default_mode == concurrent_traversal ?
GCCause::_shenandoah_traversal_gc : GCCause::_shenandoah_concurrent_gc;

Into this:

  GCMode default_mode = heap->is_traversal_mode() ?
                           concurrent_traversal : concurrent_normal;
  GCCause::Cause default_cause = heap->is_traversal_mode() ?
                           GCCause::_shenandoah_traversal_gc : GCCause::_shenandoah_concurrent_gc;

*) shenandoah_globals.hpp still mention "passive" is heuristics, not mode. Happens in both
ShenandoahGCHeuristics and ShenandoahGCMode option descriptions.

*) TestObjItrWithHeapDump.java, TestClassLoaderLeak.java: indenting is confusing. Suggestion:

     String[][][] modeHeuristics = new String[][][] {
          {{"normal"},    {"adaptive", "compact", "static", "aggressive"}},
          {{"traversal"}, {"adaptive"}},
          {{"passive"},   {"passive"}}
     };

 ...by the way, shouldn't "traversal" mode have "traversal" heuristics here? I see
shenandoahTraversalMode equate "adaptive" to ShenandoahTraversalHeuristics, which I believe is
confusing...

*) @run lines indenting is not correct in TestRefprocSanity.java


-- 
Thanks,
-Aleksey




More information about the hotspot-gc-dev mailing list