[PATCH] D54889: Fiber support for thread sanitizer
Dmitry Vyukov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 06:15:10 PST 2019
dvyukov added a comment.
Since fiber support incurs slowdown for all current tsan users who don't use fibers, this is a hard decision.
I've prototyped a change which leaves fast_state and fast_synch_epoch in TLS (the only state accessed on fast path besides the clock):
struct FastThreadState {
FastState fast_state;
u64 fast_synch_epoch;
};
__attribute__((tls_model("initial-exec")))
extern THREADLOCAL char cur_thread_faststate1[];
INLINE FastThreadState& cur_thread_faststate() {
return *reinterpret_cast<FastThreadState *>(cur_thread_faststate1);
}
But this seems to be even slower than just using the single pointer indirection.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54889/new/
https://reviews.llvm.org/D54889
More information about the llvm-commits
mailing list