Skip to content

Commit

Permalink
fix JIT profiling with VTune
Browse files Browse the repository at this point in the history
  • Loading branch information
RSDuck committed Apr 12, 2023
1 parent 613280d commit a864f84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions cmake/FindVTune.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@

find_path(VTUNE_PATH "")

include_directories("${VTUNE_PATH}/include")
link_directories("${VTUNE_PATH}/lib64")
set(VTUNE_INCLUDE_DIR "${VTUNE_PATH}/include")

if (WIN32)
set(VTUNE_LIBRARY "${VTUNE_PATH}/lib64/jitprofiling.lib")
else()
set(VTUNE_LIBRARY "${VTUNE_PATH}/lib64/jitprofiling.a")
endif()
5 changes: 3 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if (ENABLE_JIT)
target_compile_definitions(core PUBLIC JIT_ENABLED)

if (ENABLE_JIT_PROFILING)
include(cmake/FindVTune.cmake)
include(../cmake/FindVTune.cmake)
add_definitions(-DJIT_PROFILING_ENABLED)
endif()
endif()
Expand All @@ -134,5 +134,6 @@ elseif(NOT APPLE)
endif()

if (ENABLE_JIT_PROFILING)
target_link_libraries(core PRIVATE jitprofiling)
target_include_directories(core PRIVATE "${VTUNE_INCLUDE_DIR}")
target_link_libraries(core PRIVATE "${VTUNE_LIBRARY}")
endif()

0 comments on commit a864f84

Please sign in to comment.