This commit is contained in:
Bill Pittore 2013-02-15 21:53:55 -05:00
commit 51da3d1337
4 changed files with 40 additions and 34 deletions

View file

@ -1738,16 +1738,6 @@ bool Arguments::verify_percentage(uintx value, const char* name) {
return false;
}
static void force_serial_gc() {
FLAG_SET_DEFAULT(UseSerialGC, true);
FLAG_SET_DEFAULT(UseParNewGC, false);
FLAG_SET_DEFAULT(UseConcMarkSweepGC, false);
FLAG_SET_DEFAULT(CMSIncrementalMode, false); // special CMS suboption
FLAG_SET_DEFAULT(UseParallelGC, false);
FLAG_SET_DEFAULT(UseParallelOldGC, false);
FLAG_SET_DEFAULT(UseG1GC, false);
}
static bool verify_serial_gc_flags() {
return (UseSerialGC &&
!(UseParNewGC || (UseConcMarkSweepGC || CMSIncrementalMode) || UseG1GC ||
@ -2498,7 +2488,12 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
}
// Out of the box management support
if (match_option(option, "-Dcom.sun.management", &tail)) {
#if INCLUDE_MANAGEMENT
FLAG_SET_CMDLINE(bool, ManagementServer, true);
#else
vm_exit_during_initialization(
"-Dcom.sun.management is not supported in this VM.", NULL);
#endif
}
// -Xint
} else if (match_option(option, "-Xint", &tail)) {
@ -2844,6 +2839,11 @@ SOLARIS_ONLY(
// away and will cause VM initialization failures!
warning("-XX:+UseVMInterruptibleIO is obsolete and will be removed in a future release.");
FLAG_SET_CMDLINE(bool, UseVMInterruptibleIO, true);
#if !INCLUDE_MANAGEMENT
} else if (match_option(option, "-XX:+ManagementServer", &tail)) {
vm_exit_during_initialization(
"ManagementServer is not supported in this VM.", NULL);
#endif // INCLUDE_MANAGEMENT
} else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
// Skip -XX:Flags= since that case has already been handled
if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {
@ -3072,6 +3072,27 @@ do { \
} \
} while(0)
#define UNSUPPORTED_GC_OPTION(gc) \
do { \
if (gc) { \
if (FLAG_IS_CMDLINE(gc)) { \
warning(#gc " is not supported in this VM. Using Serial GC."); \
} \
FLAG_SET_DEFAULT(gc, false); \
} \
} while(0)
static void force_serial_gc() {
FLAG_SET_DEFAULT(UseSerialGC, true);
FLAG_SET_DEFAULT(CMSIncrementalMode, false); // special CMS suboption
UNSUPPORTED_GC_OPTION(UseG1GC);
UNSUPPORTED_GC_OPTION(UseParallelGC);
UNSUPPORTED_GC_OPTION(UseParallelOldGC);
UNSUPPORTED_GC_OPTION(UseConcMarkSweepGC);
UNSUPPORTED_GC_OPTION(UseParNewGC);
}
// Parse entry point called from JNI_CreateJavaVM
jint Arguments::parse(const JavaVMInitArgs* args) {
@ -3187,28 +3208,15 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
hotspotrc, hotspotrc);
}
#if (defined JAVASE_EMBEDDED || defined ARM)
UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
#endif
#ifdef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD.
UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages");
#endif
#if !INCLUDE_ALL_GCS
if (UseParallelGC) {
warning("Parallel GC is not supported in this VM. Using Serial GC.");
}
if (UseParallelOldGC) {
warning("Parallel Old GC is not supported in this VM. Using Serial GC.");
}
if (UseConcMarkSweepGC) {
warning("Concurrent Mark Sweep GC is not supported in this VM. Using Serial GC.");
}
if (UseParNewGC) {
warning("Par New GC is not supported in this VM. Using Serial GC.");
}
#endif // INCLUDE_ALL_GCS
#if INCLUDE_ALL_GCS
#if (defined JAVASE_EMBEDDED || defined ARM)
UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
#endif
#endif
#ifndef PRODUCT
if (TraceBytecodesAt != 0) {