-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests in disabled variations of ValueTypeSystemArraycopyTests #19914
Comments
Just an update on this issue. The investigation is ongoing. Found one of root causes of the failures is that null restricted arrays that are created through I have a potential fix which fixes 14 out of 19 |
@theresa-m @hangshao0 @hzongaro with change #19911, array component J9Class has one In the JIT, it uses getClassFromSignature to get the class based on the signature. |
We could add a new option flag that can be passed to the last parameter of |
That would help solve one problem. I think the problem for the JIT here is that when we have a class signature, we have no idea if it is for a regular nullable array class or a null restricted array class. There are assumptions in the JIT that trust the class pointer returned from getClassFromSignature to be fixed to one specific array class, which is no longer true with null restricted arrays where two array classes could be associated with the same signature |
@TobiAjila Any thoughts on that ? |
Not sure if it helps but at one point javac (lw5 branch) was generating |
The Null-restricted array doubles down on erasure in that from the perspective of the classfile The JIT will need to do something similar. Either prove that it must be Foo![] or Foo[] or be prepared for both. You can prove that its not In either case looking for the array with
So Im not really in favour of this, because you need to know what you are looking for, and if you know you can always find it with the regular array class. |
The current code of |
With normal usage partterns, given that javac will lookup the NR class from the nullable one then we should be guaranteed that the nullable one is loaded. But I guess someone can handwrite bytecodes that break this assumption. What we could do is always load the nullable array class as a pre-requisite for the NR array that way if the JIT looks up |
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19914, eclipse-openj9/openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19914, eclipse-openj9/openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19914, eclipse-openj9/openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19914, eclipse-openj9/openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized method `jdk/internal/value/ValueClass.newArrayInstance` (2) Add VP fixed class constraint if `ValueClass.newArrayInstance` creates null restricted array (3) Rename `isArrayCompTypePrimitiveValueType` to `isArrayNullRestricted` to reflect the updated logic Update `isArrayNullRestricted` on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19914, eclipse-openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19914, eclipse-openj9/openj9#19913 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19913, eclipse-openj9/openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19913, eclipse-openj9/openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature (6) Enable previous disabled JIT Valhalla functional tests Fixes: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
Load the source array and the destination array from the saved temp instead of commoning the original nodes incorrectly across blocks. Related: eclipse-openj9/openj9#19913, eclipse-openj9/openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
I found the root cause of why some of the In Global Value Propagation,
The constraint for the destination array
The constrainAload sets up constraint for |
Update isUnreliableSignatureType to check if the class is an array class. If the class is an array class and its component class is value type and the array class is not null-restricted array, the type is not reliable because it can either be a nullable array class type or a null-restricted array type. Fixes: eclipse-openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
Update isUnreliableSignatureType to check if the class is an array class, and if its component class is value type, and if the array class is not null-restricted array. If so, the type is not reliable because it can either be a nullable array class type or a null-restricted array type. Fixes: eclipse-openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
Issue Number: 19914 |
1 similar comment
Issue Number: 19914 |
Update isUnreliableSignatureType to check if the class is an array class, and if its component class is value type, and if the array class is not null-restricted array. If so, the type is not reliable because it can either be a nullable array class type or a null-restricted array type. Fixes: eclipse-openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
(1) Add recognized methods from jdk/internal/value/ValueClass and jdk/internal/value/NullRestrictedCheckedType (2) Add VP fixed class constraint if ValueClass.newArrayInstance creates null restricted array using NullRestrictedCheckedType (3) Rename isArrayCompTypePrimitiveValueType to isArrayNullRestricted to reflect the updated logic Update isArrayNullRestricted on how to determine whether or not an array is a null restricted array (4) Disable transformation based on type hint which is no longer sufficient enough to decide whether or not the array is null restricted or not (5) If flattenable arrays are enabled, do not create fixed class constraint for parm array class based on signature since both nullable and null restricted arrays share the same signature Related: eclipse-openj9#19913, eclipse-openj9#19914, eclipse-openj9#19708 Signed-off-by: Annabelle Huo <[email protected]>
Update isUnreliableSignatureType to check if the class is an array class, and if its component class is value type, and if the array class is not null-restricted array. If so, the type is not reliable because it can either be a nullable array class type or a null-restricted array type. Fixes: eclipse-openj9#19914 Signed-off-by: Annabelle Huo <[email protected]>
Once #19911 is merged ValueTypeSystemArraycopyTests will be re-enabled with the first 3 variations, all including Xint. The remaining variations have failures.
FYI @a7ehuo @hzongaro
The text was updated successfully, but these errors were encountered: