comparison test/compiler/whitebox/CompilerWhiteBoxTest.java @ 17869:5e6f84e7a942

8007270: Make IsMethodCompilable test work with tiered Summary: Only c2 compiles counts toward cutoff Reviewed-by: kvn, roland
author neliasso
date Tue, 28 Jan 2014 15:05:46 +0100
parents 4abb719c5620
children 52b4284cb496 c88a4554854c
comparison
equal deleted inserted replaced
17868:72558bacada3 17869:5e6f84e7a942
195 System.out.println("at test's end:"); 195 System.out.println("at test's end:");
196 printInfo(); 196 printInfo();
197 } 197 }
198 198
199 /** 199 /**
200 * Checks, that {@linkplain #method} is not compiled at the given compilation
201 * level or above.
202 *
203 * @param compLevel
204 *
205 * @throws RuntimeException if {@linkplain #method} is in compiler queue or
206 * is compiled, or if {@linkplain #method} has zero
207 * compilation level.
208 */
209
210 protected final void checkNotCompiled(int compLevel) {
211 if (WHITE_BOX.isMethodQueuedForCompilation(method)) {
212 throw new RuntimeException(method + " must not be in queue");
213 }
214 if (WHITE_BOX.getMethodCompilationLevel(method, false) >= compLevel) {
215 throw new RuntimeException(method + " comp_level must be >= maxCompLevel");
216 }
217 if (WHITE_BOX.getMethodCompilationLevel(method, true) >= compLevel) {
218 throw new RuntimeException(method + " osr_comp_level must be >= maxCompLevel");
219 }
220 }
221
222 /**
200 * Checks, that {@linkplain #method} is not compiled. 223 * Checks, that {@linkplain #method} is not compiled.
201 * 224 *
202 * @throws RuntimeException if {@linkplain #method} is in compiler queue or 225 * @throws RuntimeException if {@linkplain #method} is in compiler queue or
203 * is compiled, or if {@linkplain #method} has zero 226 * is compiled, or if {@linkplain #method} has zero
204 * compilation level. 227 * compilation level.