-
Notifications
You must be signed in to change notification settings - Fork 721
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
Update resolve code to support OpenJDK MH #10893
Update resolve code to support OpenJDK MH #10893
Conversation
6c8ea48
to
8238f0f
Compare
@fengxue-IS can you @ me when this is ready to be reviewed? |
8238f0f
to
93078a5
Compare
@fengxue-IS is this ready for another review cycle? |
@DanHeidinga Apology for the late reply, I have been trying to resolve a crash when testing this change locally enabling OpenJDK_MethodHandle flag. With Tobi & Babneet's help, the problem is because of java code called during memberName resolution and triggered GC which moved the heap object and need to be refetched. This is ready for review, can you please take a look? |
Thanks for the update Jack. I'm aiming to review this later this week |
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.
A mixture of functional and formatting issues are identified.
b959b48
to
8e73fef
Compare
@@ -85,7 +85,11 @@ class GC_ClassIterator { | |||
, _classStaticsIterator(env, clazz) | |||
, _constantPoolObjectSlotIterator((J9JavaVM *)env->getLanguageVM(), clazz) | |||
, _callSitesIterator(clazz) | |||
#if defined(J9VM_OPT_OPENJDK_METHODHANDLE) | |||
, _methodTypesIterator(clazz->romClass->invokeCacheCount, clazz->invokeCache) |
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.
Shouldn't this iterator be renamed given it's 1) not iterating MTs anymore, 2) it's now dealing with the invokeCache
?
@amicic opinions?
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.
seems reasonable, but since I don't fully understand relationship between MH and invokeCache, I'll add @dmitripivkine
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.
(from my narrow perspective) I'm wondering why the ifdef build flag has METHODHANDLE in the name, and should it be INVOKECACHE ?
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.
The ifdef is for the other all feature which is using the OpenJDK MH implementation.
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.
@fengxue-IS Can you open an issue to track renaming the GC_MethodTypesIterator
to something like GC_InvokeCacheIterator
? We need to track it as a cleanup task that should be done before the final cutover but doesn't need to be included in this PR
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.
created #11168 to track this cleanup work
@fengxue-IS ping me when the review has been addressed and I'll give this another look |
8e73fef
to
391f187
Compare
391f187
to
a7cc768
Compare
@DanHeidinga thanks for the feedback, can you please take another look? |
@liqunl are you OK with the JIT helper change? |
Jenkins test sanity zlinux jdk8 |
Jenkins test sanity win jdk11 |
Jenkins test sanity osx jdk15 |
955d40f
to
2a3dd87
Compare
Fixed compiler warning about unused variable |
Jenkins test sanity osx jdk15 |
Jenkins test sanity win jdk11 |
Jenkins test sanity zlinux jdk8 |
Note, all the builds have passed now. I'm ready to merge this once the conflict is resolved. Any remaining concerns @babsingh @liqunl? @fengxue-IS can you resolve the conflict in jvm.tdf? |
No more concerns. |
Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com> Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
- new sendResolveOpenJDKInvokeHandle - new resolveOpenJDKInvokeHandle - update resolveInvokeDynamic - update resolveVirtualMethodRefInto - update resolveStaticMethodRefInto Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com> Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
Modify Interpreter code to support the new single slot design Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com> Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
- update old_slow_jitResolveHandleMethod Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com> Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
Signed-off-by: Jack Lu <Jack.S.Lu@ibm.com>
2a3dd87
to
1a9fb65
Compare
Fixed conflict in j9vm.tdf, local compile passed |
Related: #7352
Co-authored-by: Babneet Singh sbabneet@ca.ibm.com
Signed-off-by: Jack Lu Jack.S.Lu@ibm.com