179 return;
180 }
181 System.out.println("at test's start:");
182 printInfo();
183 try {
184 test();
185 } catch (Exception e) {
186 System.out.printf("on exception '%s':", e.getMessage());
187 printInfo();
188 e.printStackTrace();
189 if (e instanceof RuntimeException) {
190 throw (RuntimeException) e;
191 }
192 throw new RuntimeException(e);
193 }
194 System.out.println("at test's end:");
195 printInfo();
196 }
197
198 /**
199 * Checks, that {@linkplain #method} is not compiled.
200 *
201 * @throws RuntimeException if {@linkplain #method} is in compiler queue or
202 * is compiled, or if {@linkplain #method} has zero
203 * compilation level.
204 */
205 protected final void checkNotCompiled() {
206 if (WHITE_BOX.isMethodQueuedForCompilation(method)) {
207 throw new RuntimeException(method + " must not be in queue");
208 }
209 if (WHITE_BOX.isMethodCompiled(method, false)) {
210 throw new RuntimeException(method + " must be not compiled");
211 }
212 if (WHITE_BOX.getMethodCompilationLevel(method, false) != 0) {
213 throw new RuntimeException(method + " comp_level must be == 0");
214 }
215 if (WHITE_BOX.isMethodCompiled(method, true)) {
216 throw new RuntimeException(method + " must be not osr_compiled");
217 }
218 if (WHITE_BOX.getMethodCompilationLevel(method, true) != 0) {
|
179 return;
180 }
181 System.out.println("at test's start:");
182 printInfo();
183 try {
184 test();
185 } catch (Exception e) {
186 System.out.printf("on exception '%s':", e.getMessage());
187 printInfo();
188 e.printStackTrace();
189 if (e instanceof RuntimeException) {
190 throw (RuntimeException) e;
191 }
192 throw new RuntimeException(e);
193 }
194 System.out.println("at test's end:");
195 printInfo();
196 }
197
198 /**
199 * Checks, that {@linkplain #method} is not compiled at the given compilation
200 * level or above.
201 *
202 * @param compLevel
203 *
204 * @throws RuntimeException if {@linkplain #method} is in compiler queue or
205 * is compiled, or if {@linkplain #method} has zero
206 * compilation level.
207 */
208
209 protected final void checkNotCompiled(int compLevel) {
210 if (WHITE_BOX.isMethodQueuedForCompilation(method)) {
211 throw new RuntimeException(method + " must not be in queue");
212 }
213 if (WHITE_BOX.getMethodCompilationLevel(method, false) >= compLevel) {
214 throw new RuntimeException(method + " comp_level must be >= maxCompLevel");
215 }
216 if (WHITE_BOX.getMethodCompilationLevel(method, true) >= compLevel) {
217 throw new RuntimeException(method + " osr_comp_level must be >= maxCompLevel");
218 }
219 }
220
221 /**
222 * Checks, that {@linkplain #method} is not compiled.
223 *
224 * @throws RuntimeException if {@linkplain #method} is in compiler queue or
225 * is compiled, or if {@linkplain #method} has zero
226 * compilation level.
227 */
228 protected final void checkNotCompiled() {
229 if (WHITE_BOX.isMethodQueuedForCompilation(method)) {
230 throw new RuntimeException(method + " must not be in queue");
231 }
232 if (WHITE_BOX.isMethodCompiled(method, false)) {
233 throw new RuntimeException(method + " must be not compiled");
234 }
235 if (WHITE_BOX.getMethodCompilationLevel(method, false) != 0) {
236 throw new RuntimeException(method + " comp_level must be == 0");
237 }
238 if (WHITE_BOX.isMethodCompiled(method, true)) {
239 throw new RuntimeException(method + " must be not osr_compiled");
240 }
241 if (WHITE_BOX.getMethodCompilationLevel(method, true) != 0) {
|