changeset 59430:16a7e87a97fe

8245754: Shenandoah: ditch ShenandoahAlwaysPreTouch Reviewed-by: rkennke
author shade
date Tue, 26 May 2020 09:30:17 +0200
parents 57080bcd9c32
children 4ca6fc2d0e3d
files src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
diffstat 3 files changed, 3 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Tue May 26 09:30:09 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp	Tue May 26 09:30:17 2020 +0200
@@ -143,20 +143,12 @@
 #endif // ASSERT
 #endif // COMPILER2
 
-  if (AlwaysPreTouch) {
-    // Shenandoah handles pre-touch on its own. It does not let the
-    // generic storage code to do the pre-touch before Shenandoah has
-    // a chance to do it on its own.
-    FLAG_SET_DEFAULT(AlwaysPreTouch, false);
-    FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
-  }
-
   // Record more information about previous cycles for improved debugging pleasure
   if (FLAG_IS_DEFAULT(LogEventsBufferEntries)) {
     FLAG_SET_DEFAULT(LogEventsBufferEntries, 250);
   }
 
-  if (ShenandoahAlwaysPreTouch) {
+  if (AlwaysPreTouch) {
     if (!FLAG_IS_DEFAULT(ShenandoahUncommit)) {
       warning("AlwaysPreTouch is enabled, disabling ShenandoahUncommit");
     }
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Tue May 26 09:30:09 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp	Tue May 26 09:30:17 2020 +0200
@@ -155,7 +155,7 @@
 
   size_t reg_size_bytes = ShenandoahHeapRegion::region_size_bytes();
 
-  if (ShenandoahAlwaysPreTouch) {
+  if (AlwaysPreTouch) {
     // Enabled pre-touch means the entire heap is committed right away.
     init_byte_size = max_byte_size;
   }
@@ -344,9 +344,7 @@
     _free_set->rebuild();
   }
 
-  if (ShenandoahAlwaysPreTouch) {
-    assert(!AlwaysPreTouch, "Should have been overridden");
-
+  if (AlwaysPreTouch) {
     // For NUMA, it is important to pre-touch the storage under bitmaps with worker threads,
     // before initialize() below zeroes it with initializing thread. For any given region,
     // we touch the region and the corresponding bitmaps from the same thread.
--- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp	Tue May 26 09:30:09 2020 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp	Tue May 26 09:30:17 2020 +0200
@@ -300,9 +300,6 @@
   diagnostic(bool, ShenandoahAllocFailureALot, false,                       \
           "Testing: make lots of artificial allocation failures.")          \
                                                                             \
-  diagnostic(bool, ShenandoahAlwaysPreTouch, false,                         \
-          "Pre-touch heap memory, overrides global AlwaysPreTouch.")        \
-                                                                            \
   experimental(intx, ShenandoahMarkScanPrefetch, 32,                        \
           "How many objects to prefetch ahead when traversing mark bitmaps."\
           "Set to 0 to disable prefetching.")                               \