-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 27
-
Component/s: hotspot
AbstractTest::run is implemented like this:
/**
* Run the associated test.
*/
public void run() {
if (skip) {
return;
}
for (int i = 0; i < warmupIterations; i++) {
invokeTest();
}
onWarmupFinished();
compileTest();
// Always run the test as a last step of the test execution.
invokeTest();
}
The pattern to test the IR shape involving an uncommon trap and the correctness of deoptimization looks like this:
@Run(test = "test12")
public void test12_verifier(RunInfo info) {
long result = test12(info.isWarmUp());
Asserts.assertEQ(expected, result);
}
The intention is that, the method is originally compiled with the boolean argument being always true. This results in a graph with an uncommon trap. Then, the method is run with the argument being false, triggering the uncommon trap, which allows the verification of the correctness of the deoptimization state.
However, this deoptimization also triggers recompilation, prevents the verification of the shape of the graph in the original compilation. We should somehow disallow recompilation of the test method in the TestFramework.
/**
* Run the associated test.
*/
public void run() {
if (skip) {
return;
}
for (int i = 0; i < warmupIterations; i++) {
invokeTest();
}
onWarmupFinished();
compileTest();
// Always run the test as a last step of the test execution.
invokeTest();
}
The pattern to test the IR shape involving an uncommon trap and the correctness of deoptimization looks like this:
@Run(test = "test12")
public void test12_verifier(RunInfo info) {
long result = test12(info.isWarmUp());
Asserts.assertEQ(expected, result);
}
The intention is that, the method is originally compiled with the boolean argument being always true. This results in a graph with an uncommon trap. Then, the method is run with the argument being false, triggering the uncommon trap, which allows the verification of the correctness of the deoptimization state.
However, this deoptimization also triggers recompilation, prevents the verification of the shape of the graph in the original compilation. We should somehow disallow recompilation of the test method in the TestFramework.
- relates to
-
JDK-8227588 [lworld] Better optimize non-flattened inline type array accesses
-
- Open
-