Mercurial > hg > openjdk > jdk9
changeset 2499:1dc5f0ee3445
8173679: Disable ProfileTrap code and UseRTMLocking in emulated client Win32
Summary: Made emulatedVM related changes in cli verfiy*SameVM.
Reviewed-by: kvn
author | jcm |
---|---|
date | Fri, 03 Feb 2017 19:26:48 -0800 |
parents | 5327e511b68d |
children | 90d549b64f58 4ecaa9898a1c |
files | test/lib/jdk/test/lib/cli/CommandLineOptionTest.java |
diffstat | 1 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; /**