src/share/vm/runtime/globals.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
8129855 Cdiff src/share/vm/runtime/globals.cpp
src/share/vm/runtime/globals.cpp
Print this page
*** 303,341 ****
void Flag::unlock_diagnostic() {
assert(is_diagnostic(), "sanity");
_flags = Flags(_flags & ~KIND_DIAGNOSTIC);
}
! // Get custom message for this locked flag, or return NULL if
! // none is available.
! void Flag::get_locked_message(char* buf, int buflen) const {
buf[0] = '\0';
if (is_diagnostic() && !is_unlocked()) {
jio_snprintf(buf, buflen,
"Error: VM option '%s' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.\n"
"Error: The unlock option must precede '%s'.\n",
_name, _name);
! return;
}
if (is_experimental() && !is_unlocked()) {
jio_snprintf(buf, buflen,
"Error: VM option '%s' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.\n"
"Error: The unlock option must precede '%s'.\n",
_name, _name);
! return;
}
if (is_develop() && is_product_build()) {
jio_snprintf(buf, buflen, "Error: VM option '%s' is develop and is available only in debug version of VM.\n",
_name);
! return;
}
if (is_notproduct() && is_product_build()) {
jio_snprintf(buf, buflen, "Error: VM option '%s' is notproduct and is available only in debug version of VM.\n",
_name);
! return;
}
get_locked_message_ext(buf, buflen);
}
bool Flag::is_writeable() const {
return is_manageable() || (is_product() && is_read_write()) || is_writeable_ext();
}
--- 303,342 ----
void Flag::unlock_diagnostic() {
assert(is_diagnostic(), "sanity");
_flags = Flags(_flags & ~KIND_DIAGNOSTIC);
}
! // Get custom message for this locked flag, or NULL if
! // none is available. Returns message type produced.
! Flag::MsgType Flag::get_locked_message(char* buf, int buflen) const {
buf[0] = '\0';
if (is_diagnostic() && !is_unlocked()) {
jio_snprintf(buf, buflen,
"Error: VM option '%s' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.\n"
"Error: The unlock option must precede '%s'.\n",
_name, _name);
! return Flag::DIAGNOSTIC_FLAG_BUT_LOCKED;
}
if (is_experimental() && !is_unlocked()) {
jio_snprintf(buf, buflen,
"Error: VM option '%s' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions.\n"
"Error: The unlock option must precede '%s'.\n",
_name, _name);
! return Flag::EXPERIMENTAL_FLAG_BUT_LOCKED;
}
if (is_develop() && is_product_build()) {
jio_snprintf(buf, buflen, "Error: VM option '%s' is develop and is available only in debug version of VM.\n",
_name);
! return Flag::DEVELOPER_FLAG_BUT_PRODUCT_BUILD;
}
if (is_notproduct() && is_product_build()) {
jio_snprintf(buf, buflen, "Error: VM option '%s' is notproduct and is available only in debug version of VM.\n",
_name);
! return Flag::NOTPRODUCT_FLAG_BUT_PRODUCT_BUILD;
}
get_locked_message_ext(buf, buflen);
+ return Flag::NONE;
}
bool Flag::is_writeable() const {
return is_manageable() || (is_product() && is_read_write()) || is_writeable_ext();
}
src/share/vm/runtime/globals.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File