8073500: Prevent certain commercial flags from being changed at runtime

Implement new writeable mechanism for flag control

Reviewed-by: coleenp, iklam
This commit is contained in:
Gerard Ziemski 2016-05-10 12:10:21 -05:00
parent 9127a0961b
commit a991801b42
29 changed files with 699 additions and 140 deletions

View file

@ -42,6 +42,7 @@
#include "runtime/arguments.hpp"
#include "runtime/arguments_ext.hpp"
#include "runtime/commandLineFlagConstraintList.hpp"
#include "runtime/commandLineFlagWriteableList.hpp"
#include "runtime/commandLineFlagRangeList.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
@ -4081,9 +4082,10 @@ bool Arguments::handle_deprecated_print_gc_flags() {
jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
assert(verify_special_jvm_flags(), "deprecated and obsolete flag table inconsistent");
// Initialize ranges and constraints
// Initialize ranges, constraints and writeables
CommandLineFlagRangeList::init();
CommandLineFlagConstraintList::init();
CommandLineFlagWriteableList::init();
// If flag "-XX:Flags=flags-file" is used it will be the first option to be processed.
const char* hotspotrc = ".hotspotrc";