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