Build scripts, workloads, and result-processing tools for evaluating ThreadSanitizer (TSan) and analysis-based instrumentation optimizations. The experiments measure runtime, memory use, compilation time, and instrumentation counts across several applications.
The compiler implementation is maintained in focs-lab/llvm-project. This repository contains the experiment harness and application-specific setup.
Related research: Instrumentation Optimization for Practical Dynamic Race Detection, to appear at ATC 2026.
-
Choose the workload and compiler revision for the experiment you want to reproduce. These scripts evolve alongside the compiler; record both commits.
-
Build the patched LLVM/Clang toolchain with the required TSan optimization flags. A stock Clang build does not provide these flags.
-
Set the compiler build directory explicitly:
export LLVM_TSAN_ROOT=/absolute/path/to/patched/llvm/build source tools/tsan_compiler.sh
Run this from the repository root. The helper checks the toolchain and exports
TSAN_CC,TSAN_CXX, andTSAN_OPT. -
Follow the workload's preparation, build, run, and analysis scripts below. Check their path settings and prerequisites before launching a full campaign. Many scripts expect to run from their own workload directory.
| Workload | Entry points |
|---|---|
| SQLite | Prepare sources, build one configuration, run it, analyse results |
| MySQL | Build, benchmark launcher guide |
| Redis | Build scripts, benchmark scripts |
| Memcached | Build, benchmark |
| ClickHouse | Build and benchmark scripts |
| FFmpeg | Build, benchmark configurations, input provenance |
| Chromium | Build configurations, run benchmarks |
Shared tools provide compiler selection, build metadata, trace processing, and result analysis. TSan tests and unit tests provide additional checks.
config_definitions.sh maps configuration names to compiler flags. Some workloads also have their own configuration files.
orig: baseline without TSan instrumentation.tsan: baseline TSan instrumentation.tsan-*: individual optimizations or experimental combinations. Read the corresponding flags and comments before comparing results.
Keep the compiler and harness revisions, compiler flags, workload version, inputs, thread count, and machine configuration with each result. Preserve build metadata and raw logs so that measurements can be traced back to the exact experiment.
For setup questions or missing reproduction details, please open an issue.