Skip to content

Commit

Permalink
Merge pull request #18667 from JasonFengJ9/jdk23vt
Browse files Browse the repository at this point in the history
JDK23 adds JVM_VirtualThreadDisableSuspend
  • Loading branch information
pshipton authored Dec 21, 2023
2 parents 10021b5 + bf6bd0d commit a9666de
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
5 changes: 5 additions & 0 deletions runtime/j9vm/exports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,11 @@ endif()
if(NOT JAVA_SPEC_VERSION LESS 22)
jvm_add_exports(jvm
JVM_ExpandStackFrameInfo
)
endif()

if(NOT JAVA_SPEC_VERSION LESS 23)
jvm_add_exports(jvm
JVM_VirtualThreadDisableSuspend
)
endif()
Expand Down
4 changes: 4 additions & 0 deletions runtime/j9vm/j9vmnatives.xml
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<exports group="jdk22">
<!-- Additions for Java 22 (General) -->
<export name="JVM_ExpandStackFrameInfo"/>
</exports>

<exports group="jdk23">
<!-- Additions for Java 23 (General) -->
<export name="JVM_VirtualThreadDisableSuspend"/>
</exports>
</exportlists>
4 changes: 3 additions & 1 deletion runtime/j9vm/javanextvmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,14 @@ JVM_ExpandStackFrameInfo(JNIEnv *env, jobject object)
{
assert(!"JVM_ExpandStackFrameInfo unimplemented");
}
#endif /* JAVA_SPEC_VERSION >= 22 */

#if JAVA_SPEC_VERSION >= 23
JNIEXPORT void JNICALL
JVM_VirtualThreadDisableSuspend(JNIEnv *env, jobject vthread, jboolean enter)
{
assert(!"JVM_VirtualThreadDisableSuspend unimplemented");
}
#endif /* JAVA_SPEC_VERSION >= 22 */
#endif /* JAVA_SPEC_VERSION >= 23 */

} /* extern "C" */
3 changes: 3 additions & 0 deletions runtime/j9vm/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<group name="jdk22">
<include-if condition="spec.java22"/>
</group>
<group name="jdk23">
<include-if condition="spec.java23"/>
</group>
</exports>
<includes>
<include path="j9include"/>
Expand Down
2 changes: 1 addition & 1 deletion runtime/redirector/forwarders.m4
Original file line number Diff line number Diff line change
Expand Up @@ -429,5 +429,5 @@ _IF([defined(J9VM_OPT_VALHALLA_VALUE_TYPES)],
[_X(JVM_IsValhallaEnabled, JNICALL, false, jboolean, void)])
_IF([JAVA_SPEC_VERSION >= 22],
[_X(JVM_ExpandStackFrameInfo, JNICALL, false, void, JNIEnv *env, jobject object)])
_IF([JAVA_SPEC_VERSION >= 22],
_IF([JAVA_SPEC_VERSION >= 23],
[_X(JVM_VirtualThreadDisableSuspend, JNICALL, false, void, JNIEnv *env, jobject vthread, jboolean enter)])
3 changes: 3 additions & 0 deletions runtime/redirector/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<group name="jdk22">
<include-if condition="spec.java22"/>
</group>
<group name="jdk23">
<include-if condition="spec.java23"/>
</group>
</exports>
<includes>
<include path="j9include"/>
Expand Down

0 comments on commit a9666de

Please sign in to comment.