1*7c3d14c8STreehugger Robot //===-- tsan_stat.h ---------------------------------------------*- C++ -*-===// 2*7c3d14c8STreehugger Robot // 3*7c3d14c8STreehugger Robot // The LLVM Compiler Infrastructure 4*7c3d14c8STreehugger Robot // 5*7c3d14c8STreehugger Robot // This file is distributed under the University of Illinois Open Source 6*7c3d14c8STreehugger Robot // License. See LICENSE.TXT for details. 7*7c3d14c8STreehugger Robot // 8*7c3d14c8STreehugger Robot //===----------------------------------------------------------------------===// 9*7c3d14c8STreehugger Robot // 10*7c3d14c8STreehugger Robot // This file is a part of ThreadSanitizer (TSan), a race detector. 11*7c3d14c8STreehugger Robot // 12*7c3d14c8STreehugger Robot //===----------------------------------------------------------------------===// 13*7c3d14c8STreehugger Robot 14*7c3d14c8STreehugger Robot #ifndef TSAN_STAT_H 15*7c3d14c8STreehugger Robot #define TSAN_STAT_H 16*7c3d14c8STreehugger Robot 17*7c3d14c8STreehugger Robot namespace __tsan { 18*7c3d14c8STreehugger Robot 19*7c3d14c8STreehugger Robot enum StatType { 20*7c3d14c8STreehugger Robot // Memory access processing related stuff. 21*7c3d14c8STreehugger Robot StatMop, 22*7c3d14c8STreehugger Robot StatMopRead, 23*7c3d14c8STreehugger Robot StatMopWrite, 24*7c3d14c8STreehugger Robot StatMop1, // These must be consequtive. 25*7c3d14c8STreehugger Robot StatMop2, 26*7c3d14c8STreehugger Robot StatMop4, 27*7c3d14c8STreehugger Robot StatMop8, 28*7c3d14c8STreehugger Robot StatMopSame, 29*7c3d14c8STreehugger Robot StatMopIgnored, 30*7c3d14c8STreehugger Robot StatMopRange, 31*7c3d14c8STreehugger Robot StatMopRodata, 32*7c3d14c8STreehugger Robot StatMopRangeRodata, 33*7c3d14c8STreehugger Robot StatShadowProcessed, 34*7c3d14c8STreehugger Robot StatShadowZero, 35*7c3d14c8STreehugger Robot StatShadowNonZero, // Derived. 36*7c3d14c8STreehugger Robot StatShadowSameSize, 37*7c3d14c8STreehugger Robot StatShadowIntersect, 38*7c3d14c8STreehugger Robot StatShadowNotIntersect, 39*7c3d14c8STreehugger Robot StatShadowSameThread, 40*7c3d14c8STreehugger Robot StatShadowAnotherThread, 41*7c3d14c8STreehugger Robot StatShadowReplace, 42*7c3d14c8STreehugger Robot 43*7c3d14c8STreehugger Robot // Func processing. 44*7c3d14c8STreehugger Robot StatFuncEnter, 45*7c3d14c8STreehugger Robot StatFuncExit, 46*7c3d14c8STreehugger Robot 47*7c3d14c8STreehugger Robot // Trace processing. 48*7c3d14c8STreehugger Robot StatEvents, 49*7c3d14c8STreehugger Robot 50*7c3d14c8STreehugger Robot // Threads. 51*7c3d14c8STreehugger Robot StatThreadCreate, 52*7c3d14c8STreehugger Robot StatThreadFinish, 53*7c3d14c8STreehugger Robot StatThreadReuse, 54*7c3d14c8STreehugger Robot StatThreadMaxTid, 55*7c3d14c8STreehugger Robot StatThreadMaxAlive, 56*7c3d14c8STreehugger Robot 57*7c3d14c8STreehugger Robot // Mutexes. 58*7c3d14c8STreehugger Robot StatMutexCreate, 59*7c3d14c8STreehugger Robot StatMutexDestroy, 60*7c3d14c8STreehugger Robot StatMutexLock, 61*7c3d14c8STreehugger Robot StatMutexUnlock, 62*7c3d14c8STreehugger Robot StatMutexRecLock, 63*7c3d14c8STreehugger Robot StatMutexRecUnlock, 64*7c3d14c8STreehugger Robot StatMutexReadLock, 65*7c3d14c8STreehugger Robot StatMutexReadUnlock, 66*7c3d14c8STreehugger Robot 67*7c3d14c8STreehugger Robot // Synchronization. 68*7c3d14c8STreehugger Robot StatSyncCreated, 69*7c3d14c8STreehugger Robot StatSyncDestroyed, 70*7c3d14c8STreehugger Robot StatSyncAcquire, 71*7c3d14c8STreehugger Robot StatSyncRelease, 72*7c3d14c8STreehugger Robot 73*7c3d14c8STreehugger Robot // Clocks - acquire. 74*7c3d14c8STreehugger Robot StatClockAcquire, 75*7c3d14c8STreehugger Robot StatClockAcquireEmpty, 76*7c3d14c8STreehugger Robot StatClockAcquireFastRelease, 77*7c3d14c8STreehugger Robot StatClockAcquireLarge, 78*7c3d14c8STreehugger Robot StatClockAcquireRepeat, 79*7c3d14c8STreehugger Robot StatClockAcquireFull, 80*7c3d14c8STreehugger Robot StatClockAcquiredSomething, 81*7c3d14c8STreehugger Robot // Clocks - release. 82*7c3d14c8STreehugger Robot StatClockRelease, 83*7c3d14c8STreehugger Robot StatClockReleaseResize, 84*7c3d14c8STreehugger Robot StatClockReleaseFast1, 85*7c3d14c8STreehugger Robot StatClockReleaseFast2, 86*7c3d14c8STreehugger Robot StatClockReleaseSlow, 87*7c3d14c8STreehugger Robot StatClockReleaseFull, 88*7c3d14c8STreehugger Robot StatClockReleaseAcquired, 89*7c3d14c8STreehugger Robot StatClockReleaseClearTail, 90*7c3d14c8STreehugger Robot // Clocks - release store. 91*7c3d14c8STreehugger Robot StatClockStore, 92*7c3d14c8STreehugger Robot StatClockStoreResize, 93*7c3d14c8STreehugger Robot StatClockStoreFast, 94*7c3d14c8STreehugger Robot StatClockStoreFull, 95*7c3d14c8STreehugger Robot StatClockStoreTail, 96*7c3d14c8STreehugger Robot // Clocks - acquire-release. 97*7c3d14c8STreehugger Robot StatClockAcquireRelease, 98*7c3d14c8STreehugger Robot 99*7c3d14c8STreehugger Robot // Atomics. 100*7c3d14c8STreehugger Robot StatAtomic, 101*7c3d14c8STreehugger Robot StatAtomicLoad, 102*7c3d14c8STreehugger Robot StatAtomicStore, 103*7c3d14c8STreehugger Robot StatAtomicExchange, 104*7c3d14c8STreehugger Robot StatAtomicFetchAdd, 105*7c3d14c8STreehugger Robot StatAtomicFetchSub, 106*7c3d14c8STreehugger Robot StatAtomicFetchAnd, 107*7c3d14c8STreehugger Robot StatAtomicFetchOr, 108*7c3d14c8STreehugger Robot StatAtomicFetchXor, 109*7c3d14c8STreehugger Robot StatAtomicFetchNand, 110*7c3d14c8STreehugger Robot StatAtomicCAS, 111*7c3d14c8STreehugger Robot StatAtomicFence, 112*7c3d14c8STreehugger Robot StatAtomicRelaxed, 113*7c3d14c8STreehugger Robot StatAtomicConsume, 114*7c3d14c8STreehugger Robot StatAtomicAcquire, 115*7c3d14c8STreehugger Robot StatAtomicRelease, 116*7c3d14c8STreehugger Robot StatAtomicAcq_Rel, 117*7c3d14c8STreehugger Robot StatAtomicSeq_Cst, 118*7c3d14c8STreehugger Robot StatAtomic1, 119*7c3d14c8STreehugger Robot StatAtomic2, 120*7c3d14c8STreehugger Robot StatAtomic4, 121*7c3d14c8STreehugger Robot StatAtomic8, 122*7c3d14c8STreehugger Robot StatAtomic16, 123*7c3d14c8STreehugger Robot 124*7c3d14c8STreehugger Robot // Dynamic annotations. 125*7c3d14c8STreehugger Robot StatAnnotation, 126*7c3d14c8STreehugger Robot StatAnnotateHappensBefore, 127*7c3d14c8STreehugger Robot StatAnnotateHappensAfter, 128*7c3d14c8STreehugger Robot StatAnnotateCondVarSignal, 129*7c3d14c8STreehugger Robot StatAnnotateCondVarSignalAll, 130*7c3d14c8STreehugger Robot StatAnnotateMutexIsNotPHB, 131*7c3d14c8STreehugger Robot StatAnnotateCondVarWait, 132*7c3d14c8STreehugger Robot StatAnnotateRWLockCreate, 133*7c3d14c8STreehugger Robot StatAnnotateRWLockCreateStatic, 134*7c3d14c8STreehugger Robot StatAnnotateRWLockDestroy, 135*7c3d14c8STreehugger Robot StatAnnotateRWLockAcquired, 136*7c3d14c8STreehugger Robot StatAnnotateRWLockReleased, 137*7c3d14c8STreehugger Robot StatAnnotateTraceMemory, 138*7c3d14c8STreehugger Robot StatAnnotateFlushState, 139*7c3d14c8STreehugger Robot StatAnnotateNewMemory, 140*7c3d14c8STreehugger Robot StatAnnotateNoOp, 141*7c3d14c8STreehugger Robot StatAnnotateFlushExpectedRaces, 142*7c3d14c8STreehugger Robot StatAnnotateEnableRaceDetection, 143*7c3d14c8STreehugger Robot StatAnnotateMutexIsUsedAsCondVar, 144*7c3d14c8STreehugger Robot StatAnnotatePCQGet, 145*7c3d14c8STreehugger Robot StatAnnotatePCQPut, 146*7c3d14c8STreehugger Robot StatAnnotatePCQDestroy, 147*7c3d14c8STreehugger Robot StatAnnotatePCQCreate, 148*7c3d14c8STreehugger Robot StatAnnotateExpectRace, 149*7c3d14c8STreehugger Robot StatAnnotateBenignRaceSized, 150*7c3d14c8STreehugger Robot StatAnnotateBenignRace, 151*7c3d14c8STreehugger Robot StatAnnotateIgnoreReadsBegin, 152*7c3d14c8STreehugger Robot StatAnnotateIgnoreReadsEnd, 153*7c3d14c8STreehugger Robot StatAnnotateIgnoreWritesBegin, 154*7c3d14c8STreehugger Robot StatAnnotateIgnoreWritesEnd, 155*7c3d14c8STreehugger Robot StatAnnotateIgnoreSyncBegin, 156*7c3d14c8STreehugger Robot StatAnnotateIgnoreSyncEnd, 157*7c3d14c8STreehugger Robot StatAnnotatePublishMemoryRange, 158*7c3d14c8STreehugger Robot StatAnnotateUnpublishMemoryRange, 159*7c3d14c8STreehugger Robot StatAnnotateThreadName, 160*7c3d14c8STreehugger Robot 161*7c3d14c8STreehugger Robot // Internal mutex contentionz. 162*7c3d14c8STreehugger Robot StatMtxTotal, 163*7c3d14c8STreehugger Robot StatMtxTrace, 164*7c3d14c8STreehugger Robot StatMtxThreads, 165*7c3d14c8STreehugger Robot StatMtxReport, 166*7c3d14c8STreehugger Robot StatMtxSyncVar, 167*7c3d14c8STreehugger Robot StatMtxSyncTab, 168*7c3d14c8STreehugger Robot StatMtxSlab, 169*7c3d14c8STreehugger Robot StatMtxAnnotations, 170*7c3d14c8STreehugger Robot StatMtxAtExit, 171*7c3d14c8STreehugger Robot StatMtxMBlock, 172*7c3d14c8STreehugger Robot StatMtxDeadlockDetector, 173*7c3d14c8STreehugger Robot StatMtxFired, 174*7c3d14c8STreehugger Robot StatMtxRacy, 175*7c3d14c8STreehugger Robot StatMtxFD, 176*7c3d14c8STreehugger Robot StatMtxGlobalProc, 177*7c3d14c8STreehugger Robot 178*7c3d14c8STreehugger Robot // This must be the last. 179*7c3d14c8STreehugger Robot StatCnt 180*7c3d14c8STreehugger Robot }; 181*7c3d14c8STreehugger Robot 182*7c3d14c8STreehugger Robot } // namespace __tsan 183*7c3d14c8STreehugger Robot 184*7c3d14c8STreehugger Robot #endif // TSAN_STAT_H 185