diff options
| author | Fiora <fioraaeterna@gmail.com> | 2015-02-22 07:58:12 -0800 |
|---|---|---|
| committer | Fiora <fioraaeterna@gmail.com> | 2015-02-22 07:58:12 -0800 |
| commit | c54a8c54fb97aab9b866f11525fffa5516cfa4e3 (patch) | |
| tree | 839ab98fcc8441e1c008ba8e28aaedb0cc540e92 /Source/Core/Common/Thread.cpp | |
| parent | 8cd32e171a3a100b0f08b2b49f8864c348a4266f (diff) | |
| parent | 0ec48e0ec92644d5b456d092e7634495b39d61bf (diff) | |
Merge pull request #1994 from Tilka/vtune
JitRegister: fix VTune integration
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 |
