test/compiler/whitebox/CompilerWhiteBoxTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff test/compiler/whitebox/CompilerWhiteBoxTest.java
test/compiler/whitebox/CompilerWhiteBoxTest.java
Print this page
*** 528,538 ****
* compilation finished.
*
* @param e Executable
* @throws Exception
*/
! private static void waitAndDeoptimize(Executable e) throws Exception {
CompilerWhiteBoxTest.waitBackgroundCompilation(e);
if (WhiteBox.getWhiteBox().isMethodQueuedForCompilation(e)) {
throw new RuntimeException(e + " must not be in queue");
}
// Deoptimize non-osr versions of executable
--- 528,538 ----
* compilation finished.
*
* @param e Executable
* @throws Exception
*/
! private static void waitAndDeoptimize(Executable e) {
CompilerWhiteBoxTest.waitBackgroundCompilation(e);
if (WhiteBox.getWhiteBox().isMethodQueuedForCompilation(e)) {
throw new RuntimeException(e + " must not be in queue");
}
// Deoptimize non-osr versions of executable
*** 552,563 ****
Helper helper = new Helper();
int result = 0;
for (long i = 0; i < CompilerWhiteBoxTest.OSR_WARMUP; ++i) {
result += (int)m.invoke(helper, 1);
}
- // Deoptimize non-osr versions
- waitAndDeoptimize(m);
return result;
}
/**
* Executes the constructor multiple times to make sure we
--- 552,561 ----
*** 571,582 ****
private static int warmup(Constructor c) throws Exception {
int result = 0;
for (long i = 0; i < CompilerWhiteBoxTest.OSR_WARMUP; ++i) {
result += c.newInstance(null, 1).hashCode();
}
- // Deoptimize non-osr versions
- waitAndDeoptimize(c);
return result;
}
private static final Constructor CONSTRUCTOR;
private static final Constructor OSR_CONSTRUCTOR;
--- 569,578 ----
*** 621,638 ****
--- 617,644 ----
private int method() {
return 42;
}
private static int osrStaticMethod(long limit) {
+ if (limit != 1) {
+ // Make sure there is no compiled version after warmup
+ waitAndDeoptimize(OSR_STATIC);
+ }
+ // Trigger osr compilation
int result = 0;
for (long i = 0; i < limit; ++i) {
result += staticMethod();
}
return result;
}
private int osrMethod(long limit) {
+ if (limit != 1) {
+ // Make sure there is no compiled version after warmup
+ waitAndDeoptimize(OSR_METHOD);
+ }
+ // Trigger osr compilation
int result = 0;
for (long i = 0; i < limit; ++i) {
result += method();
}
return result;
*** 645,654 ****
--- 651,665 ----
x = 0;
}
// for OSR constructor test case
private Helper(Object o, long limit) {
+ if (limit != 1) {
+ // Make sure there is no compiled version after warmup
+ waitAndDeoptimize(OSR_CONSTRUCTOR);
+ }
+ // Trigger osr compilation
int result = 0;
for (long i = 0; i < limit; ++i) {
result += method();
}
x = result;
test/compiler/whitebox/CompilerWhiteBoxTest.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File