Open tajila opened 3 years ago
In order to run the tests I had to:
Modify const U_16 max_allowed_version =
in cfreader.c to recognize jdk18 .class files. This won't be needed in the near future.
Also, I had to remove requires.extraPropDefns = ../../jtreg-ext/requires/VMProps.java
from https://github.com/openjdk/valhalla/blob/lworld/test/hotspot/jtreg/TEST.ROOT
symlink the valhalla javac into the test jdk/bin dir
This issue can be broken up into smaller issues to address the specific failures
Looks like some cases should be captured by verifier, but they are not.
Looks like some cases should be captured by verifier, but they are not.
Yes, I would look at those issues last since the spec isn't fully finalized. The first priority are failures relating to field layouts or initialization since that is the most settled part of the spec.
As mentioned in the meeting today, I discovered some layout differences between OpenJ9 and RI on Atomic VT and volatile VT fields. More details can be found here: https://github.com/eclipse-openj9/openj9/issues/13130#issuecomment-880929666. Result of some tests here could be affected by such difference.
As the verifier change is already merged, we can re-run these tests. @ehrenjulzert
When running using make test TEST="hotspot_valhalla"
, The following tests fail on openj9:
runtime/valhalla/inlinetypes/CircularityTest.java: Test initialization of static inline fields with circularity
runtime/valhalla/inlinetypes/ClassPrintLayoutDcmd.java: Test the VM.class_print_layout command
runtime/valhalla/inlinetypes/HiddenInlineClassTest.java: Test a hidden inline class.
runtime/valhalla/inlinetypes/InlineTypeArray.java: Plain array test for Inline Types
runtime/valhalla/inlinetypes/InlineTypeDensity.java: Heap density test for InlineTypes
runtime/valhalla/inlinetypes/InlineTypesTest.java: Test data movement with inline types
runtime/valhalla/inlinetypes/InlineWithJni.java: test JNI functions with inline types
runtime/valhalla/inlinetypes/MultiANewArrayTest/MultiANewArrayTest.java: test that mismatches in bottom class of multi-dimensional arrays are correctly detected
runtime/valhalla/inlinetypes/ObjectMethods.java: Check object method implemented by the VM behave with inline types
runtime/valhalla/inlinetypes/QuickeningTest.java: Test quickening of getfield and putfield applied to inline fields
runtime/valhalla/inlinetypes/TestFieldTypeMismatch.java:
runtime/valhalla/inlinetypes/TestInheritedInlineTypeFields.java: Test if inline field klasses are correctly retrieved for inherited fields
runtime/valhalla/inlinetypes/TestJNIIsSameObject.java: Test JNI IsSameObject semantic with inline types
runtime/valhalla/inlinetypes/UnsafeTest.java: unsafe get/put/with inline type
runtime/valhalla/inlinetypes/ValuePreloadTest.java:
runtime/valhalla/inlinetypes/VarArgsArray.java: Test if JVM API using varargs work with inline type arrays
runtime/valhalla/inlinetypes/VolatileTest.java: check effect of volatile keyword on flattenable fields
runtime/valhalla/inlinetypes/classfileparser/ACC_CFETest.java: test class access rules for abstract classes that have ACC_VALUE set.
runtime/valhalla/inlinetypes/classfileparser/ACC_ICCETest.java: test that a value class cannot sub-class an identity class
runtime/valhalla/inlinetypes/classfileparser/BadInlineTypes.java: test that the right exceptions get thrown for bad inline type class files.
runtime/valhalla/inlinetypes/classfileparser/PrimitiveUsers.java: test that if a class file uses primitive classes, -XX:+EnablePrimitiveClasses must be set.
runtime/valhalla/inlinetypes/testClassModifiers/TestClassModifiers.java: test that the JVM correctly accepts or rejects classes based on their ACC_VALUE/ACC_IDENTITY modifiers
runtime/valhalla/inlinetypes/testSupers/TestSuperClasses.java: test that the JVM detects illegal super classes for value object and primitive value types.
runtime/valhalla/inlinetypes/verifier/VerifierInlineTypes.java: test that the right exceptions get thrown for bad inline type class files.
runtime/valhalla/inlinetypes/withfieldTests/RunWithfieldTests.java: test scenarios where getfield, putfield, and withfield access the same constant pool field_ref and test other withfield error cases.
runtime/valhalla/inlinetypes/InlineOops.java#id0: Test embedding oops into Inline types
runtime/valhalla/inlinetypes/InlineOops.java#id1: Test embedding oops into Inline types
runtime/valhalla/inlinetypes/InlineOops.java#id2: Test embedding oops into Inline types
runtime/valhalla/inlinetypes/InlineOops.java#id3: Test embedding oops into Inline types
The following tests are passing on openj9:
runtime/valhalla/inlinetypes/AbstractValueClassTest.java: Test that a super abstract value class is allowed.
runtime/valhalla/inlinetypes/CheckcastTest.java: checkcast bytecode test
runtime/valhalla/inlinetypes/ClassInitializationFailuresTest.java: Test several scenarios of class initialization failures
runtime/valhalla/inlinetypes/CreationErrorTest.java: Test data movement with inline types
runtime/valhalla/inlinetypes/EmptyInlineTest.java: Test support for empty inline types (no instance fields)
runtime/valhalla/inlinetypes/FlattenableSemanticTest.java: Flattenable field semantic test
runtime/valhalla/inlinetypes/Ifacmp.java: if_acmpeq/ne bytecode test
runtime/valhalla/inlinetypes/InlineTypeCreation.java: Inline Type creation test
runtime/valhalla/inlinetypes/InlineTypeGetField.java: Inline Type get field test
runtime/valhalla/inlinetypes/StaticFieldsTest.java: Test circularity in static fields
runtime/valhalla/inlinetypes/Test8186715.java: test return of buffered inline type passed in argument by caller
runtime/valhalla/inlinetypes/TestBytecodeLib.java: Check bytecode test library generates the correct code for Valhalla changes to JVMS
runtime/valhalla/inlinetypes/TestFieldNullability.java:
runtime/valhalla/inlinetypes/UninitializedInlineFieldsTest.java: Uninitialized inline fields test
runtime/valhalla/inlinetypes/VDefaultTest.java: vdefault bytecode test
runtime/valhalla/inlinetypes/WithFieldAccessorTest.java: test nestmate access to an inline type's public, protected and private final fields.
runtime/valhalla/inlinetypes/WithFieldTest.java: withfield bytecode test
runtime/valhalla/inlinetypes/verifier/VTAssignability.java: Test basic verifier assignability of inline types.
runtime/valhalla/inlinetypes/verifier/VTMonitor.java: Test that verifier allows monitor operations on inline types.
serviceability/jvmti/Valhalla/FieldAccessModify/FieldAccessModify.java: Tests that all FieldAccess and FieldModification notifications are generated for primitive classes.
All the tests are passing on RI.
Talked to Ehren to also try with flattenning enabled. Some tests might pass with with flattenning enabled.
When flattening is enabled (with -XX:ValueTypeFlatteningThreshold=999999
and -XX:+EnableArrayFlattening
) two additional tests pass:
runtime/valhalla/inlinetypes/QuickeningTest.java: Test quickening of getfield and putfield applied to inline fields
runtime/valhalla/inlinetypes/TestInheritedInlineTypeFields.java: Test if inline field klasses are correctly retrieved for inherited fields
The following command was used to run the tests with -XX:ValueTypeFlatteningThreshold=999999
and -XX:+EnableArrayFlattening
enabled:
/Users/ehren/Documents/openj9-openjdk-jdk.valuetypes/build/macosx-x86_64-server-release/images/jdk/bin/java -jar /Users/ehren/Documents/jtreg/lib/jtreg.jar -agentvm -a -ea -esa -v:fail,error,time,nopass -retain:fail,error,*.dmp,javacore.*,heapdump.*,*.trc -ignore:quiet -timeoutFactor:8 -xml:verify -concurrency:1 -vmoptions:"-XX:ValueTypeFlatteningThreshold=999999 -XX:+EnableArrayFlattening" -nativepath:/Users/ehren/Documents/valhalla/build/macosx-x86_64-server-release/images/test/jdk/jtreg/native -jdk:/Users/ehren/Documents/openj9-openjdk-jdk.valuetypes//build/macosx-x86_64-server-release/images/jdk /Users/ehren/Documents/openj9-openjdk-jdk.valuetypes/test/hotspot/jtreg/runtime/valhalla/inlinetypes
@ehrenjulzert can you update in https://github.com/eclipse-openj9/openj9/issues/13182#issuecomment-1320261445 at the beginning of each test if it has been fixed and is now passing ? sth like:
(passed) runtime/valhalla/inlinetypes/UnsafeTest.java: unsafe get/put/with inline type
(failed) runtime/valhalla/inlinetypes/ValuePreloadTest.java:
can you update in https://github.com/eclipse-openj9/openj9/issues/13182#issuecomment-1320261445
I updated it, although I decided to format it differently (I listed the passing and failing tests in two separate code blocks). I figured this would make it easier to compare to in the future (since when the tests are run, this is the format that the results are printed in).
The following are the jtreg tests failures. They can be found in https://github.com/openjdk/valhalla/tree/lworld/test/hotspot/jtreg/runtime/valhalla/inlinetypes
JT Harness : Tests that failed