7061192: option handling adjustments for oracle and embedded builds

Reviewed-by: dholmes, never, jwilhelm, kvn
This commit is contained in:
John Coomes 2011-07-06 12:17:44 -07:00
parent 07d5e13794
commit 769ba74d9c
2 changed files with 32 additions and 6 deletions

View File

@ -251,6 +251,11 @@ static ObsoleteFlag obsolete_jvm_flags[] = {
{ "UseParallelOldGCDensePrefix", { "UseParallelOldGCDensePrefix",
JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) }, JDK_Version::jdk_update(6,27), JDK_Version::jdk(8) },
{ "AllowTransitionalJSR292", JDK_Version::jdk(7), JDK_Version::jdk(8) }, { "AllowTransitionalJSR292", JDK_Version::jdk(7), JDK_Version::jdk(8) },
{ "UseCompressedStrings", JDK_Version::jdk(7), JDK_Version::jdk(8) },
#ifdef PRODUCT
{ "DesiredMethodLimit",
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
#endif // PRODUCT
{ NULL, JDK_Version(0), JDK_Version(0) } { NULL, JDK_Version(0), JDK_Version(0) }
}; };
@ -2912,6 +2917,18 @@ void Arguments::set_shared_spaces_flags() {
} }
} }
// Disable options not supported in this release, with a warning if they
// were explicitly requested on the command-line
#define UNSUPPORTED_OPTION(opt, description) \
do { \
if (opt) { \
if (FLAG_IS_CMDLINE(opt)) { \
warning(description " is disabled in this release."); \
} \
FLAG_SET_DEFAULT(opt, false); \
} \
} while(0)
// Parse entry point called from JNI_CreateJavaVM // Parse entry point called from JNI_CreateJavaVM
jint Arguments::parse(const JavaVMInitArgs* args) { jint Arguments::parse(const JavaVMInitArgs* args) {
@ -3009,6 +3026,13 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
return result; return result;
} }
#ifdef JAVASE_EMBEDDED
#ifdef PPC
UNSUPPORTED_OPTION(EnableInvokeDynamic, "Invoke dynamic");
#endif
UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
#endif
#ifndef PRODUCT #ifndef PRODUCT
if (TraceBytecodesAt != 0) { if (TraceBytecodesAt != 0) {
TraceBytecodes = true; TraceBytecodes = true;

View File

@ -343,6 +343,12 @@ class CommandLineFlags {
#define falseInTiered true #define falseInTiered true
#endif #endif
#ifdef JAVASE_EMBEDDED
#define falseInEmbedded false
#else
#define falseInEmbedded true
#endif
// develop flags are settable / visible only during development and are constant in the PRODUCT version // develop flags are settable / visible only during development and are constant in the PRODUCT version
// product flags are always settable / visible // product flags are always settable / visible
// notproduct flags are settable / visible only during development and are not declared in the PRODUCT version // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
@ -3611,13 +3617,9 @@ class CommandLineFlags {
\ \
/* flags for performance data collection */ \ /* flags for performance data collection */ \
\ \
NOT_EMBEDDED(product(bool, UsePerfData, true, \ product(bool, UsePerfData, falseInEmbedded, \
"Flag to disable jvmstat instrumentation for performance testing" \ "Flag to disable jvmstat instrumentation for performance testing" \
"and problem isolation purposes.")) \ "and problem isolation purposes.") \
\
EMBEDDED_ONLY(product(bool, UsePerfData, false, \
"Flag to disable jvmstat instrumentation for performance testing" \
"and problem isolation purposes.")) \
\ \
product(bool, PerfDataSaveToFile, false, \ product(bool, PerfDataSaveToFile, false, \
"Save PerfData memory to hsperfdata_<pid> file on exit") \ "Save PerfData memory to hsperfdata_<pid> file on exit") \