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 CT helper to check for ChangesCurrentThread annotation #18222
Conversation
@tajila I'd appreciate your review. |
Signed-off-by: Nazim Bhuiyan <nubhuiyan@ibm.com>
Is the result of that call going to be cached? You dont want to call this repeatedly since it needs to parse the method attributes |
The result of the call would not get cached as there will be no more than one call per method being considered for inlining during a compilation, similar to |
jenkins compile win jdk8 |
jenkins test sanity alinux64 jdk21 |
runtime/jit_vm/cthelpers.cpp
Outdated
@@ -29,6 +29,10 @@ | |||
|
|||
extern "C" { | |||
|
|||
#if JAVA_SPEC_VERSION >= 20 |
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.
Minor nit, maybe a question for @tajila.
Should this be >= 21
since JDK 20 is no longer available and we no longer build it? Or do we specify it this way because that's when the annotation was first introduced and its good for bookkeeping purposes? I'm fine either way, just curious.
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.
Actually, the annotation appears in JDK 19 as well it seems. So if we're back-leveling the JDKs for bookkeeping purposes then it should be at least JDK 19.
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.
For new code, we typically don't account for out-of-support releases. So we can ignore jdk19 and jdk20.
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 changed the JAVA_SPEC_VERSION check to 21. Once the tests you launched pass, I can squash and rebase.
JAVA_SPEC_VERSION checks for new code should only be for what is currently supported. Signed-off-by: Nazim Bhuiyan <nubhuiyan@ibm.com>
jenkins test sanity alinux64 jdk21 |
The aarch64 test failure:
This is not related to the changes in this PR. |
LGTM @0xdaryl any concerns? |
This is required for implementing the JIT inlining behaviour expected for the methods annotated by
@ChangesCurrentThread
.Issue: #17519