-
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
Add structral comparison barriers #7942
Conversation
bc3822c
to
e83b6c7
Compare
I'd avoid using Flattened in the name. Ideally, it should work even if objects are not flattened. |
If it is not flattened we need to do a different more complicated type of comparison similar to comparing if two tree top nodes are the same. We have a separate implementation for this in the interpreter that makes use of the existing barrier APIs and a some of the VM fieldIterator APIs. The flattened case is special because we currently have no barrier APIs that perform the equivalent of memcmp. In short, we would only use this API if the object was flattened. |
That being said, I have no objection to changing the name |
af696b3
to
7385b19
Compare
Looks good to me. |
a008e0e
to
22a8f3a
Compare
@amicic The required changes have been made |
Jenkins test sanity all jdk11 |
@amicic THe failures are all git checkout failures
|
@tajila Would you please resolve merging conflicts? |
b798ee8
to
e752eb4
Compare
In eclipse-openj9#7743 a flag (J9ClassCanSupportFastSubstitutability) is added to each valueType class if it does not contain any floating point primitives or references that might potentially contain an unflattened valuetype or a flattened valuetype that does not contain J9ClassCanSupportFastSubstitutability. For these classes a structural comparison can be performed. This is essentially performing a memory comparison over the length of the instances, if they are equivalent the result is true, otherwise false. Since it will only contain scalar primitives and (non value) references, equality can be determined by simply performing a memory comparison. Unlike with floating point types or non-flattened valuetypes where determining equality is more complicated. A barrier helper is required as these instances may contain references. In modes where no read barriers are required memcmp can be used. Signed-off-by: Tobi Ajila <[email protected]>
Jenkins test sanity all jdk11 |
@dmitripivkine @amicic The only failure is a jenkins failure
|
The "Jenkins failure" means that no testing ran, only the compiles. It should be fixed now, retrying. Jenkins test sanity all jdk11 |
I forgot, I think the commit needs to be rebased in order to fix the PR testing. |
Another PR worked without being rebased. I had attempted to stop the earlier build, so I'll run it again. Jenkins test sanity all jdk11 |
@amicic @dmitripivkine All checks have passed |
Add structral comparison barriers
In #7743 a flag (
J9ClassCanSupportFastSubstitutability
) is added to each valueType class if it does not contain any floating point primitives or references that might potentially contain an unflattened valuetype or a flattened valuetype that does not containJ9ClassCanSupportFastSubstitutability
.For these classes a structural comparison can be performed. This is essentially performing a memory comparison over the length of the instances, if they are equivalent the result is true, otherwise false. Since it will only contain scalar primitives and (non value) references, equality can be determined by simply performing a memory comparison. Unlike with floating point types or non-flattened valuetypes where determining equality is more complicated.
A barrier helper is required as these instances may contain references. In modes where no read barriers are required
memcmp
can be used.Signed-off-by: Tobi Ajila [email protected]