8173679: Disable ProfileTrap code and UseRTMLocking in emulated client Win32
Summary: Made emulatedVM related changes in cli verfiy*SameVM.
Reviewed-by: kvn
--- a/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java Thu Feb 02 05:26:46 2017 -0800
+++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java Fri Feb 03 19:26:48 2017 -0800
@@ -199,6 +199,10 @@
throws Throwable {
List<String> finalOptions = new ArrayList<>();
finalOptions.add(CommandLineOptionTest.getVMTypeOption());
+ String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated();
+ if (extraFlagForEmulated != null) {
+ finalOptions.add(extraFlagForEmulated);
+ }
Collections.addAll(finalOptions, options);
CommandLineOptionTest.verifyJVMStartup(expectedMessages,
@@ -390,6 +394,10 @@
String... additionalVMOpts) throws Throwable {
List<String> finalOptions = new ArrayList<>();
finalOptions.add(CommandLineOptionTest.getVMTypeOption());
+ String extraFlagForEmulated = CommandLineOptionTest.getVMTypeOptionForEmulated();
+ if (extraFlagForEmulated != null) {
+ finalOptions.add(extraFlagForEmulated);
+ }
Collections.addAll(finalOptions, additionalVMOpts);
CommandLineOptionTest.verifyOptionValue(optionName, expectedValue,
@@ -497,6 +505,18 @@
throw new RuntimeException("Unknown VM mode.");
}
+ /**
+ * @return addtional VMoptions(Emulated related) required to start a new VM with the same type as current.
+ */
+ private static String getVMTypeOptionForEmulated() {
+ if (Platform.isServer() && !Platform.isEmulatedClient()) {
+ return "-XX:-NeverActAsServerClassMachine";
+ } else if (Platform.isEmulatedClient()) {
+ return "-XX:+NeverActAsServerClassMachine";
+ }
+ return null;
+ }
+
private final BooleanSupplier predicate;
/**