asan: disable pthread_setname_np interceptor

it does not work anyway and can cause significant slowdown

llvm-svn: 194711
This commit is contained in:
Dmitry Vyukov 2013-11-14 16:48:22 +00:00
parent 61f2032d3b
commit 2e7e5801a7
1 changed files with 6 additions and 1 deletions

View File

@ -144,8 +144,13 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, void *)
do { \
} while (false)
#define COMMON_INTERCEPTOR_SET_THREAD_NAME(ctx, name) SetThreadName(name)
// Should be asanThreadRegistry().SetThreadNameByUserId(thread, name)
// But asan does not remember UserId's for threads (pthread_t);
// and remembers all ever existed threads, so the linear search by UserId
// can be slow.
#define COMMON_INTERCEPTOR_SET_PTHREAD_NAME(ctx, thread, name) \
asanThreadRegistry().SetThreadNameByUserId(thread, name)
do { \
} while (false)
#define COMMON_INTERCEPTOR_BLOCK_REAL(name) REAL(name)
#define COMMON_INTERCEPTOR_ON_EXIT(ctx) OnExit()
#include "sanitizer_common/sanitizer_common_interceptors.inc"