oneapi-src / oneTBB

oneAPI Threading Building Blocks (oneTBB)
https://oneapi-src.github.io/oneTBB/
Apache License 2.0
5.67k stars 1.02k forks source link

ITTNotify usage must be configurable #654

Open ilya-lavrenov opened 2 years ago

ilya-lavrenov commented 2 years ago

When static library build is used, ITT notify symbols may conflict with other ITT notify symbols from end application / target library. TBB must provide a way to switch ITT off

alexey-katranov commented 2 years ago

oneTBB does not officially support static build due to potential issues with symbol conflicts, correctness and performance. However, you can try to disable __TBB_USE_ITT_NOTIFY macro (src/tbb/CMakeLists.txt#L65) to disable ITT instrumentation (pay attention that the instrumentation is used by profiling tools for better analysis.)

ilya-lavrenov commented 2 years ago

Yes, I did this, but it require TBB modifications while it would be nice to have an explicit cmake option

pay attention that the instrumentation is used by profiling tools for better analysis

In production build where all performance issues are investigated / fixed - it's not needed.

alexey-katranov commented 2 years ago

Yes, I did this, but it require TBB modifications while it would be nice to have an explicit cmake option

The problem with any additional option is that it significantly increases the number of configurations to test (this is kind of a combinatorial problem). If you are interested, we can come up with some untested option, but from time to time it can break.

In production build where all performance issues are investigated / fixed - it's not needed.

ITT instrumentation is invented for production builds that our users can have additional information when profiling their applications. So, you do not need a special build to profile your oneTBB based application.

isaevil commented 2 years ago

@ilya-lavrenov is it fine for you if make -DTBB_USE_ITT_NOTIFY option for CMake but leave it untested?

ilya-lavrenov commented 2 years ago

@ilya-lavrenov is it fine for you if make -DTBB_USE_ITT_NOTIFY option for CMake but leave it untested?

Yes, sure

ilya-lavrenov commented 1 year ago

What is current status of this? is WIP or not?

arunparkugan commented 2 months ago

@ilya-lavrenov is this issue still relevant?

ilya-lavrenov commented 2 months ago

Yes