8245754: Shenandoah: ditch ShenandoahAlwaysPreTouch
Reviewed-by: rkennke
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
index 9f31cb5..b2c2926 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahArguments.cpp
@@ -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");
}
diff --git a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
index c2911c7..4c15864 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
@@ -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.
diff --git a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
index 1bdc8c9..e691935 100644
--- a/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
+++ b/src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp
@@ -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.") \