154 return this.getClass().getName() + "::forceAbort"; |
154 return this.getClass().getName() + "::forceAbort"; |
155 } |
155 } |
156 |
156 |
157 @Override |
157 @Override |
158 public String[] getMethodsToCompileNames() { |
158 public String[] getMethodsToCompileNames() { |
159 return new String[] { |
159 return new String[] { getMethodWithLockName() }; |
160 getMethodWithLockName(), |
|
161 sun.misc.Unsafe.class.getName() + "::forceAbort" |
|
162 }; |
|
163 } |
160 } |
164 |
161 |
165 public void forceAbort(int a[], boolean abort) { |
162 public void forceAbort(int a[], boolean abort) { |
166 try { |
163 try { |
167 synchronized(monitor) { |
164 synchronized(monitor) { |
180 * Test <inflate monitor> |
177 * Test <inflate monitor> |
181 */ |
178 */ |
182 public static void main(String args[]) throws Throwable { |
179 public static void main(String args[]) throws Throwable { |
183 Test t = new Test(); |
180 Test t = new Test(); |
184 |
181 |
185 if (Boolean.valueOf(args[0])) { |
182 boolean shouldBeInflated = Boolean.valueOf(args[0]); |
|
183 if (shouldBeInflated) { |
186 AbortProvoker.inflateMonitor(t.monitor); |
184 AbortProvoker.inflateMonitor(t.monitor); |
187 } |
185 } |
188 |
186 |
189 int tmp[] = new int[1]; |
187 int tmp[] = new int[1]; |
190 |
188 |
191 for (int i = 0; i < Test.ITERATIONS; i++ ) { |
189 for (int i = 0; i < Test.ITERATIONS; i++ ) { |
|
190 AbortProvoker.verifyMonitorState(t.monitor, shouldBeInflated); |
192 if (i == Test.RANGE_CHECK_AT) { |
191 if (i == Test.RANGE_CHECK_AT) { |
193 t.forceAbort(new int[0], false); |
192 t.forceAbort(new int[0], false); |
194 } else { |
193 } else { |
195 boolean isThreshold |
194 boolean isThreshold |
196 = (i == TestRTMAfterNonRTMDeopt.ABORT_THRESHOLD); |
195 = (i == TestRTMAfterNonRTMDeopt.ABORT_THRESHOLD); |