Mercurial > hg > truffle
comparison test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java @ 20374:999824269b71
8055069: TSX and RTM should be deprecated more strongly until hardware is corrected
Summary: Require to specify UnlockExperimentalVMOptions flag together with UseRTMLocking flag on un-patched systems where CPUID allows it but is unsupported otherwise.
Reviewed-by: iveresov, fzhinkin
author | kvn |
---|---|
date | Fri, 22 Aug 2014 12:03:49 -0700 |
parents | cabe05c85665 |
children |
comparison
equal
deleted
inserted
replaced
20373:c67b85c32d9a | 20374:999824269b71 |
---|---|
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, | |
56 "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking"); | 57 "-XX:+UseRTMLocking", "-XX:-UseBiasedLocking"); |
57 // verify that we will get a warning | 58 // verify that we will get a warning |
58 CommandLineOptionTest.verifySameJVMStartup( | 59 CommandLineOptionTest.verifySameJVMStartup( |
59 new String[] { warningMessage }, null, ExitCode.OK, | 60 new String[] { warningMessage }, null, ExitCode.OK, |
61 CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, | |
60 "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); | 62 "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); |
61 // verify that UseBiasedLocking is false when we use rtm locking | 63 // verify that UseBiasedLocking is false when we use rtm locking |
62 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", | 64 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", |
63 "false", "-XX:+UseRTMLocking"); | 65 "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, |
66 "-XX:+UseRTMLocking"); | |
64 // verify that we can't turn on biased locking when | 67 // verify that we can't turn on biased locking when |
65 // using rtm locking | 68 // using rtm locking |
66 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", | 69 CommandLineOptionTest.verifyOptionValueForSameVM("UseBiasedLocking", |
67 "false", "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); | 70 "false", CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS, |
71 "-XX:+UseRTMLocking", "-XX:+UseBiasedLocking"); | |
68 } | 72 } |
69 | 73 |
70 public static void main(String args[]) throws Throwable { | 74 public static void main(String args[]) throws Throwable { |
71 new TestUseRTMLockingOptionWithBiasedLocking().test(); | 75 new TestUseRTMLockingOptionWithBiasedLocking().test(); |
72 } | 76 } |