< prev index next >

src/hotspot/share/gc/shared/gcConfiguration.cpp

Print this page
@@ -29,21 +29,31 @@
  #include "memory/universe.hpp"
  #include "oops/compressedOops.hpp"
  #include "runtime/globals.hpp"
  #include "runtime/globals_extension.hpp"
  #include "utilities/debug.hpp"
+ #include "utilities/macros.hpp"
  
  GCName GCConfiguration::young_collector() const {
    if (UseG1GC) {
      return G1New;
    }
  
    if (UseParallelGC) {
      return ParallelScavenge;
    }
  
-   if (UseZGC || UseShenandoahGC) {
+   if (UseShenandoahGC) {
+ #if INCLUDE_SHENANDOAHGC
+     if (strcmp(ShenandoahGCMode, "generational") == 0) {
+       return Shenandoah;
+     }
+ #endif
+     return NA;
+   }
+ 
+   if (UseZGC) {
      return NA;
    }
  
    return DefNew;
  }
< prev index next >