-
Notifications
You must be signed in to change notification settings - Fork 710
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 constant dynamic unit tests #2870
Conversation
@yanluo7 @fjeremic These are the tests for Constant Dynamic which includes Testing following primitive data types
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing these tests!
<test> | ||
<testCaseName>CondyPrimitive</testCaseName> | ||
<variations> | ||
<variation>'-Xint'</variation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need an -Xint
variation as it tends to be slow to run. A no options variant will typically result in the interpreter executing the test methods which should be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to NoOptions
in 2d8f421
<variations> | ||
<variation>'-Xint'</variation> | ||
<variation>'-Xjit:count=1,disableAsyncCompilation'</variation> | ||
<variation>'-Xjit:count=0,disableAsyncCompilation'</variation> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this to force runtime resolves? Should it also include the rtResolve
options to force the jit to always take the resolve path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to -Xjit:count=1,disableAsyncCompilation,rtResolve
in 2d8f421
|
||
public static int bootstrap_constant_int(MethodHandles.Lookup l, String name, Class<?> c, int v) { | ||
return v; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting - the methods should be indented like:
public class BootstrapMethods {
public static Object bootstrap_constant_string(MethodHandles.Lookup l, String name, Class<?> c, String s) {
return s;
}
}
test/functional/Java11andUp/src/org/openj9/test/condy/PrimitiveCondyTest.java
Show resolved
Hide resolved
@@ -66,9 +66,9 @@ | |||
# Define a a hash for each dependent jar | |||
# Contents in the hash should be: url => , fname =>, sha1 => | |||
my %asm_all = ( | |||
url => 'http://central.maven.org/maven2/org/ow2/asm/asm-all/6.0_BETA/asm-all-6.0_BETA.jar', | |||
url => 'https://repository.ow2.org/nexus/content/repositories/snapshots/org/ow2/asm/asm/7.0-beta-SNAPSHOT/asm-7.0-beta-20180911.182645-11.jar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smlambert @llxia we had to upgrade ASM to a newer level for the condy bytecode support. I'm just verifying this change is ok from the test perspective. Please let us know. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
- https://ci.eclipse.org/openj9/job/test.getDependency/ - may need to manually launch after merge. It is scheduled to run every hour. If any test build is launched between the merge and new test.getDependency build, the test build will fail.
- Same for https://ci.adoptopenjdk.net/view/all/job/test.getDependency/ and internal Jenkins
test/functional/Java11andUp/src/org/openj9/test/condy/PrimitiveCondyTest.java
Show resolved
Hide resolved
I'll wait until @DanHeidinga gives an approval before launching builds for this just in case you may have additional comments on the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Let me squash the commits. I will keep grabbing latest ASM change in separate Commit |
Jenkins test sanity xlinux,plinux,zlinux JDK8,JDK11 |
It seems like we need asm-all (Failures corresponds to misssing components like |
Add Java 11 tests for Constant Dynamic mainly involves String object, NULL object and Primitive data types objects. Variation covers running this test in interpreted mode as well as specific JIT compilation modes which checks out JIT's handling of resolved and unresolved Constant Dynamic cases. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
For released asm version we get asm-all.jar which combines all asm components in single jar. To test ConstantDynamic helper methods are only available in 7.0 version of asm which is not released yet. This commit grabs asm-7.0 as well which contains necessary classes to generate tests for Constant Dynamic Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
@fjeremic @llxia I made a change, specifically with getting asm commit. Now we will have two asm jars, |
@llxia I'm not sure how the test team is tracking all the work but can you open up an Issue somewhere to remember to clean this up once 7.0 is released? |
Jenkins test sanity xlinux,plinux,zlinux JDK8,JDK11 |
JDK11 failures due to #2708. This was way before we merged any of the JIT changes in this area so it cannot be related to this change. |
Add Java 11 tests for Constant Dynamic mainly involves String object, NULL object and Primitive data types objects. Variation covers running this test in interpreted mode as well as specific JIT compilation modes which checks out JIT's handling of resolved and unresolved Constant Dynamic cases.
Signed-off-by: Rahil Shah rahil@ca.ibm.com