diff options
Diffstat (limited to 'Source/Core/Common/Thread.cpp')
| -rw-r--r-- | Source/Core/Common/Thread.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/Common/Thread.cpp b/Source/Core/Common/Thread.cpp index 286ed088bc..c57760039f 100644 --- a/Source/Core/Common/Thread.cpp +++ b/Source/Core/Common/Thread.cpp @@ -12,6 +12,11 @@ #include <pthread_np.h> #endif +#ifdef USE_VTUNE +#include <ittnotify.h> +#pragma comment(lib, "libittnotify.lib") +#endif + namespace Common { @@ -123,6 +128,10 @@ void SetCurrentThreadName(const char* szThreadName) #else pthread_setname_np(pthread_self(), szThreadName); #endif +#ifdef USE_VTUNE + // VTune uses OS thread names by default but probably supports longer names when set via its own API. + __itt_thread_set_name(szThreadName); +#endif } #endif |
