8140723: Remove source code conditionalized on JAVASE_EMBEDDED
Reviewed-by: twisti, fparain, cjplummer
This commit is contained in:
parent
5599ff5261
commit
5c9019c64a
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -56,7 +56,7 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(COMPILER2) && !defined(JAVASE_EMBEDDED)
|
#if defined(COMPILER2)
|
||||||
// Include Restricted Transactional Memory lock eliding optimization
|
// Include Restricted Transactional Memory lock eliding optimization
|
||||||
#define INCLUDE_RTM_OPT 1
|
#define INCLUDE_RTM_OPT 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -1784,11 +1784,7 @@ void Arguments::select_gc_ergonomically() {
|
|||||||
if (should_auto_select_low_pause_collector()) {
|
if (should_auto_select_low_pause_collector()) {
|
||||||
FLAG_SET_ERGO_IF_DEFAULT(bool, UseConcMarkSweepGC, true);
|
FLAG_SET_ERGO_IF_DEFAULT(bool, UseConcMarkSweepGC, true);
|
||||||
} else {
|
} else {
|
||||||
#if defined(JAVASE_EMBEDDED)
|
|
||||||
FLAG_SET_ERGO_IF_DEFAULT(bool, UseParallelGC, true);
|
|
||||||
#else
|
|
||||||
FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true);
|
FLAG_SET_ERGO_IF_DEFAULT(bool, UseG1GC, true);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
|
FLAG_SET_ERGO_IF_DEFAULT(bool, UseSerialGC, true);
|
||||||
|
@ -458,12 +458,6 @@ public:
|
|||||||
#define falseInProduct true
|
#define falseInProduct true
|
||||||
#endif
|
#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
|
// develop flags are settable / visible only during development and are constant in the PRODUCT version
|
||||||
// product flags are always settable / visible
|
// product flags are always settable / visible
|
||||||
// notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
|
// 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, \
|
product_pd(bool, UseMembar, \
|
||||||
"(Unstable) Issues membars on thread state transitions") \
|
"(Unstable) Issues membars on thread state transitions") \
|
||||||
\
|
\
|
||||||
develop(bool, CleanChunkPoolAsync, falseInEmbedded, \
|
develop(bool, CleanChunkPoolAsync, true, \
|
||||||
"Clean the chunk pool asynchronously") \
|
"Clean the chunk pool asynchronously") \
|
||||||
\
|
\
|
||||||
experimental(bool, AlwaysSafeConstructors, false, \
|
experimental(bool, AlwaysSafeConstructors, false, \
|
||||||
@ -2890,15 +2884,10 @@ public:
|
|||||||
\
|
\
|
||||||
/* notice: the max range value here is max_jint, not max_intx */ \
|
/* notice: the max range value here is max_jint, not max_intx */ \
|
||||||
/* because of overflow issue */ \
|
/* because of overflow issue */ \
|
||||||
NOT_EMBEDDED(diagnostic(intx, GuaranteedSafepointInterval, 1000, \
|
diagnostic(intx, GuaranteedSafepointInterval, 1000, \
|
||||||
"Guarantee a safepoint (at least) every so many milliseconds " \
|
"Guarantee a safepoint (at least) every so many milliseconds " \
|
||||||
"(0 means none)")) \
|
"(0 means none)") \
|
||||||
NOT_EMBEDDED(range(0, max_jint)) \
|
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)) \
|
|
||||||
\
|
\
|
||||||
product(intx, SafepointTimeoutDelay, 10000, \
|
product(intx, SafepointTimeoutDelay, 10000, \
|
||||||
"Delay in milliseconds for option SafepointTimeout") \
|
"Delay in milliseconds for option SafepointTimeout") \
|
||||||
@ -3800,7 +3789,7 @@ public:
|
|||||||
\
|
\
|
||||||
/* flags for performance data collection */ \
|
/* flags for performance data collection */ \
|
||||||
\
|
\
|
||||||
product(bool, UsePerfData, falseInEmbedded, \
|
product(bool, UsePerfData, true, \
|
||||||
"Flag to disable jvmstat instrumentation for performance testing "\
|
"Flag to disable jvmstat instrumentation for performance testing "\
|
||||||
"and problem isolation purposes") \
|
"and problem isolation purposes") \
|
||||||
\
|
\
|
||||||
|
@ -110,7 +110,7 @@ bool Abstract_VM_Version::_parallel_worker_threads_initialized = false;
|
|||||||
#ifndef HOTSPOT_VM_DISTRO
|
#ifndef HOTSPOT_VM_DISTRO
|
||||||
#error HOTSPOT_VM_DISTRO must be defined
|
#error HOTSPOT_VM_DISTRO must be defined
|
||||||
#endif
|
#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() {
|
const char* Abstract_VM_Version::vm_name() {
|
||||||
return VMNAME;
|
return VMNAME;
|
||||||
|
@ -458,14 +458,6 @@
|
|||||||
#define NOT_AARCH64(code) code
|
#define NOT_AARCH64(code) code
|
||||||
#endif
|
#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;
|
#define define_pd_global(type, name, value) const type pd_##name = value;
|
||||||
|
|
||||||
// Helper macros for constructing file names for includes.
|
// Helper macros for constructing file names for includes.
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -89,7 +89,7 @@ public abstract class RTMGenericCommandLineOptionTest
|
|||||||
@Override
|
@Override
|
||||||
public void runTestCases() throws Throwable {
|
public void runTestCases() throws Throwable {
|
||||||
if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) {
|
if (Platform.isX86() || Platform.isX64() || Platform.isPPC()) {
|
||||||
if (Platform.isServer() && !Platform.isEmbedded()) {
|
if (Platform.isServer()) {
|
||||||
runX86SupportedVMTestCases();
|
runX86SupportedVMTestCases();
|
||||||
} else {
|
} else {
|
||||||
runX86UnsupportedVMTestCases();
|
runX86UnsupportedVMTestCases();
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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 {
|
public class SupportedVM implements BooleanSupplier {
|
||||||
@Override
|
@Override
|
||||||
public boolean getAsBoolean() {
|
public boolean getAsBoolean() {
|
||||||
return Platform.isServer() && !Platform.isEmbedded();
|
return Platform.isServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,14 +55,10 @@ public class TestSelectDefaultGC {
|
|||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
|
|
||||||
final boolean isServer = actAsServer;
|
final boolean isServer = actAsServer;
|
||||||
final boolean isEmbedded = Platform.isEmbedded();
|
|
||||||
|
|
||||||
// Verify GC selection
|
// Verify GC selection
|
||||||
// G1 is default for non-embedded server class machines
|
// G1 is default for server class machines
|
||||||
assertVMOption(output, "UseG1GC", isServer && !isEmbedded);
|
assertVMOption(output, "UseG1GC", isServer);
|
||||||
// Parallel is default for embedded server class machines
|
|
||||||
assertVMOption(output, "UseParallelGC", isServer && isEmbedded);
|
|
||||||
assertVMOption(output, "UseParallelOldGC", isServer && isEmbedded);
|
|
||||||
// Serial is default for non-server class machines
|
// Serial is default for non-server class machines
|
||||||
assertVMOption(output, "UseSerialGC", !isServer);
|
assertVMOption(output, "UseSerialGC", !isServer);
|
||||||
// CMS is never default
|
// CMS is never default
|
||||||
|
@ -39,23 +39,21 @@ import jdk.test.lib.Platform;
|
|||||||
public class MonitorMismatchTest {
|
public class MonitorMismatchTest {
|
||||||
|
|
||||||
public static void main(String... args) throws Exception {
|
public static void main(String... args) throws Exception {
|
||||||
if (!Platform.isEmbedded()){
|
// monitormismatch should turn on.
|
||||||
// monitormismatch should turn on.
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
|
"-XX:+TieredCompilation",
|
||||||
"-XX:+TieredCompilation",
|
"-Xlog:monitormismatch=info",
|
||||||
"-Xlog:monitormismatch=info",
|
"MonitorMismatchHelper");
|
||||||
"MonitorMismatchHelper");
|
OutputAnalyzer o = new OutputAnalyzer(pb.start());
|
||||||
OutputAnalyzer o = new OutputAnalyzer(pb.start());
|
o.shouldContain("[monitormismatch] Monitor mismatch in method");
|
||||||
o.shouldContain("[monitormismatch] Monitor mismatch in method");
|
|
||||||
|
|
||||||
// monitormismatch should turn off.
|
// monitormismatch should turn off.
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
|
pb = ProcessTools.createJavaProcessBuilder("-Xcomp",
|
||||||
"-XX:+TieredCompilation",
|
"-XX:+TieredCompilation",
|
||||||
"-Xlog:monitormismatch=off",
|
"-Xlog:monitormismatch=off",
|
||||||
"MonitorMismatchHelper");
|
"MonitorMismatchHelper");
|
||||||
o = new OutputAnalyzer(pb.start());
|
o = new OutputAnalyzer(pb.start());
|
||||||
o.shouldNotContain("[monitormismatch]");
|
o.shouldNotContain("[monitormismatch]");
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -60,10 +60,6 @@ public class Platform {
|
|||||||
return vmName.endsWith(" Minimal VM");
|
return vmName.endsWith(" Minimal VM");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isEmbedded() {
|
|
||||||
return vmName.contains("Embedded");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isTieredSupported() {
|
public static boolean isTieredSupported() {
|
||||||
return compiler.contains("Tiered Compilers");
|
return compiler.contains("Tiered Compilers");
|
||||||
}
|
}
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -49,7 +49,7 @@ public class TestMutuallyExclusivePlatformPredicates {
|
|||||||
BITNESS("is32bit", "is64bit"),
|
BITNESS("is32bit", "is64bit"),
|
||||||
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
|
OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
|
||||||
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero"),
|
VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero"),
|
||||||
IGNORED("isEmbedded", "isDebugBuild", "shouldSAAttach",
|
IGNORED("isDebugBuild", "shouldSAAttach",
|
||||||
"canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");
|
"canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");
|
||||||
|
|
||||||
public final List<String> methodNames;
|
public final List<String> methodNames;
|
||||||
|
Loading…
Reference in New Issue
Block a user