8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing

JEP 245: implement ranges and constraints for runtime flags.

Co-authored-by: Goetz Lindenmaier <goetz.lindenmaier@sap.com>
Reviewed-by: coleenp, ddmitriev, jiangli, goetz
This commit is contained in:
Gerard Ziemski 2015-10-15 13:34:21 -05:00
parent 7b389d3533
commit 22838597ea
17 changed files with 225 additions and 57 deletions

View file

@ -3329,19 +3329,6 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
return JNI_EINVAL;
}
#endif
} else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
julong max_direct_memory_size = 0;
ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
if (errcode != arg_in_range) {
jio_fprintf(defaultStream::error_stream(),
"Invalid maximum direct memory size: %s\n",
option->optionString);
describe_range_error(errcode);
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, MaxDirectMemorySize, max_direct_memory_size) != Flag::SUCCESS) {
return JNI_EINVAL;
}
#if !INCLUDE_MANAGEMENT
} else if (match_option(option, "-XX:+ManagementServer")) {
jio_fprintf(defaultStream::error_stream(),