tcmalloc: Fix thread-safety (annotalysis) annotations
Chromium's fork of gperftools/tcmalloc contains some thread-safety
annotations; however those annotations have not been exercised for
some time, as they used macros/attributes only supported by a
legacy branch of gcc.
crrev.com/c/2702729 converted those macros to support modern
versions of clang; this CR fixes the annotations that were enabled.
For the most part, this just requires re-enabling annotations on
member functions that take/release locks. For the tcmalloc fork
(pre-fork and post-fork) handlers, we mark the functions as
exempt from this analysis, as it takes a dynamic number of locks.
* Manually enabled "-Wthread-safety" for host tool, built base/allocator
Reviewed-by: Primiano Tucci <firstname.lastname@example.org>
Commit-Queue: Venkatesh Srinivas <email@example.com>
4 files changed