diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2013-11-14 16:48:22 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2013-11-14 16:48:22 +0000 |
commit | e767e350b1a6461bc29cfea28af75f908d7da56e (patch) | |
tree | b0b8d4c629d5df5368136264cbdc6e1272747dca | |
parent | 1170865d797f338b71d8b9d20297f3d9015144be (diff) | |
download | compiler-rt-e767e350b1a6461bc29cfea28af75f908d7da56e.tar.gz |
asan: disable pthread_setname_np interceptor
it does not work anyway and can cause significant slowdown
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194711 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/asan/asan_interceptors.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/asan/asan_interceptors.cc b/lib/asan/asan_interceptors.cc index 76595e9e3..a25827b6b 100644 --- a/lib/asan/asan_interceptors.cc +++ b/lib/asan/asan_interceptors.cc @@ -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" |