changeset 57889:9c2c9e22c8ba

8237825: ZGC: Replace -XX:ZPath with -XX:AllocateHeapAt Reviewed-by: eosterlund
author pliden
date Thu, 30 Jan 2020 12:41:56 +0100
parents b576a0ead397
children fe7c8e8eca0b
files src/hotspot/os/linux/gc/z/zMountPoint_linux.cpp src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp src/hotspot/share/gc/z/z_globals.hpp src/hotspot/share/runtime/arguments.cpp
diffstat 4 files changed, 6 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/os/linux/gc/z/zMountPoint_linux.cpp	Thu Jan 30 12:41:47 2020 +0100
+++ b/src/hotspot/os/linux/gc/z/zMountPoint_linux.cpp	Thu Jan 30 12:41:56 2020 +0100
@@ -25,6 +25,7 @@
 #include "gc/z/zArray.inline.hpp"
 #include "gc/z/zErrno.hpp"
 #include "gc/z/zMountPoint_linux.hpp"
+#include "runtime/globals.hpp"
 #include "logging/log.hpp"
 
 #include <stdio.h>
@@ -34,9 +35,9 @@
 #define PROC_SELF_MOUNTINFO        "/proc/self/mountinfo"
 
 ZMountPoint::ZMountPoint(const char* filesystem, const char** preferred_mountpoints) {
-  if (ZPath != NULL) {
+  if (AllocateHeapAt != NULL) {
     // Use specified path
-    _path = strdup(ZPath);
+    _path = strdup(AllocateHeapAt);
   } else {
     // Find suitable path
     _path = find_mountpoint(filesystem, preferred_mountpoints);
--- a/src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp	Thu Jan 30 12:41:47 2020 +0100
+++ b/src/hotspot/os/linux/gc/z/zPhysicalMemoryBacking_linux.cpp	Thu Jan 30 12:41:56 2020 +0100
@@ -211,7 +211,7 @@
   // Find mountpoint
   ZMountPoint mountpoint(filesystem, preferred_mountpoints);
   if (mountpoint.get() == NULL) {
-    log_error(gc)("Use -XX:ZPath to specify the path to a %s filesystem", filesystem);
+    log_error(gc)("Use -XX:AllocateHeapAt to specify the path to a %s filesystem", filesystem);
     return -1;
   }
 
@@ -263,7 +263,7 @@
 }
 
 int ZPhysicalMemoryBacking::create_fd(const char* name) const {
-  if (ZPath == NULL) {
+  if (AllocateHeapAt == NULL) {
     // If the path is not explicitly specified, then we first try to create a memfd file
     // instead of looking for a tmpfd/hugetlbfs mount point. Note that memfd_create() might
     // not be supported at all (requires kernel >= 3.17), or it might not support large
--- a/src/hotspot/share/gc/z/z_globals.hpp	Thu Jan 30 12:41:47 2020 +0100
+++ b/src/hotspot/share/gc/z/z_globals.hpp	Thu Jan 30 12:41:56 2020 +0100
@@ -38,10 +38,6 @@
                    range,                                                   \
                    constraint)                                              \
                                                                             \
-  experimental(ccstr, ZPath, NULL,                                          \
-          "Filesystem path for Java heap backing storage "                  \
-          "(must be a tmpfs or a hugetlbfs filesystem)")                    \
-                                                                            \
   experimental(double, ZAllocationSpikeTolerance, 2.0,                      \
           "Allocation spike tolerance factor")                              \
                                                                             \
--- a/src/hotspot/share/runtime/arguments.cpp	Thu Jan 30 12:41:47 2020 +0100
+++ b/src/hotspot/share/runtime/arguments.cpp	Thu Jan 30 12:41:56 2020 +0100
@@ -2113,12 +2113,6 @@
   }
 #endif
 
-  if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
-    if ((UseNUMAInterleaving && !FLAG_IS_DEFAULT(UseNUMAInterleaving)) || (UseNUMA && !FLAG_IS_DEFAULT(UseNUMA))) {
-      log_warning(arguments) ("NUMA support for Heap depends on the file system when AllocateHeapAt option is used.\n");
-    }
-  }
-
   status = status && GCArguments::check_args_consistency();
 
   return status;
@@ -4159,9 +4153,7 @@
 
 jint Arguments::adjust_after_os() {
   if (UseNUMA) {
-    if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
-      FLAG_SET_ERGO(UseNUMA, false);
-    } else if (UseParallelGC) {
+    if (UseParallelGC) {
       if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
          FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
       }