From 0ec48e0ec92644d5b456d092e7634495b39d61bf Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Thu, 12 Feb 2015 01:36:29 +0100 Subject: JitRegister: fix VTune integration --- Source/Core/Common/Thread.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source/Core/Common/Thread.cpp') 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 #endif +#ifdef USE_VTUNE +#include +#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 -- cgit v1.2.3