Skip to content
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

Adding the J9ClassCanSupportFastSubstitutability flag #7743

Merged

Conversation

@XxAdi101xX
Copy link
Contributor

XxAdi101xX commented Nov 11, 2019

This flag will be used to determine whether an optimization could be considered
for the acmp bytecode instruction given certain conditions.

Signed-off-by: Adithya Venkatarao adi_101@live.com

XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Nov 12, 2019
This commit adds the implementation to handle value types when the
ACMP bytecode is used to compare object fields. An ACMP optimization is
also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Nov 25, 2019
This commit adds the implementation to handle value types when the
ACMP bytecode is used to compare object fields. An ACMP optimization is
also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Nov 25, 2019
This commit adds the implementation to handle value types when the
ACMP bytecode is used to compare object fields. An ACMP optimization is
also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Nov 26, 2019
This commit adds the implementation to handle value types when the
ACMP bytecode is used to compare object fields. An ACMP optimization is
also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
@XxAdi101xX XxAdi101xX force-pushed the XxAdi101xX:adding-fast-substitutability-test-flag branch 3 times, most recently from 42f7844 to 9226776 Nov 26, 2019
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Nov 26, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
@XxAdi101xX

This comment has been minimized.

Copy link
Contributor Author

XxAdi101xX commented Nov 26, 2019

@tajila here's the implementation to add the fast substitutability flag

runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
runtime/vm/createramclass.cpp Show resolved Hide resolved
@XxAdi101xX XxAdi101xX force-pushed the XxAdi101xX:adding-fast-substitutability-test-flag branch from a05d1ce to 4211c20 Nov 26, 2019
@XxAdi101xX

This comment has been minimized.

Copy link
Contributor Author

XxAdi101xX commented Nov 26, 2019

@tajila I've addressed the comments

runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
runtime/vm/createramclass.cpp Show resolved Hide resolved
@XxAdi101xX XxAdi101xX force-pushed the XxAdi101xX:adding-fast-substitutability-test-flag branch from 4211c20 to eec1558 Nov 27, 2019
@XxAdi101xX

This comment has been minimized.

Copy link
Contributor Author

XxAdi101xX commented Nov 27, 2019

@tajila I've fixed the mentioned issues, I'm currently running the tests..

@tajila

This comment has been minimized.

Copy link
Contributor

tajila commented Nov 27, 2019

please update the PR title

@XxAdi101xX XxAdi101xX changed the title Adding J9VM_OPT_FAST_SUBSTITUTABILITY_TEST flag Adding the J9ClassCanSupportFastSubstitutability flag Nov 28, 2019
@XxAdi101xX

This comment has been minimized.

Copy link
Contributor Author

XxAdi101xX commented Nov 28, 2019

@tajila tests have passed on x86-64_linux,x86-64_windows

runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
@XxAdi101xX XxAdi101xX force-pushed the XxAdi101xX:adding-fast-substitutability-test-flag branch from eec1558 to 08c45fc Nov 29, 2019
@XxAdi101xX

This comment has been minimized.

Copy link
Contributor Author

XxAdi101xX commented Nov 29, 2019

@tajila I've updated the comments as per suggestions

runtime/vm/createramclass.cpp Outdated Show resolved Hide resolved
@XxAdi101xX XxAdi101xX force-pushed the XxAdi101xX:adding-fast-substitutability-test-flag branch from 08c45fc to f39d9d9 Nov 29, 2019
This commit adds the J9ClassCanSupportFastSubstitutability flag which is used to determine whether an optimization can be used within the ACMP bytecode instruction for valuetypes.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
@XxAdi101xX XxAdi101xX force-pushed the XxAdi101xX:adding-fast-substitutability-test-flag branch from f39d9d9 to b285546 Nov 29, 2019
@tajila
tajila approved these changes Nov 29, 2019
@tajila

This comment has been minimized.

Copy link
Contributor

tajila commented Nov 29, 2019

@gacholio please review these changes

@gacholio

This comment has been minimized.

Copy link
Contributor

gacholio commented Nov 29, 2019

I didn't see any obvious handling of superclasses here - if the super isn't fast, the sub can't be.

@gacholio gacholio merged commit 37a8917 into eclipse:master Dec 2, 2019
7 checks passed
7 checks passed
Build_JDK11_x86-64_linux_Personal Build PASSED
Details
Copyright Check Copyrights appear to be up to date
Details
Line Endings Check Line endings appear to be correct
Details
Pull Request - OpenJ9 All jobs passed
Details
Test_openjdk11_j9_sanity.functional_x86-64_linux_Personal Build PASSED
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
eclipsefdn/eca The author(s) of the pull request is covered by necessary legal agreements in order to proceed!
Details
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 2, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
tajila added a commit to tajila/openj9 that referenced this pull request Dec 6, 2019
In eclipse#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 <atobia@ca.ibm.com>
tajila added a commit to tajila/openj9 that referenced this pull request Dec 6, 2019
In eclipse#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 <atobia@ca.ibm.com>
tajila added a commit to tajila/openj9 that referenced this pull request Dec 6, 2019
In eclipse#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 <atobia@ca.ibm.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 9, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 9, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 11, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 12, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 16, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 16, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
In eclipse#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 <atobia@ca.ibm.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 17, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 18, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 18, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
XxAdi101xX added a commit to XxAdi101xX/openj9 that referenced this pull request Dec 19, 2019
This commit adds the implementation to handle value types when the ACMP bytecode is used to compare object fields. An ACMP optimization is also added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
tajila added a commit to tajila/openj9 that referenced this pull request Jan 9, 2020
This commit adds the implementation to handle value types when the ACMP
bytecode is used to compare object fields. An ACMP optimization is also
added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
tajila added a commit to tajila/openj9 that referenced this pull request Jan 9, 2020
This commit adds the implementation to handle value types when the ACMP
bytecode is used to compare object fields. An ACMP optimization is also
added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
tajila added a commit to tajila/openj9 that referenced this pull request Jan 9, 2020
This commit adds the implementation to handle value types when the ACMP
bytecode is used to compare object fields. An ACMP optimization is also
added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
tajila added a commit to tajila/openj9 that referenced this pull request Jan 9, 2020
This commit adds the implementation to handle value types when the ACMP
bytecode is used to compare object fields. An ACMP optimization is also
added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
tajila added a commit to tajila/openj9 that referenced this pull request Jan 10, 2020
This commit adds the implementation to handle value types when the ACMP
bytecode is used to compare object fields. An ACMP optimization is also
added and depends on the flag defined in eclipse#7743.

Signed-off-by: Adithya Venkatarao <adi_101@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.