Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8354079

Shenandoah: Make the generational mode be non-experimental

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • hotspot
    • None
    • gc
    • behavioral
    • minimal
    • This change does not preclude usage of `UnlockExperimentalVMOptions`, it only makes it unnecessary to use it.
    • add/remove/modify command line option

      Summary

      Shenandoah's operational mode is controlled through the existing product option: -XX:ShenandoahGCMode=[satb|passive|generational]. Selecting the generational mode currently requires the flag -XX:UnlockExperimentalVMOptions. This CSR would make the generational mode no longer experimental.

      Problem

      JEP 404 introduced a generational mode to the Shenandoah garbage collector. This mode allows the collector to run more efficiently by focusing efforts on regions of the heap which are more likely to contain fewer live objects. The option to enable this mode should be available to users without requiring the -XX:+UnlockExperimentalVMOptions flag. We do not intend to make the generational mode the default at this time.

      Solution

      Shenandoah uses an internal mechanism to enforce the presence of UnlockExperimentalVMOptions for experimental modes. We simply need to change the configuration for the generational mode.

      Specification

      diff --git a/src/hotspot/share/gc/shenandoah/mode/shenandoahGenerationalMode.hpp b/src/hotspot/share/gc/shenandoah/mode/shenandoahGenerationalMode.hpp
      index 0946858169a..26020777693 100644
      --- a/src/hotspot/share/gc/shenandoah/mode/shenandoahGenerationalMode.hpp
      +++ b/src/hotspot/share/gc/shenandoah/mode/shenandoahGenerationalMode.hpp
      @@ -32,7 +32,7 @@ class ShenandoahGenerationalMode : public ShenandoahMode {
         virtual void initialize_flags() const;
         virtual const char* name()     { return "Generational"; }
         virtual bool is_diagnostic()   { return false; }
      -  virtual bool is_experimental() { return true; }
      +  virtual bool is_experimental() { return false; }
         virtual bool is_generational() { return true; }
       };

            wkemper William Kemper
            wkemper William Kemper
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: