diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2021-11-15 19:00:31 +0100 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2021-11-16 07:51:08 +0100 |
commit | 64b45399e5c547dc59ea3c72891fccdda7284eaa (patch) | |
tree | d5001173f660d45f644fd4e2270db9beee78ad6d /lldb/packages/Python/lldbsuite/test/gdbclientutils.py | |
parent | b85f97bc00ae7813e8667e2e87561a490ae1e68e (diff) | |
download | llvm-64b45399e5c547dc59ea3c72891fccdda7284eaa.zip llvm-64b45399e5c547dc59ea3c72891fccdda7284eaa.tar.gz llvm-64b45399e5c547dc59ea3c72891fccdda7284eaa.tar.bz2 |
tsan: speed up pthread_setname_np
pthread_setname_np does linear search over all thread descriptors
to map pthread_t to the thread descriptor. This has O(N^2) complexity
and becomes much worse in the new tsan runtime that keeps all ever
existed threads in the thread registry.
Replace linear search with direct access if pthread_setname_np
is called for the current thread (a very common case).
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D113916
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/gdbclientutils.py')
0 files changed, 0 insertions, 0 deletions