src/hotspot/share/runtime/jvmFlagWriteableList.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/src/hotspot/share/runtime/commandLineFlagWriteableList.cpp Thu Mar 29 13:44:38 2018
--- new/src/hotspot/share/runtime/jvmFlagWriteableList.cpp Thu Mar 29 13:44:38 2018
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 21,31 ****
--- 21,31 ----
* questions.
*
*/
#include "precompiled.hpp"
! #include "runtime/commandLineFlagWriteableList.hpp"
! #include "runtime/jvmFlagWriteableList.hpp"
#include "runtime/os.hpp"
#if INCLUDE_ALL_GCS
#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
#include "gc/g1/g1_globals.hpp"
#include "gc/g1/heapRegionBounds.inline.hpp"
*** 39,60 ****
--- 39,60 ----
#endif // COMPILER2
#if INCLUDE_JVMCI
#include "jvmci/jvmci_globals.hpp"
#endif
! bool CommandLineFlagWriteable::is_writeable(void) {
! bool JVMFlagWriteable::is_writeable(void) {
return _writeable;
}
! void CommandLineFlagWriteable::mark_once(void) {
! void JVMFlagWriteable::mark_once(void) {
if (_type == Once) {
_writeable = false;
}
}
! void CommandLineFlagWriteable::mark_startup(void) {
! if (_type == CommandLineFlagWriteable::CommandLineOnly) {
! void JVMFlagWriteable::mark_startup(void) {
! if (_type == JVMFlagWriteable::CommandLineOnly) {
_writeable = false;
}
}
// No control emitting
*** 70,103 ****
--- 70,103 ----
void emit_writeable_uintx(const char* /*name*/) { /* NOP */ }
void emit_writeable_uint64_t(const char* /*name*/) { /* NOP */ }
void emit_writeable_size_t(const char* /*name*/) { /* NOP */ }
void emit_writeable_double(const char* /*name*/) { /* NOP */ }
! // CommandLineFlagWriteable emitting code functions if range arguments are provided
! void emit_writeable_bool(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! // JVMFlagWriteable emitting code functions if range arguments are provided
! void emit_writeable_bool(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_int(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_int(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_intx(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_intx(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_uint(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_uint(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_uintx(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_uintx(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_uint64_t(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_uint64_t(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_size_t(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_size_t(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
! void emit_writeable_double(const char* name, CommandLineFlagWriteable::WriteableType type) {
! CommandLineFlagWriteableList::add(new CommandLineFlagWriteable(name, type));
! void emit_writeable_double(const char* name, JVMFlagWriteable::WriteableType type) {
! JVMFlagWriteableList::add(new JVMFlagWriteable(name, type));
}
// Generate code to call emit_writeable_xxx function
#define EMIT_WRITEABLE_PRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
#define EMIT_WRITEABLE_COMMERCIAL_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
*** 111,128 ****
--- 111,128 ----
#define EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG(type, name, doc) ); emit_writeable_##type(#name
#define EMIT_WRITEABLE_NOTPRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
#define EMIT_WRITEABLE_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
// Generate type argument to pass into emit_writeable_xxx functions
! #define EMIT_WRITEABLE(a) , CommandLineFlagWriteable::a
! #define EMIT_WRITEABLE(a) , JVMFlagWriteable::a
#define INITIAL_WRITEABLES_SIZE 2
! GrowableArray<CommandLineFlagWriteable*>* CommandLineFlagWriteableList::_controls = NULL;
! GrowableArray<JVMFlagWriteable*>* JVMFlagWriteableList::_controls = NULL;
! void CommandLineFlagWriteableList::init(void) {
! void JVMFlagWriteableList::init(void) {
! _controls = new (ResourceObj::C_HEAP, mtArguments) GrowableArray<CommandLineFlagWriteable*>(INITIAL_WRITEABLES_SIZE, true);
! _controls = new (ResourceObj::C_HEAP, mtArguments) GrowableArray<JVMFlagWriteable*>(INITIAL_WRITEABLES_SIZE, true);
emit_writeable_no(NULL RUNTIME_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
EMIT_WRITEABLE_PD_DEVELOPER_FLAG,
EMIT_WRITEABLE_PRODUCT_FLAG,
EMIT_WRITEABLE_PD_PRODUCT_FLAG,
*** 204,226 ****
--- 204,226 ----
IGNORE_CONSTRAINT,
EMIT_WRITEABLE));
#endif // INCLUDE_ALL_GCS
}
! CommandLineFlagWriteable* CommandLineFlagWriteableList::find(const char* name) {
! CommandLineFlagWriteable* found = NULL;
! JVMFlagWriteable* JVMFlagWriteableList::find(const char* name) {
! JVMFlagWriteable* found = NULL;
for (int i=0; i<length(); i++) {
! CommandLineFlagWriteable* writeable = at(i);
! JVMFlagWriteable* writeable = at(i);
if (strcmp(writeable->name(), name) == 0) {
found = writeable;
break;
}
}
return found;
}
! void CommandLineFlagWriteableList::mark_startup(void) {
! void JVMFlagWriteableList::mark_startup(void) {
for (int i=0; i<length(); i++) {
! CommandLineFlagWriteable* writeable = at(i);
! JVMFlagWriteable* writeable = at(i);
writeable->mark_startup();
}
}
src/hotspot/share/runtime/jvmFlagWriteableList.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File