8237825: ZGC: Replace -XX:ZPath with -XX:AllocateHeapAt

Reviewed-by: eosterlund
This commit is contained in:
Per Lidén 2020-01-30 12:41:56 +01:00
parent 24691f248c
commit 0f06a9a5cd
4 changed files with 6 additions and 17 deletions

View File

@ -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);

View File

@ -211,7 +211,7 @@ int ZPhysicalMemoryBacking::create_file_fd(const char* name) const {
// 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_file_fd(const char* name) const {
}
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

View File

@ -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") \
\

View File

@ -2113,12 +2113,6 @@ bool Arguments::check_vm_args_consistency() {
}
#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::apply_ergo() {
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);
}