How can I make thread sanitizer "more accurate"?
Asked Answered
H

1

6

According to the thread-sanitizer docs:

ThreadSanitizer uses more real memory than a native run. At the default settings the memory overhead is 5x plus 1Mb per each thread. Settings with 3x (less accurate analysis) and 9x (more accurate analysis) overhead are also available.

How can I choose these settings? Couldn't find the command line arguments for them.

Holey answered 8/1, 2019 at 9:44 Comment(0)
T
0

The setting you are looking for is described on the page about thread sanitizer flags: https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags. It is the history_size option, which by default is set to 2, but can take values from 0..7.

The history size indicates how many memory accesses are stored - the more, the more accurate the analysis gets. See some background about the workings of thread sanitizer: https://github.com/google/sanitizers/wiki/ThreadSanitizerAlgorithm

Tracitracie answered 7/3 at 7:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.