This is the mail archive of the
mailing list for the GCC project.
how to mark a memory address so that it's not instrumented by tsan
- From: "Bradley C. Kuszmaul" <bradley at mit dot edu>
- To: gcc at gcc dot gnu dot org
- Cc: dseketel at redhat dot com, jakub at redhat dot com, wmi at google dot com, dvyukov at google dot com
- Date: Fri, 18 Apr 2014 14:26:39 -0400
- Subject: how to mark a memory address so that it's not instrumented by tsan
- Authentication-results: sourceware.org; auth=none
Hi, I'm trying to build a race detector for Cilk programs (as an
open-source alternative to the closed-source Intel cilkscreen race
I'm trying to use the -fsanitize=thread to instrument the loads and
stores, and I'm also use -fcilkplus to generate cilk code at the same
time. My plan is to replace the tsan library with my own library that
uses a near-linear time race detection algorithm. (A race detector
that works on nested fork-join parallel programs can be faster than a
general race detector which must cope with arbitrary dependencies).
So here's the problem: -fcilkplus introduces extra loads and stores
into the code, to interact with Cilk's work stealing scheduler runtime
system. I don't want those loads and stores to be instrumented with
calls such as tsan_write4().
Is there some way to mark a memory access so that it's not instrumented by tsan?