tsan: extend MutexSet to memorize mutex address/stack_id
authorDmitry Vyukov <dvyukov@google.com>
Tue, 10 Aug 2021 18:19:58 +0000 (20:19 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Thu, 12 Aug 2021 11:18:43 +0000 (13:18 +0200)
commitd9afba9000a73ea4b800cb748114c821a2ca0394
treec3c446ed69961221812904b66c1ab02ea85ffefc
parentf52fc591fa34a8c85577108358b3b36c42b6d364
tsan: extend MutexSet to memorize mutex address/stack_id

We currently memorize u64 id + epoch for each mutex.
The new tsan runtime will memorize address + stack_id instead.
But switching to address + stack_id requires new trace,
which in turn requires new MutexSet and some other changes.
Extend MutexSet to support both new and old info to break
the dependency cycles. The plan is to remove the old
info/methods after switching to the new runtime.

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D107910
compiler-rt/lib/tsan/rtl/tsan_mutexset.cpp
compiler-rt/lib/tsan/rtl/tsan_mutexset.h