[compiler-rt] r194711 - asan: disable pthread_setname_np interceptor
Dmitry Vyukov
dvyukov at google.com
Thu Nov 14 08:48:22 PST 2013
Author: dvyukov
Date: Thu Nov 14 10:48:22 2013
New Revision: 194711
URL: http://llvm.org/viewvc/llvm-project?rev=194711&view=rev
Log:
asan: disable pthread_setname_np interceptor
it does not work anyway and can cause significant slowdown
Modified:
compiler-rt/trunk/lib/asan/asan_interceptors.cc
Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=194711&r1=194710&r2=194711&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Thu Nov 14 10:48:22 2013
@@ -144,8 +144,13 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free,
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"
More information about the llvm-commits
mailing list