aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-11-16 18:23:21 -0800
committerVitaly Buka <vitalybuka@google.com>2021-11-17 19:41:49 -0800
commit111d8f785b3a2a163411cef00327248d35571612 (patch)
treee8a04e3c25732f8b8a5d0740b382f09226f9df69 /clang/lib/Frontend/CompilerInvocation.cpp
parent49682f14bf3fb8db5e2721d9896b27bb4c2bd635 (diff)
downloadllvm-111d8f785b3a2a163411cef00327248d35571612.zip
llvm-111d8f785b3a2a163411cef00327248d35571612.tar.gz
llvm-111d8f785b3a2a163411cef00327248d35571612.tar.bz2
tsan: remove quadratic behavior in pthread_join
pthread_join needs to map pthread_t of the joined thread to our Tid. Currently we do this with linear search over all threads. This has quadratic complexity and becomes much worse with the new tsan runtime, which memorizes all threads that ever existed. To resolve this add a hash map of live threads only (that are still associated with pthread_t) and use it for the mapping. With the new tsan runtime some programs spent 1/3 of time in this mapping. After this change the mapping disappears from profiles. Depends on D113996. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D113997
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions