mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8003581: UseG1GC is not properly accounted for by INCLUDE_ALTERNATE_GCS
Fix warning messages when selected garbage collectors are excluded from the minimal jvm. Reviewed-by: dholmes, cjplummer
This commit is contained in:
parent
deceb833bf
commit
469a44bcd6
1 changed files with 26 additions and 28 deletions
|
@ -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 ||
|
||||
|
@ -3064,6 +3054,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) {
|
||||
|
@ -3179,28 +3190,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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue