aboutsummaryrefslogtreecommitdiff
path: root/lib/tsan/rtl/tsan_flags.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsan/rtl/tsan_flags.h')
-rw-r--r--lib/tsan/rtl/tsan_flags.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/tsan/rtl/tsan_flags.h b/lib/tsan/rtl/tsan_flags.h
index aaacd98a6223..3916df3cc9e1 100644
--- a/lib/tsan/rtl/tsan_flags.h
+++ b/lib/tsan/rtl/tsan_flags.h
@@ -20,9 +20,11 @@
// header may be included in the user code, and shouldn't include
// other headers from TSan or common sanitizer runtime.
+#include "sanitizer_common/sanitizer_flags.h"
+
namespace __tsan {
-struct Flags {
+struct Flags : CommonFlags {
// Enable dynamic annotations, otherwise they are no-ops.
bool enable_annotations;
// Supress a race report if we've already output another race report
@@ -48,8 +50,6 @@ struct Flags {
// If set, all atomics are effectively sequentially consistent (seq_cst),
// regardless of what user actually specified.
bool force_seq_cst_atomics;
- // Strip that prefix from file paths in reports.
- const char *strip_path_prefix;
// Suppressions filename.
const char *suppressions;
// Print matched suppressions at exit.
@@ -58,27 +58,24 @@ struct Flags {
bool print_benign;
// Override exit status if something was reported.
int exitcode;
- // Write logs to "log_path.pid".
- // The special values are "stdout" and "stderr".
- // The default is "stderr".
- const char *log_path;
+ // Exit after first reported error.
+ bool halt_on_error;
// Sleep in main thread before exiting for that many ms
// (useful to catch "at exit" races).
int atexit_sleep_ms;
- // Verbosity level (0 - silent, 1 - a bit of output, 2+ - more output).
- int verbosity;
// If set, periodically write memory profile to that file.
const char *profile_memory;
// Flush shadow memory every X ms.
int flush_memory_ms;
// Flush symbolizer caches every X ms.
int flush_symbolizer_ms;
+ // Resident memory limit in MB to aim at.
+ // If the process consumes more memory, then TSan will flush shadow memory.
+ int memory_limit_mb;
// Stops on start until __tsan_resume() is called (for debugging).
bool stop_on_start;
// Controls whether RunningOnValgrind() returns true or false.
bool running_on_valgrind;
- // Path to external symbolizer.
- const char *external_symbolizer_path;
// Per-thread history size, controls how many previous memory accesses
// are remembered per thread. Possible values are [0..7].
// history_size=0 amounts to 32K memory accesses. Each next value doubles