Skip to content
Permalink
Browse files
8278638: Remove FLAG_IS_CMDLINE(UseSharedSpaces)
Reviewed-by: dcubed, coleenp
  • Loading branch information
Harold Seigel committed Dec 14, 2021
1 parent 03f647f commit 98a8d446b69fd84355731a8a3192cbd42671abb8
Showing 1 changed file with 5 additions and 1 deletion.
@@ -119,6 +119,9 @@ bool Arguments::_has_jimage = false;

char* Arguments::_ext_dirs = NULL;

// True if -Xshare:auto option was specified.
static bool xshare_auto_cmd_line = false;

bool PathString::set_value(const char *value) {
if (_value != NULL) {
FreeHeap(_value);
@@ -2712,6 +2715,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
} else if (match_option(option, "-Xshare:auto")) {
UseSharedSpaces = true;
RequireSharedSpaces = false;
xshare_auto_cmd_line = true;
// -Xshare:off
} else if (match_option(option, "-Xshare:off")) {
UseSharedSpaces = false;
@@ -3992,7 +3996,7 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
"DumpLoadedClassList is not supported in this VM\n");
return JNI_ERR;
}
if ((UseSharedSpaces && FLAG_IS_CMDLINE(UseSharedSpaces)) ||
if ((UseSharedSpaces && xshare_auto_cmd_line) ||
log_is_enabled(Info, cds)) {
warning("Shared spaces are not supported in this VM");
UseSharedSpaces = false;

1 comment on commit 98a8d44

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 98a8d44 Dec 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.