8237825: ZGC: Replace -XX:ZPath with -XX:AllocateHeapAt
Reviewed-by: eosterlund
This commit is contained in:
parent
24691f248c
commit
0f06a9a5cd
@ -25,6 +25,7 @@
|
|||||||
#include "gc/z/zArray.inline.hpp"
|
#include "gc/z/zArray.inline.hpp"
|
||||||
#include "gc/z/zErrno.hpp"
|
#include "gc/z/zErrno.hpp"
|
||||||
#include "gc/z/zMountPoint_linux.hpp"
|
#include "gc/z/zMountPoint_linux.hpp"
|
||||||
|
#include "runtime/globals.hpp"
|
||||||
#include "logging/log.hpp"
|
#include "logging/log.hpp"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -34,9 +35,9 @@
|
|||||||
#define PROC_SELF_MOUNTINFO "/proc/self/mountinfo"
|
#define PROC_SELF_MOUNTINFO "/proc/self/mountinfo"
|
||||||
|
|
||||||
ZMountPoint::ZMountPoint(const char* filesystem, const char** preferred_mountpoints) {
|
ZMountPoint::ZMountPoint(const char* filesystem, const char** preferred_mountpoints) {
|
||||||
if (ZPath != NULL) {
|
if (AllocateHeapAt != NULL) {
|
||||||
// Use specified path
|
// Use specified path
|
||||||
_path = strdup(ZPath);
|
_path = strdup(AllocateHeapAt);
|
||||||
} else {
|
} else {
|
||||||
// Find suitable path
|
// Find suitable path
|
||||||
_path = find_mountpoint(filesystem, preferred_mountpoints);
|
_path = find_mountpoint(filesystem, preferred_mountpoints);
|
||||||
|
@ -211,7 +211,7 @@ int ZPhysicalMemoryBacking::create_file_fd(const char* name) const {
|
|||||||
// Find mountpoint
|
// Find mountpoint
|
||||||
ZMountPoint mountpoint(filesystem, preferred_mountpoints);
|
ZMountPoint mountpoint(filesystem, preferred_mountpoints);
|
||||||
if (mountpoint.get() == NULL) {
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ int ZPhysicalMemoryBacking::create_file_fd(const char* name) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int ZPhysicalMemoryBacking::create_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
|
// 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
|
// 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
|
// not be supported at all (requires kernel >= 3.17), or it might not support large
|
||||||
|
@ -38,10 +38,6 @@
|
|||||||
range, \
|
range, \
|
||||||
constraint) \
|
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, \
|
experimental(double, ZAllocationSpikeTolerance, 2.0, \
|
||||||
"Allocation spike tolerance factor") \
|
"Allocation spike tolerance factor") \
|
||||||
\
|
\
|
||||||
|
@ -2113,12 +2113,6 @@ bool Arguments::check_vm_args_consistency() {
|
|||||||
}
|
}
|
||||||
#endif
|
#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();
|
status = status && GCArguments::check_args_consistency();
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
@ -4159,9 +4153,7 @@ jint Arguments::apply_ergo() {
|
|||||||
|
|
||||||
jint Arguments::adjust_after_os() {
|
jint Arguments::adjust_after_os() {
|
||||||
if (UseNUMA) {
|
if (UseNUMA) {
|
||||||
if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
|
if (UseParallelGC) {
|
||||||
FLAG_SET_ERGO(UseNUMA, false);
|
|
||||||
} else if (UseParallelGC) {
|
|
||||||
if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
|
if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
|
||||||
FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
|
FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user