8152929: Remove UNSUPPORTED_GC_OPTION, use UNSUPPORTED_OPTION instead

Reviewed-by: brutisso, jmasa
This commit is contained in:
Per Lidén 2016-04-05 09:05:19 +02:00
parent ab20ebaaa0
commit 07299d4428
6 changed files with 23 additions and 33 deletions

View File

@ -66,16 +66,6 @@
#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
#define DEFAULT_JAVA_LAUNCHER "generic"
#define UNSUPPORTED_GC_OPTION(gc) \
do { \
if (gc) { \
if (FLAG_IS_CMDLINE(gc)) { \
warning("-XX:+" #gc " not supported in this VM"); \
} \
FLAG_SET_DEFAULT(gc, false); \
} \
} while(0)
char* Arguments::_jvm_flags_file = NULL;
char** Arguments::_jvm_flags_array = NULL;
int Arguments::_num_jvm_flags = 0;
@ -1988,11 +1978,11 @@ void Arguments::select_gc_ergonomically() {
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
}
#else
UNSUPPORTED_GC_OPTION(UseG1GC);
UNSUPPORTED_GC_OPTION(UseParallelGC);
UNSUPPORTED_GC_OPTION(UseParallelOldGC);
UNSUPPORTED_GC_OPTION(UseConcMarkSweepGC);
UNSUPPORTED_GC_OPTION(UseParNewGC);
UNSUPPORTED_OPTION(UseG1GC);
UNSUPPORTED_OPTION(UseParallelGC);
UNSUPPORTED_OPTION(UseParallelOldGC);
UNSUPPORTED_OPTION(UseConcMarkSweepGC);
UNSUPPORTED_OPTION(UseParNewGC);
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
#endif // INCLUDE_ALL_GCS
}
@ -3671,7 +3661,7 @@ jint Arguments::finalize_vm_init_args(ArgumentBootClassPath* bcp_p, bool bcp_ass
#ifndef TIERED
// Tiered compilation is undefined.
UNSUPPORTED_OPTION(TieredCompilation, "TieredCompilation");
UNSUPPORTED_OPTION(TieredCompilation);
#endif
// If we are running in a headless jre, force java.awt.headless property
@ -4360,7 +4350,7 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
}
#if defined(_ALLBSD_SOURCE) || defined(AIX) // UseLargePages is not yet supported on BSD and AIX.
UNSUPPORTED_OPTION(UseLargePages, "-XX:+UseLargePages");
UNSUPPORTED_OPTION(UseLargePages);
#endif
ArgumentsExt::report_unsupported_options();

View File

@ -734,14 +734,14 @@ class Arguments : AllStatic {
// 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); \
} \
#define UNSUPPORTED_OPTION(opt) \
do { \
if (opt) { \
if (FLAG_IS_CMDLINE(opt)) { \
warning("-XX:+" #opt " not supported in this VM"); \
} \
FLAG_SET_DEFAULT(opt, false); \
} \
} while(0)
#endif // SHARE_VM_RUNTIME_ARGUMENTS_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2016, 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
@ -160,7 +160,7 @@ public class CheckCICompilerCount {
} catch (RuntimeException e) {
// Check if tiered compilation is available in this JVM
// Version. Throw exception only if it is available.
if (!(tiered && out.getOutput().contains("TieredCompilation is disabled in this release."))) {
if (!(tiered && out.getOutput().contains("-XX:+TieredCompilation not supported in this VM"))) {
throw new RuntimeException(e);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2016, 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
@ -344,7 +344,7 @@ public class CheckCompileThresholdScaling {
} catch (RuntimeException e) {
// Check if tiered compilation is available in this JVM
// Version. Throw exception only if it is available.
if (!(tiered && out.getOutput().contains("TieredCompilation is disabled in this release."))) {
if (!(tiered && out.getOutput().contains("-XX:+TieredCompilation not supported in this VM"))) {
throw new RuntimeException(e);
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2016, 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
@ -52,7 +52,7 @@ public class CheckSegmentedCodeCache {
out.shouldContain(NON_METHOD);
} catch (RuntimeException e) {
// Check if TieredCompilation is disabled (in a client VM)
if(!out.getOutput().contains("TieredCompilation is disabled in this release.")) {
if(!out.getOutput().contains("-XX:+TieredCompilation not supported in this VM")) {
// Code cache is not segmented
throw new RuntimeException("No code cache segmentation.");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2016, 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
@ -53,7 +53,7 @@ public class Test2GbHeap {
if (output.getOutput().contains("Could not reserve enough space for 2097152KB object heap")) {
// Will fail on machines with too little memory (and Windows 32-bit VM), ignore such failures.
output.shouldHaveExitValue(1);
} else if (output.getOutput().contains("G1 GC is disabled in this release")) {
} else if (output.getOutput().contains("-XX:+UseG1GC not supported in this VM")) {
// G1 is not supported on embedded, ignore such failures.
output.shouldHaveExitValue(1);
} else {