[llvm] Protect signpost map with a mutex
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 19 Jan 2021 19:37:45 +0000 (11:37 -0800)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 19 Jan 2021 19:41:54 +0000 (11:41 -0800)
commita4b42c621b9e2009cfd8bc9265bbf970c7231271
tree4396863cd684278c2d2609b16e9a15b94165d6df
parent6ac9cb2a7c6c19797fc778f3d441a6fb7b69793c
[llvm] Protect signpost map with a mutex

Use a mutex to protect concurrent access to the signpost map. This fixes
nondeterministic crashes in LLDB that appeared after using signposts in
the timer implementation.

Differential revision: https://reviews.llvm.org/D94285
llvm/lib/Support/Signposts.cpp