8047934: Adding new API for unlocking diagnostic argument

New API for unlocking diagnostic argument.

Reviewed-by: dholmes, ccheung, egahlin, iklam, bdelsart
This commit is contained in:
Jiangli Zhou 2014-10-14 12:09:33 -04:00
parent 94af790733
commit d7fe532761
4 changed files with 10 additions and 0 deletions

View File

@ -3739,6 +3739,8 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
bool settings_file_specified = false;
bool needs_hotspotrc_warning = false;
ArgumentsExt::process_options(args);
const char* flags_file;
int index;
for (index = 0; index < args->nOptions; index++) {

View File

@ -34,6 +34,7 @@ public:
static inline bool check_gc_consistency_user();
static inline bool check_gc_consistency_ergo();
static inline bool check_vm_args_consistency();
static void process_options(const JavaVMInitArgs* args) {}
};
void ArgumentsExt::select_gc_ergonomically() {

View File

@ -256,6 +256,11 @@ bool Flag::is_unlocked() const {
return is_unlocked_ext();
}
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 {

View File

@ -320,6 +320,8 @@ struct Flag {
bool is_writeable_ext() const;
bool is_external_ext() const;
void unlock_diagnostic();
void get_locked_message(char*, int) const;
void get_locked_message_ext(char*, int) const;