-
Notifications
You must be signed in to change notification settings - Fork 737
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
Reduce the number of VM_isStable messages #21067
Conversation
46411b1
to
28f6ed8
Compare
jenkins test sanity.functional xlinux,xlinuxjit,plinuxjit,zlinuxjit jdk21 depends eclipse-omr/omr#7642 |
@mpirvu failing tests are mostly the |
JITServer failures are tracked by this: #21066 |
The only remaining unexplained failure is https://openj9-jenkins.osuosl.org/job/Test_openjdk21_j9_sanity.functional_ppc64le_linux_jit_Personal_testList_1/9/; seems to have timed out but I don't know if this is also a known issue. |
Regardless, still waiting for the OMR changes to propagate before this can be merged. |
28f6ed8
to
a683036
Compare
The frontend query `isStable(J9Class *fieldClass, int32_t cpIndex)` determines if the field at given J9Class and cpIndex has the @stable annotation. Before this commit, the JITServer implementation had to send a VM_isStable message to the client for every such query. This commit implements caching of the isStable values at JITServer. Caching is done with a hashtable per J9Class, where the key is the cpIndex we are interested in. To further reduce the number of the hashtables that serve as a cache, the `isStable()` will answer `false` for any non-bootstrap class. The reason is that at the moment only bootstrap classs have the @stable annotation. This behavior can be disabled by defining the following environment variable: `TR_DontIgnoreStableAnnotationForUserClasses`. Another optimization regards the implementation of `isArrayWithStableElements(cpIndex, owningMethod, comp)`. In here, we first check to see if we are dealing with an array (which is simpler) and only then call the isStable() query. Signed-off-by: Marius Pirvu <[email protected]>
a683036
to
bf518c3
Compare
jenkins test sanity.functional xlinux,xlinuxjit,plinuxjit,zlinuxjit,alinux64jit jdk21 |
@dsouzai All tests have passed. This PR is ready to be merged. |
The frontend query
isStable(J9Class *fieldClass, int32_t cpIndex)
determines if the field at given J9Class and cpIndex has the @stable annotation.Before this commit, the JITServer implementation had to send a VM_isStable message to the client for every such query. This commit implements caching of the isStable values at JITServer. Caching is done with a hashtable per J9Class, where the key is the cpIndex we are interested in.
To further reduce the number of the hashtables that serve as a cache, the
isStable()
will answerfalse
for any non-bootstrap class. The reason is that at the moment only bootstrap classs have the @stable annotation. This behavior can be disabled by defining the following environment variable:TR_DontIgnoreStableAnnotationForUserClasses
.Another optimization regards the implementation of
isArrayWithStableElements(cpIndex, owningMethod, comp)
. In here, we first check to see if we are dealing with an array (which is simpler) and only then call the isStable() query.Depends on eclipse-omr/omr#7642