Skip to content

Commit

Permalink
Add native method stubs of jdk.jfr.internal.JVM on different versions
Browse files Browse the repository at this point in the history
Signed-off-by: Gengchen Tuo <[email protected]>
  • Loading branch information
thallium committed Nov 19, 2024
1 parent 33127aa commit f2c1a5e
Show file tree
Hide file tree
Showing 14 changed files with 1,016 additions and 297 deletions.
33 changes: 29 additions & 4 deletions runtime/jcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,35 @@ endif()

if(J9VM_OPT_JFR)
# JFR sources
target_sources(jclse
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM.cpp
)
if(JAVA_SPEC_VERSION EQUAL 11)
target_sources(jclse
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_common.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk11.cpp
)
elseif(JAVA_SPEC_VERSION EQUAL 17)
target_sources(jclse
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_common.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk17.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk17andUp.cpp
)
elseif(JAVA_SPEC_VERSION EQUAL 21)
target_sources(jclse
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_common.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk17andUp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk21andUp.cpp
)
elseif(NOT JAVA_SPEC_VERSION LESS 23)
target_sources(jclse
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_common.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk17andUp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk21andUp.cpp
${CMAKE_CURRENT_SOURCE_DIR}/common/jdk_jfr_internal_JVM_jdk23.cpp
)
endif()
endif()

include(exports.cmake)
Expand Down
Loading

0 comments on commit f2c1a5e

Please sign in to comment.