[lworld] Test cases for value type consistency checks
Ioi Lam
ioi.lam at oracle.com
Wed Jul 18 17:42:57 UTC 2018
I've updated the tests:
http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/
http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/ConsistencyTest.jtr
+ Removed commented-out code in ValuePoint.java; also made the API the
same as
the POJOPoint.java.
+ Some tests are currently failing. You can run with
"jtreg -DIgnoreFailures consistency" to run all test cases without
failing
early. Then, search for upper case FAILED in the JTR file (see above
JTR file)
+ Added -Xcomp. It produces more failures than -Xint, probably due to
inlining.
I'll experiment with warmup (similar to
compiler/valhalla/valuetypes/ValueTypeTest.java)
+ For the "// BUG" comments in the code -- ResolveArray and
ResolveMultiArray
has opposite behavior. Specifically:
anewarray #2 // class Point
multianewarray #2, 2 // class "[[LPoint;"
The anewarray bytecode fails but the multianewarray bytecode succeeds.
I think multianewarray should also fail. I've filed bug JDK-8207788
+ I added a test for MethodHandle. The test fails. It seems that when an MH
call site is resolved, the consistency test is not performed.
Thanks
- Ioi
On 7/18/18 12:32 AM, Tobias Hartmann wrote:
> Hi Ioi,
>
> this looks good to me. Just noticed that there is some uncommented code in ValuePoint.java.
>
> To get some more C2 coverage, it would be good to also run the tests with -Xcomp or (even better)
> run the ConsistencyTest::test method multiple times to trigger compilation.
>
> Do some of these tests fail? Because there is a "// BUG" comment in ConsistencyTest.java.
>
> Thanks,
> Tobias
>
> On 17.07.2018 08:08, Ioi Lam wrote:
>> I have modified Frederic's test cases for the value type consistency checks [1]. See
>>
>> http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v01/
>>
>> The test cases were originally driven by a shell script [2], and I rewrote them to run inside jtreg.
>> The idea is to build 2 set of classes that have a different idea of whether "LPoint;" is a VT or
>> not, and see how these classes interact.
>>
>> I'll try to write more test cases, including ones that use Reflection and MethodHandles.
>>
>> Thanks
>> - Ioi
>>
>>
>> [1] http://hg.openjdk.java.net/valhalla/valhalla/rev/a5573f4f6392
>> [2] http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v01/run.sh
More information about the valhalla-dev
mailing list