summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-04 20:37:31 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-15 03:54:02 -0500
commit28c6781a3215a36d61126818c3e64c99c2344350 (patch)
tree9c1122799e470b93667d2e8f8202b89d33edcb6d /docs
parent748490d2ff51d6c6fa44aad587908b271c801fa9 (diff)
downloadhaskell-28c6781a3215a36d61126818c3e64c99c2344350.tar.gz
codeGen: Introduce ThreadSanitizer instrumentation
This introduces a new Cmm pass which instruments the program with ThreadSanitizer annotations, allowing full tracking of mutator memory accesses via TSAN.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/debugging.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/users_guide/debugging.rst b/docs/users_guide/debugging.rst
index 1448662698..e9d61e3834 100644
--- a/docs/users_guide/debugging.rst
+++ b/docs/users_guide/debugging.rst
@@ -551,6 +551,13 @@ These flags dump various phases of GHC's C-\\- pipeline.
Dump the results of the C-\\- control flow optimisation pass.
+.. ghc-flag:: -ddump-cmm-thread-sanitizer
+ :shortdesc: Dump the results of the C-\\- ThreadSanitizer elaboration pass.
+ :type: dynamic
+
+ Dump the results of the C-\\- pass responsible for adding instrumentation
+ added by :ghc-flag:`-fcmm-thread-sanitizer`.
+
.. ghc-flag:: -ddump-cmm-cbe
:shortdesc: Dump the results of common block elimination
:type: dynamic
@@ -1075,6 +1082,15 @@ Checking for consistency
Note that this is only intended to be used as a debugging measure, not as
the primary means of catching out-of-bounds accesses.
+.. ghc-flag:: -fcmm-thread-sanitizer
+ :shortdesc: Enable ThreadSanitizer instrumentation of memory accesses.
+ :type: dynamic
+
+ This enables generation of `ThreadSanitizer
+ <https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual>`
+ instrumentation of memory accesses. Requires use of ``-fsanitize=thread``
+ or similar when compiling and linking.
+
.. _checking-determinism:
Checking for determinism