comparison test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java @ 20285:cabe05c85665

8054805: Update CLI tests on RTM options to reflect changes in JDK-8054376 Reviewed-by: kvn
author fzhinkin
date Mon, 11 Aug 2014 19:19:47 +0400
parents 100f2b109432
children 999824269b71
comparison
equal deleted inserted replaced
20284:dac61d838654 20285:cabe05c85665
51 String warningMessage 51 String warningMessage
52 = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING; 52 = RTMGenericCommandLineOptionTest.RTM_BIASED_LOCKING_WARNING;
53 // verify that we will not get a warning 53 // verify that we will not get a warning
54 CommandLineOptionTest.verifySameJVMStartup(null, 54 CommandLineOptionTest.verifySameJVMStartup(null,
55 new String[] { warningMessage }, ExitCode.OK, 55 new String[] { warningMessage }, ExitCode.OK,
56 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
57 "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking"); 56 "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking");
58 // verify that we will get a warning 57 // verify that we will get a warning
59 CommandLineOptionTest.verifySameJVMStartup( 58 CommandLineOptionTest.verifySameJVMStartup(
60 new String[] { warningMessage }, null, ExitCode.OK, 59 new String[] { warningMessage }, null, ExitCode.OK,
61 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
62 "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); 60 "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking");
63 // verify that UseBiasedLocking is false when we use rtm locking 61 // verify that UseBiasedLocking is false when we use rtm locking
64 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", 62 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking",
65 "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, 63 "false", "-XX:+UseRTMLocking");
66 "-XX:+UseRTMLocking");
67 // verify that we can't turn on biased locking when 64 // verify that we can't turn on biased locking when
68 // using rtm locking 65 // using rtm locking
69 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", 66 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking",
70 "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, 67 "false", "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking");
71 "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking");
72 } 68 }
73 69
74 public static void main(String args[]) throws Throwable { 70 public static void main(String args[]) throws Throwable {
75 new TestUseRTMLockingOptionWithBiasedLocking().test(); 71 new TestUseRTMLockingOptionWithBiasedLocking().test();
76 } 72 }