1734 } |
1734 } |
1735 jio_fprintf(defaultStream::error_stream(), |
1735 jio_fprintf(defaultStream::error_stream(), |
1736 "%s of " UINTX_FORMAT " is invalid; must be between 0 and 100\n", |
1736 "%s of " UINTX_FORMAT " is invalid; must be between 0 and 100\n", |
1737 name, value); |
1737 name, value); |
1738 return false; |
1738 return false; |
1739 } |
|
1740 |
|
1741 static void force_serial_gc() { |
|
1742 FLAG_SET_DEFAULT(UseSerialGC, true); |
|
1743 FLAG_SET_DEFAULT(UseParNewGC, false); |
|
1744 FLAG_SET_DEFAULT(UseConcMarkSweepGC, false); |
|
1745 FLAG_SET_DEFAULT(CMSIncrementalMode, false); // special CMS suboption |
|
1746 FLAG_SET_DEFAULT(UseParallelGC, false); |
|
1747 FLAG_SET_DEFAULT(UseParallelOldGC, false); |
|
1748 FLAG_SET_DEFAULT(UseG1GC, false); |
|
1749 } |
1739 } |
1750 |
1740 |
1751 static bool verify_serial_gc_flags() { |
1741 static bool verify_serial_gc_flags() { |
1752 return (UseSerialGC && |
1742 return (UseSerialGC && |
1753 !(UseParNewGC || (UseConcMarkSweepGC || CMSIncrementalMode) || UseG1GC || |
1743 !(UseParNewGC || (UseConcMarkSweepGC || CMSIncrementalMode) || UseG1GC || |
3062 } \ |
3052 } \ |
3063 FLAG_SET_DEFAULT(opt, false); \ |
3053 FLAG_SET_DEFAULT(opt, false); \ |
3064 } \ |
3054 } \ |
3065 } while(0) |
3055 } while(0) |
3066 |
3056 |
|
3057 |
|
3058 #define UNSUPPORTED_GC_OPTION(gc) \ |
|
3059 do { \ |
|
3060 if (gc) { \ |
|
3061 if (FLAG_IS_CMDLINE(gc)) { \ |
|
3062 warning(#gc " is not supported in this VM. Using Serial GC."); \ |
|
3063 } \ |
|
3064 FLAG_SET_DEFAULT(gc, false); \ |
|
3065 } \ |
|
3066 } while(0) |
|
3067 |
|
3068 static void force_serial_gc() { |
|
3069 FLAG_SET_DEFAULT(UseSerialGC, true); |
|
3070 FLAG_SET_DEFAULT(CMSIncrementalMode, false); // special CMS suboption |
|
3071 UNSUPPORTED_GC_OPTION(UseG1GC); |
|
3072 UNSUPPORTED_GC_OPTION(UseParallelGC); |
|
3073 UNSUPPORTED_GC_OPTION(UseParallelOldGC); |
|
3074 UNSUPPORTED_GC_OPTION(UseConcMarkSweepGC); |
|
3075 UNSUPPORTED_GC_OPTION(UseParNewGC); |
|
3076 } |
|
3077 |
3067 // Parse entry point called from JNI_CreateJavaVM |
3078 // Parse entry point called from JNI_CreateJavaVM |
3068 |
3079 |
3069 jint Arguments::parse(const JavaVMInitArgs* args) { |
3080 jint Arguments::parse(const JavaVMInitArgs* args) { |
3070 |
3081 |
3071 // Sharing support |
3082 // Sharing support |
3177 warning("%s file is present but has been ignored. " |
3188 warning("%s file is present but has been ignored. " |
3178 "Run with -XX:Flags=%s to load the file.", |
3189 "Run with -XX:Flags=%s to load the file.", |
3179 hotspotrc, hotspotrc); |
3190 hotspotrc, hotspotrc); |
3180 } |
3191 } |
3181 |
3192 |
3182 #if (defined JAVASE_EMBEDDED || defined ARM) |
|
3183 UNSUPPORTED_OPTION(UseG1GC, "G1 GC"); |
|
3184 #endif |
|
3185 |
|
3186 #ifdef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. |
3193 #ifdef _ALLBSD_SOURCE // UseLargePages is not yet supported on BSD. |
3187 UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages"); |
3194 UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages"); |
3188 #endif |
3195 #endif |
3189 |
3196 |
3190 #if !INCLUDE_ALL_GCS |
3197 #if INCLUDE_ALL_GCS |
3191 if (UseParallelGC) { |
3198 #if (defined JAVASE_EMBEDDED || defined ARM) |
3192 warning("Parallel GC is not supported in this VM. Using Serial GC."); |
3199 UNSUPPORTED_OPTION(UseG1GC, "G1 GC"); |
3193 } |
3200 #endif |
3194 if (UseParallelOldGC) { |
3201 #endif |
3195 warning("Parallel Old GC is not supported in this VM. Using Serial GC."); |
|
3196 } |
|
3197 if (UseConcMarkSweepGC) { |
|
3198 warning("Concurrent Mark Sweep GC is not supported in this VM. Using Serial GC."); |
|
3199 } |
|
3200 if (UseParNewGC) { |
|
3201 warning("Par New GC is not supported in this VM. Using Serial GC."); |
|
3202 } |
|
3203 #endif // INCLUDE_ALL_GCS |
|
3204 |
3202 |
3205 #ifndef PRODUCT |
3203 #ifndef PRODUCT |
3206 if (TraceBytecodesAt != 0) { |
3204 if (TraceBytecodesAt != 0) { |
3207 TraceBytecodes = true; |
3205 TraceBytecodes = true; |
3208 } |
3206 } |