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 | 2e7e5801a79a76aab1514e5faa5e0dc74b01ec7f (patch) | |
tree | 871bdf74fc09b7956fa4d2139226edc5efc692a0 | |
parent | 61f2032d3b292f98e92ebb8108664fbe1a855574 (diff) | |
download | bcm5719-llvm-2e7e5801a79a76aab1514e5faa5e0dc74b01ec7f.tar.gz bcm5719-llvm-2e7e5801a79a76aab1514e5faa5e0dc74b01ec7f.zip |
asan: disable pthread_setname_np interceptor
it does not work anyway and can cause significant slowdown
llvm-svn: 194711
-rw-r--r-- | compiler-rt/lib/asan/asan_interceptors.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_interceptors.cc b/compiler-rt/lib/asan/asan_interceptors.cc index 76595e9e326..a25827b6b9a 100644 --- a/compiler-rt/lib/asan/asan_interceptors.cc +++ b/compiler-rt/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" |