8140723: Remove source code conditionalized on JAVASE_EMBEDDED

Reviewed-by: twisti, fparain, cjplummer
This commit is contained in:
David Holmes 2016-07-26 23:52:25 -04:00
parent 5599ff5261
commit 5c9019c64a
11 changed files with 30 additions and 63 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -56,7 +56,7 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
#endif
#endif
#if defined(COMPILER2) && !defined(JAVASE_EMBEDDED)
#if defined(COMPILER2)
// Include Restricted Transactional Memory lock eliding optimization
#define INCLUDE_RTM_OPT 1
#endif

View File

@ -1784,11 +1784,7 @@ void Arguments::select_gc_ergonomically() {
if (should_auto_select_low_pause_collector()) {
FLAG_SET_ERGO_IF_DEFAULT(bool, UseConcMarkSweepGC, true);
} else {
#if defined(JAVASE_EMBEDDED)
FLAG_SET_ERGO_IF_DEFAULT(bool, UseParallelGC, true);
#else
FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true);
#endif
}
} else {
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);

View File

@ -458,12 +458,6 @@ public:
#define falseInProduct true
#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
// product flags are always settable / visible
// notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
@ -592,7 +586,7 @@ public:
product_pd(bool, UseMembar, \
"(Unstable) Issues membars on thread state transitions") \
\
develop(bool, CleanChunkPoolAsync, falseInEmbedded, \
develop(bool, CleanChunkPoolAsync, true, \
"Clean the chunk pool asynchronously") \
\
experimental(bool, AlwaysSafeConstructors, false, \
@ -2890,15 +2884,10 @@ public:
\
/* notice: the max range value here is max_jint, not max_intx */ \
/* because of overflow issue */ \
NOT_EMBEDDED(diagnostic(intx, GuaranteedSafepointInterval, 1000, \
diagnostic(intx, GuaranteedSafepointInterval, 1000, \
"Guarantee a safepoint (at least) every so many milliseconds " \
"(0 means none)")) \
NOT_EMBEDDED(range(0, max_jint)) \
\
EMBEDDED_ONLY(product(intx, GuaranteedSafepointInterval, 0, \
"Guarantee a safepoint (at least) every so many milliseconds " \
"(0 means none)")) \
EMBEDDED_ONLY(range(0, max_jint)) \
"(0 means none)") \
range(0, max_jint) \
\
product(intx, SafepointTimeoutDelay, 10000, \
"Delay in milliseconds for option SafepointTimeout") \
@ -3800,7 +3789,7 @@ public:
\
/* flags for performance data collection */ \
\
product(bool, UsePerfData, falseInEmbedded, \
product(bool, UsePerfData, true, \
"Flag to disable jvmstat instrumentation for performance testing "\
"and problem isolation purposes") \
\

View File

@ -110,7 +110,7 @@ bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
#ifndef HOTSPOT_VM_DISTRO
#error HOTSPOT_VM_DISTRO must be defined
#endif
#define VMNAME HOTSPOT_VM_DISTRO " " VMLP EMBEDDED_ONLY("Embedded ") VMTYPE " VM"
#define VMNAME HOTSPOT_VM_DISTRO " " VMLP VMTYPE " VM"
const char* Abstract_VM_Version::vm_name() {
return VMNAME;

View File

@ -458,14 +458,6 @@
#define NOT_AARCH64(code) code
#endif
#ifdef JAVASE_EMBEDDED
#define EMBEDDED_ONLY(code) code
#define NOT_EMBEDDED(code)
#else
#define EMBEDDED_ONLY(code)
#define NOT_EMBEDDED(code) code
#endif
#define define_pd_global(type, name, value) const type pd_##name = value;
// Helper macros for constructing file names for includes.

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
@ -89,7 +89,7 @@ public abstract class RTMGenericCommandLineOptionTest
@Override
public void runTestCases() throws Throwable {
if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) {
if (Platform.isServer() && !Platform.isEmbedded()) {
if (Platform.isServer()) {
runX86SupportedVMTestCases();
} else {
runX86UnsupportedVMTestCases();

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
@ -31,6 +31,6 @@ import java.util.function.BooleanSupplier;
public class SupportedVM implements BooleanSupplier {
@Override
public boolean getAsBoolean() {
return Platform.isServer() && !Platform.isEmbedded();
return Platform.isServer();
}
}

View File

@ -55,14 +55,10 @@ public class TestSelectDefaultGC {
output.shouldHaveExitValue(0);
final boolean isServer = actAsServer;
final boolean isEmbedded = Platform.isEmbedded();
// Verify GC selection
// G1 is default for non-embedded server class machines
assertVMOption(output, "UseG1GC", isServer && !isEmbedded);
// Parallel is default for embedded server class machines
assertVMOption(output, "UseParallelGC", isServer && isEmbedded);
assertVMOption(output, "UseParallelOldGC", isServer && isEmbedded);
// G1 is default for server class machines
assertVMOption(output, "UseG1GC", isServer);
// Serial is default for non-server class machines
assertVMOption(output, "UseSerialGC", !isServer);
// CMS is never default

View File

@ -39,23 +39,21 @@ import jdk.test.lib.Platform;
public class MonitorMismatchTest {
public static void main(String... args) throws Exception {
if (!Platform.isEmbedded()){
// monitormismatch should turn on.
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
"-XX:+TieredCompilation",
"-Xlog:monitormismatch=info",
"MonitorMismatchHelper");
OutputAnalyzer o = new OutputAnalyzer(pb.start());
o.shouldContain("[monitormismatch] Monitor mismatch in method");
// monitormismatch should turn on.
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
"-XX:+TieredCompilation",
"-Xlog:monitormismatch=info",
"MonitorMismatchHelper");
OutputAnalyzer o = new OutputAnalyzer(pb.start());
o.shouldContain("[monitormismatch] Monitor mismatch in method");
// monitormismatch should turn off.
pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
"-XX:+TieredCompilation",
"-Xlog:monitormismatch=off",
"MonitorMismatchHelper");
o = new OutputAnalyzer(pb.start());
o.shouldNotContain("[monitormismatch]");
}
// monitormismatch should turn off.
pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
"-XX:+TieredCompilation",
"-Xlog:monitormismatch=off",
"MonitorMismatchHelper");
o = new OutputAnalyzer(pb.start());
o.shouldNotContain("[monitormismatch]");
};
}

View File

@ -60,10 +60,6 @@ public class Platform {
return vmName.endsWith(" Minimal VM");
}
public static boolean isEmbedded() {
return vmName.contains("Embedded");
}
public static boolean isTieredSupported() {
return compiler.contains("Tiered Compilers");
}

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
@ -49,7 +49,7 @@ public class TestMutuallyExclusivePlatformPredicates {
BITNESS("is32bit", "is64bit"),
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero"),
IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach",
IGNORED("isDebugBuild", "shouldSAAttach",
"canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");
public final List<String> methodNames;