changeset 60745:1c59a582f3d6

8242075: Shenandoah: rename ShenandoahHeapRegionSize flag Reviewed-by: rkennke
author shade
date Fri, 03 Apr 2020 11:33:31 +0200
parents 71acd699e4e6
children f8b15395138c
files src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp test/hotspot/jtreg/gc/TestHumongousReferenceObject.java test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java
diffstat 4 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp	Fri Apr 03 11:33:30 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp	Fri Apr 03 11:33:31 2020 +0200
@@ -521,7 +521,7 @@
   }
 
   size_t region_size;
-  if (FLAG_IS_DEFAULT(ShenandoahHeapRegionSize)) {
+  if (FLAG_IS_DEFAULT(ShenandoahRegionSize)) {
     if (ShenandoahMinRegionSize > max_heap_size / MIN_NUM_REGIONS) {
       err_msg message("Max heap size (" SIZE_FORMAT "%s) is too low to afford the minimum number "
                       "of regions (" SIZE_FORMAT ") of minimum region size (" SIZE_FORMAT "%s).",
@@ -564,27 +564,27 @@
     region_size = MIN2(ShenandoahMaxRegionSize, region_size);
 
   } else {
-    if (ShenandoahHeapRegionSize > max_heap_size / MIN_NUM_REGIONS) {
+    if (ShenandoahRegionSize > max_heap_size / MIN_NUM_REGIONS) {
       err_msg message("Max heap size (" SIZE_FORMAT "%s) is too low to afford the minimum number "
                               "of regions (" SIZE_FORMAT ") of requested size (" SIZE_FORMAT "%s).",
                       byte_size_in_proper_unit(max_heap_size), proper_unit_for_byte_size(max_heap_size),
                       MIN_NUM_REGIONS,
-                      byte_size_in_proper_unit(ShenandoahHeapRegionSize), proper_unit_for_byte_size(ShenandoahHeapRegionSize));
-      vm_exit_during_initialization("Invalid -XX:ShenandoahHeapRegionSize option", message);
+                      byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize));
+      vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message);
     }
-    if (ShenandoahHeapRegionSize < ShenandoahMinRegionSize) {
+    if (ShenandoahRegionSize < ShenandoahMinRegionSize) {
       err_msg message("Heap region size (" SIZE_FORMAT "%s) should be larger than min region size (" SIZE_FORMAT "%s).",
-                      byte_size_in_proper_unit(ShenandoahHeapRegionSize), proper_unit_for_byte_size(ShenandoahHeapRegionSize),
+                      byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize),
                       byte_size_in_proper_unit(ShenandoahMinRegionSize),  proper_unit_for_byte_size(ShenandoahMinRegionSize));
-      vm_exit_during_initialization("Invalid -XX:ShenandoahHeapRegionSize option", message);
+      vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message);
     }
-    if (ShenandoahHeapRegionSize > ShenandoahMaxRegionSize) {
+    if (ShenandoahRegionSize > ShenandoahMaxRegionSize) {
       err_msg message("Heap region size (" SIZE_FORMAT "%s) should be lower than max region size (" SIZE_FORMAT "%s).",
-                      byte_size_in_proper_unit(ShenandoahHeapRegionSize), proper_unit_for_byte_size(ShenandoahHeapRegionSize),
+                      byte_size_in_proper_unit(ShenandoahRegionSize), proper_unit_for_byte_size(ShenandoahRegionSize),
                       byte_size_in_proper_unit(ShenandoahMaxRegionSize),  proper_unit_for_byte_size(ShenandoahMaxRegionSize));
-      vm_exit_during_initialization("Invalid -XX:ShenandoahHeapRegionSize option", message);
+      vm_exit_during_initialization("Invalid -XX:ShenandoahRegionSize option", message);
     }
-    region_size = ShenandoahHeapRegionSize;
+    region_size = ShenandoahRegionSize;
   }
 
   // Make sure region size is at least one large page, if enabled.
--- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp	Fri Apr 03 11:33:30 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp	Fri Apr 03 11:33:31 2020 +0200
@@ -40,7 +40,7 @@
                             range,                                          \
                             constraint)                                     \
                                                                             \
-  experimental(size_t, ShenandoahHeapRegionSize, 0,                         \
+  experimental(size_t, ShenandoahRegionSize, 0,                             \
           "Static heap region size. Set zero to enable automatic sizing.")  \
                                                                             \
   experimental(size_t, ShenandoahTargetNumRegions, 2048,                    \
--- a/test/hotspot/jtreg/gc/TestHumongousReferenceObject.java	Fri Apr 03 11:33:30 2020 +0200
+++ b/test/hotspot/jtreg/gc/TestHumongousReferenceObject.java	Fri Apr 03 11:33:31 2020 +0200
@@ -52,8 +52,8 @@
  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  * @bug 8151499 8153734
  * @modules java.base/jdk.internal.vm.annotation
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
- * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahHeapRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahRegionSize=8M -XX:ContendedPaddingWidth=8192 gc.TestHumongousReferenceObject
+ * @run main/othervm -XX:+EnableContended -XX:-RestrictContended -Xms128m -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahRegionSize=8M -XX:ContendedPaddingWidth=8192 -XX:+UnlockDiagnosticVMOptions -XX:+ShenandoahVerify gc.TestHumongousReferenceObject
  */
 public class TestHumongousReferenceObject {
 
--- a/test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java	Fri Apr 03 11:33:30 2020 +0200
+++ b/test/hotspot/jtreg/gc/shenandoah/options/TestRegionSizeArgs.java	Fri Apr 03 11:33:31 2020 +0200
@@ -70,10 +70,10 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms100m",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=200m",
+                    "-XX:ShenandoahRegionSize=200m",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
-            output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
+            output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
             output.shouldHaveExitValue(1);
         }
 
@@ -82,7 +82,7 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms100m",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=9m",
+                    "-XX:ShenandoahRegionSize=9m",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
@@ -93,10 +93,10 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms100m",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=255K",
+                    "-XX:ShenandoahRegionSize=255K",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
-            output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
+            output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
             output.shouldHaveExitValue(1);
         }
 
@@ -105,7 +105,7 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms100m",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=260K",
+                    "-XX:ShenandoahRegionSize=260K",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
@@ -116,7 +116,7 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms1g",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=32M",
+                    "-XX:ShenandoahRegionSize=32M",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
@@ -127,10 +127,10 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms1g",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=64M",
+                    "-XX:ShenandoahRegionSize=64M",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
-            output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
+            output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
             output.shouldHaveExitValue(1);
         }
 
@@ -139,7 +139,7 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms1g",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=256K",
+                    "-XX:ShenandoahRegionSize=256K",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
             output.shouldHaveExitValue(0);
@@ -150,10 +150,10 @@
                     "-XX:+UseShenandoahGC",
                     "-Xms1g",
                     "-Xmx1g",
-                    "-XX:ShenandoahHeapRegionSize=128K",
+                    "-XX:ShenandoahRegionSize=128K",
                     "-version");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
-            output.shouldMatch("Invalid -XX:ShenandoahHeapRegionSize option");
+            output.shouldMatch("Invalid -XX:ShenandoahRegionSize option");
             output.shouldHaveExitValue(1);
         }
     }