LLVM 24.0.0git
ThreadSanitizer.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "tsan"

Functions

 STATISTIC (NumInstrumentedReads, "Number of instrumented reads")
 STATISTIC (NumInstrumentedWrites, "Number of instrumented writes")
 STATISTIC (NumOmittedReadsBeforeWrite, "Number of reads ignored due to following writes")
 STATISTIC (NumAccessesWithBadSize, "Number of accesses with bad size")
 STATISTIC (NumInstrumentedVtableWrites, "Number of vtable ptr writes")
 STATISTIC (NumInstrumentedVtableReads, "Number of vtable ptr reads")
 STATISTIC (NumOmittedReadsFromConstantGlobals, "Number of reads from constant globals")
 STATISTIC (NumOmittedReadsFromVtable, "Number of vtable reads")
 STATISTIC (NumOmittedNonCaptured, "Number of accesses ignored due to capturing")
static bool isVtableAccess (Instruction *I)
static bool shouldInstrumentReadWriteFromAddress (const Module *M, Value *Addr)
static bool isTsanAtomic (const Instruction *I)
static ConstantInt * createOrdering (IRBuilder<> *IRB, AtomicOrdering ord)

Variables

const char kTsanModuleCtorName [] = "tsan.module_ctor"
const char kTsanInitName [] = "__tsan_init"

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "tsan"

Definition at line 51 of file ThreadSanitizer.cpp.

Function Documentation

◆ createOrdering()

◆ isTsanAtomic()

bool isTsanAtomic ( const Instruction * I)
static

◆ isVtableAccess()

bool isVtableAccess ( Instruction * I)
static

Definition at line 318 of file ThreadSanitizer.cpp.

References I.

◆ shouldInstrumentReadWriteFromAddress()

◆ STATISTIC() [1/9]

STATISTIC ( NumAccessesWithBadSize ,
"Number of accesses with bad size"  )

◆ STATISTIC() [2/9]

STATISTIC ( NumInstrumentedReads ,
"Number of instrumented reads"  )

◆ STATISTIC() [3/9]

STATISTIC ( NumInstrumentedVtableReads ,
"Number of vtable ptr reads"  )

◆ STATISTIC() [4/9]

STATISTIC ( NumInstrumentedVtableWrites ,
"Number of vtable ptr writes"  )

◆ STATISTIC() [5/9]

STATISTIC ( NumInstrumentedWrites ,
"Number of instrumented writes"  )

◆ STATISTIC() [6/9]

STATISTIC ( NumOmittedNonCaptured ,
"Number of accesses ignored due to capturing"  )

◆ STATISTIC() [7/9]

STATISTIC ( NumOmittedReadsBeforeWrite ,
"Number of reads ignored due to following writes"  )

◆ STATISTIC() [8/9]

STATISTIC ( NumOmittedReadsFromConstantGlobals ,
"Number of reads from constant globals"  )

◆ STATISTIC() [9/9]

STATISTIC ( NumOmittedReadsFromVtable ,
"Number of vtable reads"  )

Variable Documentation

◆ kTsanInitName

const char kTsanInitName[] = "__tsan_init"

Definition at line 66 of file ThreadSanitizer.cpp.

◆ kTsanModuleCtorName

const char kTsanModuleCtorName[] = "tsan.module_ctor"

Definition at line 65 of file ThreadSanitizer.cpp.