tsan_stat.h 3.9 KB

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