Skip to content

Commit 09761e6

Browse files
committed
ittnotify: use untouched library
1 parent fd3960d commit 09761e6

14 files changed

+30
-8773
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ if (TBB_FIND_PACKAGE AND TBB_DIR)
240240
find_package(TBB REQUIRED)
241241
else()
242242
if (TBB_BUILD)
243+
add_subdirectory(src/ittapi)
243244
add_subdirectory(src/tbb)
244245
endif()
245246
if (TBBMALLOC_BUILD)

src/ittapi/CMakeLists.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
include(FetchContent)
2+
3+
# Fetch the ittapi library if it doesn't exist
4+
if(NOT TARGET ittapi::ittnotify)
5+
FetchContent_Declare(
6+
ittapi
7+
# https://github.com/intel/ittapi/archive/refs/tags/v3.25.1.tar.gz
8+
URL ${CMAKE_CURRENT_SOURCE_DIR}/ittapi-3.25.1.tar.gz
9+
URL_HASH
10+
SHA256=866a5a75a287a7440760146f99bd1093750c3fb5bf572c3bff2d4795628ebc7c
11+
)
12+
FetchContent_MakeAvailable(ittapi)
13+
add_library(ittapi::ittnotify ALIAS ittnotify)
14+
endif()
15+
16+
if(NOT TARGET ittapi::ittnotify)
17+
message(
18+
ERROR
19+
"Failed to add Intel® Instrumentation and Tracing Technology (ITT) library"
20+
)
21+
endif()

src/ittapi/ittapi-3.25.1.tar.gz

191 KB
Binary file not shown.

src/tbb/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ endif()
121121

122122
target_link_libraries(tbb
123123
PRIVATE
124+
ittapi::ittnotify
124125
Threads::Threads
125126
${TBB_LIB_LINK_LIBS}
126127
${TBB_COMMON_LINK_LIBS}

src/tbb/itt_notify.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ extern "C" void MallocInitializeITT();
4040
#error This file is expected to be used for either TBB or TBB allocator build.
4141
#endif // __TBB_BUILD
4242

43-
#include "tools_api/ittnotify_static.c"
44-
4543
namespace tbb {
4644
namespace detail {
4745
namespace r1 {
4846

4947
/** This extra proxy method is necessary since __itt_init_lib is declared as static **/
5048
int __TBB_load_ittnotify() {
5149
#if !(_WIN32||_WIN64)
50+
#include <dlfcn.h>
5251
// tool_api crashes without dlopen, check that it's present. Common case
5352
// for lack of dlopen is static binaries, i.e. ones build with -static.
5453
if (dlopen == nullptr)

src/tbb/itt_notify.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#define INTEL_ITTNOTIFY_API_PRIVATE
3232
#endif
3333

34-
#include "tools_api/ittnotify.h"
35-
#include "tools_api/legacy/ittnotify.h"
34+
#include "ittnotify.h"
35+
#include "legacy/ittnotify.h"
3636
extern "C" void __itt_fini_ittlib(void);
3737
extern "C" void __itt_release_resources(void);
3838

src/tbb/tools_api/disable_warnings.h

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)