summaryrefslogtreecommitdiffstats
path: root/docs/ThreadSanitizer.html
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
committerdim <dim@FreeBSD.org>2012-12-02 13:20:44 +0000
commit056abd2059c65a3e908193aeae16fad98017437c (patch)
tree2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /docs/ThreadSanitizer.html
parentcc73504950eb7b5dff2dded9bedd67bc36d64641 (diff)
downloadFreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip
FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'docs/ThreadSanitizer.html')
-rw-r--r--docs/ThreadSanitizer.html15
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/ThreadSanitizer.html b/docs/ThreadSanitizer.html
index 7a1d075..aa251c1 100644
--- a/docs/ThreadSanitizer.html
+++ b/docs/ThreadSanitizer.html
@@ -37,9 +37,8 @@ Typical slowdown introduced by ThreadSanitizer is <b>5x-15x</b> (TODO: these num
approximate so far).
<h2 id="howtobuild">How to build</h2>
-Follow the <a href="../get_started.html">clang build instructions</a>. <BR>
-Note: CMake build does not work yet.
-See <a href="http://llvm.org/bugs/show_bug.cgi?id=12272">bug 12272</a>.
+Follow the <a href="../get_started.html">clang build instructions</a>.
+CMake build is supported.<BR>
<h2 id="platforms">Supported Platforms</h2>
ThreadSanitizer is supported on Linux x86_64 (tested on Ubuntu 10.04). <BR>
@@ -49,8 +48,8 @@ Support for 32-bit platforms is problematic and not yet planned.
<h2 id="usage">Usage</h2>
-Simply compile your program with <tt>-fthread-sanitizer -fPIE</tt> and link it
-with <tt>-fthread-sanitizer -pie</tt>.<BR>
+Simply compile your program with <tt>-fsanitize=thread -fPIE</tt> and link it
+with <tt>-fsanitize=thread -pie</tt>.<BR>
To get a reasonable performance add <tt>-O1</tt> or higher. <BR>
Use <tt>-g</tt> to get file names and line numbers in the warning messages. <BR>
@@ -73,7 +72,7 @@ int main() {
</pre>
<pre>
-% clang -fthread-sanitizer -g -O1 tiny_race.c -fPIE -pie
+% clang -fsanitize=thread -g -O1 tiny_race.c -fPIE -pie
</pre>
If a bug is detected, the program will print an error message to stderr.
@@ -111,7 +110,9 @@ This means that tools like <tt>ulimit</tt> may not work as usually expected.
ThreadSanitizer is in alpha stage.
It is known to work on large C++ programs using pthreads, but we do not promise
anything (yet). <BR>
-C++11 threading is not yet supported.
+C++11 threading is not yet supported. <BR>
+The test suite is integrated into CMake build and can be run with
+<tt>make check-tsan</tt> command. <BR>
We are actively working on enhancing the tool -- stay tuned.
Any help, especially in the form of minimized standalone tests is more than welcome.
OpenPOWER on IntegriCloud