3c6331c29f
Merged from revision b638b63b99d66786cb37336292604a2ae3490cfd. The patch successfully bootstraps on x86_64-linux-gnu and ppc64le-linux-gnu. I also tested ppc64-linux-gnu that exposed: https://reviews.llvm.org/D80864 (which is fixed on master). Abidiff looks happy and I made UBSAN and ASAN bootstrap on x86_64-linux-gnu. I'm planning to do merge from master twice a year, once now and next time short before stage1 closes. I am going to install the patches as merge from master is obvious and I haven't made anything special. libsanitizer/ChangeLog: * MERGE: Merge from master.
192 lines
4.2 KiB
C++
192 lines
4.2 KiB
C++
//===-- tsan_stat.h ---------------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is a part of ThreadSanitizer (TSan), a race detector.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef TSAN_STAT_H
|
|
#define TSAN_STAT_H
|
|
|
|
namespace __tsan {
|
|
|
|
enum StatType {
|
|
// Memory access processing related stuff.
|
|
StatMop,
|
|
StatMopRead,
|
|
StatMopWrite,
|
|
StatMop1, // These must be consequtive.
|
|
StatMop2,
|
|
StatMop4,
|
|
StatMop8,
|
|
StatMopSame,
|
|
StatMopIgnored,
|
|
StatMopRange,
|
|
StatMopRodata,
|
|
StatMopRangeRodata,
|
|
StatShadowProcessed,
|
|
StatShadowZero,
|
|
StatShadowNonZero, // Derived.
|
|
StatShadowSameSize,
|
|
StatShadowIntersect,
|
|
StatShadowNotIntersect,
|
|
StatShadowSameThread,
|
|
StatShadowAnotherThread,
|
|
StatShadowReplace,
|
|
|
|
// Func processing.
|
|
StatFuncEnter,
|
|
StatFuncExit,
|
|
|
|
// Trace processing.
|
|
StatEvents,
|
|
|
|
// Threads.
|
|
StatThreadCreate,
|
|
StatThreadFinish,
|
|
StatThreadReuse,
|
|
StatThreadMaxTid,
|
|
StatThreadMaxAlive,
|
|
|
|
// Mutexes.
|
|
StatMutexCreate,
|
|
StatMutexDestroy,
|
|
StatMutexLock,
|
|
StatMutexUnlock,
|
|
StatMutexRecLock,
|
|
StatMutexRecUnlock,
|
|
StatMutexReadLock,
|
|
StatMutexReadUnlock,
|
|
|
|
// Synchronization.
|
|
StatSyncCreated,
|
|
StatSyncDestroyed,
|
|
StatSyncAcquire,
|
|
StatSyncRelease,
|
|
StatSyncReleaseStoreAcquire,
|
|
|
|
// Clocks - acquire.
|
|
StatClockAcquire,
|
|
StatClockAcquireEmpty,
|
|
StatClockAcquireFastRelease,
|
|
StatClockAcquireFull,
|
|
StatClockAcquiredSomething,
|
|
// Clocks - release.
|
|
StatClockRelease,
|
|
StatClockReleaseResize,
|
|
StatClockReleaseFast,
|
|
StatClockReleaseSlow,
|
|
StatClockReleaseFull,
|
|
StatClockReleaseAcquired,
|
|
StatClockReleaseClearTail,
|
|
// Clocks - release store.
|
|
StatClockStore,
|
|
StatClockStoreResize,
|
|
StatClockStoreFast,
|
|
StatClockStoreFull,
|
|
StatClockStoreTail,
|
|
// Clocks - acquire-release.
|
|
StatClockAcquireRelease,
|
|
|
|
// Atomics.
|
|
StatAtomic,
|
|
StatAtomicLoad,
|
|
StatAtomicStore,
|
|
StatAtomicExchange,
|
|
StatAtomicFetchAdd,
|
|
StatAtomicFetchSub,
|
|
StatAtomicFetchAnd,
|
|
StatAtomicFetchOr,
|
|
StatAtomicFetchXor,
|
|
StatAtomicFetchNand,
|
|
StatAtomicCAS,
|
|
StatAtomicFence,
|
|
StatAtomicRelaxed,
|
|
StatAtomicConsume,
|
|
StatAtomicAcquire,
|
|
StatAtomicRelease,
|
|
StatAtomicAcq_Rel,
|
|
StatAtomicSeq_Cst,
|
|
StatAtomic1,
|
|
StatAtomic2,
|
|
StatAtomic4,
|
|
StatAtomic8,
|
|
StatAtomic16,
|
|
|
|
// Dynamic annotations.
|
|
StatAnnotation,
|
|
StatAnnotateHappensBefore,
|
|
StatAnnotateHappensAfter,
|
|
StatAnnotateCondVarSignal,
|
|
StatAnnotateCondVarSignalAll,
|
|
StatAnnotateMutexIsNotPHB,
|
|
StatAnnotateCondVarWait,
|
|
StatAnnotateRWLockCreate,
|
|
StatAnnotateRWLockCreateStatic,
|
|
StatAnnotateRWLockDestroy,
|
|
StatAnnotateRWLockAcquired,
|
|
StatAnnotateRWLockReleased,
|
|
StatAnnotateTraceMemory,
|
|
StatAnnotateFlushState,
|
|
StatAnnotateNewMemory,
|
|
StatAnnotateNoOp,
|
|
StatAnnotateFlushExpectedRaces,
|
|
StatAnnotateEnableRaceDetection,
|
|
StatAnnotateMutexIsUsedAsCondVar,
|
|
StatAnnotatePCQGet,
|
|
StatAnnotatePCQPut,
|
|
StatAnnotatePCQDestroy,
|
|
StatAnnotatePCQCreate,
|
|
StatAnnotateExpectRace,
|
|
StatAnnotateBenignRaceSized,
|
|
StatAnnotateBenignRace,
|
|
StatAnnotateIgnoreReadsBegin,
|
|
StatAnnotateIgnoreReadsEnd,
|
|
StatAnnotateIgnoreWritesBegin,
|
|
StatAnnotateIgnoreWritesEnd,
|
|
StatAnnotateIgnoreSyncBegin,
|
|
StatAnnotateIgnoreSyncEnd,
|
|
StatAnnotatePublishMemoryRange,
|
|
StatAnnotateUnpublishMemoryRange,
|
|
StatAnnotateThreadName,
|
|
Stat__tsan_mutex_create,
|
|
Stat__tsan_mutex_destroy,
|
|
Stat__tsan_mutex_pre_lock,
|
|
Stat__tsan_mutex_post_lock,
|
|
Stat__tsan_mutex_pre_unlock,
|
|
Stat__tsan_mutex_post_unlock,
|
|
Stat__tsan_mutex_pre_signal,
|
|
Stat__tsan_mutex_post_signal,
|
|
Stat__tsan_mutex_pre_divert,
|
|
Stat__tsan_mutex_post_divert,
|
|
|
|
// Internal mutex contentionz.
|
|
StatMtxTotal,
|
|
StatMtxTrace,
|
|
StatMtxThreads,
|
|
StatMtxReport,
|
|
StatMtxSyncVar,
|
|
StatMtxSyncTab,
|
|
StatMtxSlab,
|
|
StatMtxAnnotations,
|
|
StatMtxAtExit,
|
|
StatMtxMBlock,
|
|
StatMtxDeadlockDetector,
|
|
StatMtxFired,
|
|
StatMtxRacy,
|
|
StatMtxFD,
|
|
StatMtxGlobalProc,
|
|
|
|
// This must be the last.
|
|
StatCnt
|
|
};
|
|
|
|
} // namespace __tsan
|
|
|
|
#endif // TSAN_STAT_H
|