suricata
|
#include "util-cpu.h"
Go to the source code of this file.
Data Structures | |
struct | ProfilingLock_ |
Macros | |
#define | PROFILING_MAX_LOCKS 64 |
#define | SCMutexLock_profile(mut) |
#define | SCMutex pthread_mutex_t |
#define | SCMutexAttr pthread_mutexattr_t |
#define | SCMutexInit(mut, mutattr) pthread_mutex_init(mut, mutattr) |
#define | SCMutexLock(mut) SCMutexLock_profile(mut) |
#define | SCMutexTrylock(mut) pthread_mutex_trylock(mut) |
#define | SCMutexUnlock(mut) pthread_mutex_unlock(mut) |
#define | SCMutexDestroy pthread_mutex_destroy |
#define | SCMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER |
#define | SCCondT pthread_cond_t |
#define | SCCondInit pthread_cond_init |
#define | SCCondSignal pthread_cond_signal |
#define | SCCondDestroy pthread_cond_destroy |
#define | SCCondWait(cond, mut) pthread_cond_wait(cond, mut) |
#define | SCSpinLock_profile(spin) |
#define | SCSpinlock pthread_spinlock_t |
#define | SCSpinLock(mut) SCSpinLock_profile(mut) |
#define | SCSpinTrylock(spin) pthread_spin_trylock(spin) |
#define | SCSpinUnlock(spin) pthread_spin_unlock(spin) |
#define | SCSpinInit(spin, spin_attr) pthread_spin_init(spin, spin_attr) |
#define | SCSpinDestroy(spin) pthread_spin_destroy(spin) |
#define | SCRWLockWRLock_profile(mut) |
#define | SCRWLockRDLock_profile(mut) |
#define | SCRWLock pthread_rwlock_t |
#define | SCRWLockInit(rwl, rwlattr) pthread_rwlock_init(rwl, rwlattr) |
#define | SCRWLockWRLock(mut) SCRWLockWRLock_profile(mut) |
#define | SCRWLockRDLock(mut) SCRWLockRDLock_profile(mut) |
#define | SCRWLockTryWRLock(rwl) pthread_rwlock_trywrlock(rwl) |
#define | SCRWLockTryRDLock(rwl) pthread_rwlock_tryrdlock(rwl) |
#define | SCRWLockUnlock(rwl) pthread_rwlock_unlock(rwl) |
#define | SCRWLockDestroy pthread_rwlock_destroy |
#define | SCCtrlMutex pthread_mutex_t |
#define | SCCtrlMutexAttr pthread_mutexattr_t |
#define | SCCtrlMutexInit(mut, mutattr) pthread_mutex_init(mut, mutattr) |
#define | SCCtrlMutexLock(mut) pthread_mutex_lock(mut) |
#define | SCCtrlMutexTrylock(mut) pthread_mutex_trylock(mut) |
#define | SCCtrlMutexUnlock(mut) pthread_mutex_unlock(mut) |
#define | SCCtrlMutexDestroy pthread_mutex_destroy |
#define | SCCtrlCondT pthread_cond_t |
#define | SCCtrlCondInit pthread_cond_init |
#define | SCCtrlCondSignal pthread_cond_signal |
#define | SCCtrlCondTimedwait pthread_cond_timedwait |
#define | SCCtrlCondWait pthread_cond_wait |
#define | SCCtrlCondDestroy pthread_cond_destroy |
Typedefs | |
typedef struct ProfilingLock_ | ProfilingLock |
Enumerations | |
enum | { LOCK_MUTEX, LOCK_SPIN, LOCK_RWW, LOCK_RWR } |
Variables | |
thread_local ProfilingLock | locks [PROFILING_MAX_LOCKS] |
thread_local int | locks_idx |
thread_local int | record_locks |
thread_local uint64_t | mutex_lock_contention |
thread_local uint64_t | mutex_lock_wait_ticks |
thread_local uint64_t | mutex_lock_cnt |
thread_local uint64_t | spin_lock_contention |
thread_local uint64_t | spin_lock_wait_ticks |
thread_local uint64_t | spin_lock_cnt |
thread_local uint64_t | rww_lock_contention |
thread_local uint64_t | rww_lock_wait_ticks |
thread_local uint64_t | rww_lock_cnt |
thread_local uint64_t | rwr_lock_contention |
thread_local uint64_t | rwr_lock_wait_ticks |
thread_local uint64_t | rwr_lock_cnt |
Lock profiling wrappers
Definition in file threads-profile.h.
#define PROFILING_MAX_LOCKS 64 |
Definition at line 33 of file threads-profile.h.
#define SCCondDestroy pthread_cond_destroy |
Definition at line 103 of file threads-profile.h.
#define SCCondInit pthread_cond_init |
Definition at line 101 of file threads-profile.h.
#define SCCondSignal pthread_cond_signal |
Definition at line 102 of file threads-profile.h.
#define SCCondT pthread_cond_t |
Definition at line 100 of file threads-profile.h.
Definition at line 104 of file threads-profile.h.
#define SCCtrlCondDestroy pthread_cond_destroy |
Definition at line 229 of file threads-profile.h.
#define SCCtrlCondInit pthread_cond_init |
Definition at line 225 of file threads-profile.h.
#define SCCtrlCondSignal pthread_cond_signal |
Definition at line 226 of file threads-profile.h.
#define SCCtrlCondT pthread_cond_t |
Definition at line 224 of file threads-profile.h.
#define SCCtrlCondTimedwait pthread_cond_timedwait |
Definition at line 227 of file threads-profile.h.
#define SCCtrlCondWait pthread_cond_wait |
Definition at line 228 of file threads-profile.h.
#define SCCtrlMutex pthread_mutex_t |
Definition at line 215 of file threads-profile.h.
#define SCCtrlMutexAttr pthread_mutexattr_t |
Definition at line 216 of file threads-profile.h.
#define SCCtrlMutexDestroy pthread_mutex_destroy |
Definition at line 221 of file threads-profile.h.
#define SCCtrlMutexInit | ( | mut, | |
mutattr | |||
) | pthread_mutex_init(mut, mutattr) |
Definition at line 217 of file threads-profile.h.
#define SCCtrlMutexLock | ( | mut | ) | pthread_mutex_lock(mut) |
Definition at line 218 of file threads-profile.h.
#define SCCtrlMutexTrylock | ( | mut | ) | pthread_mutex_trylock(mut) |
Definition at line 219 of file threads-profile.h.
#define SCCtrlMutexUnlock | ( | mut | ) | pthread_mutex_unlock(mut) |
Definition at line 220 of file threads-profile.h.
#define SCMutex pthread_mutex_t |
Definition at line 89 of file threads-profile.h.
#define SCMUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER |
Definition at line 96 of file threads-profile.h.
#define SCMutexAttr pthread_mutexattr_t |
Definition at line 90 of file threads-profile.h.
#define SCMutexDestroy pthread_mutex_destroy |
Definition at line 95 of file threads-profile.h.
#define SCMutexInit | ( | mut, | |
mutattr | |||
) | pthread_mutex_init(mut, mutattr) |
Definition at line 91 of file threads-profile.h.
#define SCMutexLock | ( | mut | ) | SCMutexLock_profile(mut) |
Definition at line 92 of file threads-profile.h.
#define SCMutexLock_profile | ( | mut | ) |
Definition at line 64 of file threads-profile.h.
#define SCMutexTrylock | ( | mut | ) | pthread_mutex_trylock(mut) |
Definition at line 93 of file threads-profile.h.
#define SCMutexUnlock | ( | mut | ) | pthread_mutex_unlock(mut) |
Definition at line 94 of file threads-profile.h.
#define SCRWLock pthread_rwlock_t |
Definition at line 205 of file threads-profile.h.
#define SCRWLockDestroy pthread_rwlock_destroy |
Definition at line 212 of file threads-profile.h.
#define SCRWLockInit | ( | rwl, | |
rwlattr | |||
) | pthread_rwlock_init(rwl, rwlattr) |
Definition at line 206 of file threads-profile.h.
#define SCRWLockRDLock | ( | mut | ) | SCRWLockRDLock_profile(mut) |
Definition at line 208 of file threads-profile.h.
#define SCRWLockRDLock_profile | ( | mut | ) |
Definition at line 180 of file threads-profile.h.
#define SCRWLockTryRDLock | ( | rwl | ) | pthread_rwlock_tryrdlock(rwl) |
Definition at line 210 of file threads-profile.h.
#define SCRWLockTryWRLock | ( | rwl | ) | pthread_rwlock_trywrlock(rwl) |
Definition at line 209 of file threads-profile.h.
#define SCRWLockUnlock | ( | rwl | ) | pthread_rwlock_unlock(rwl) |
Definition at line 211 of file threads-profile.h.
#define SCRWLockWRLock | ( | mut | ) | SCRWLockWRLock_profile(mut) |
Definition at line 207 of file threads-profile.h.
#define SCRWLockWRLock_profile | ( | mut | ) |
Definition at line 151 of file threads-profile.h.
#define SCSpinDestroy | ( | spin | ) | pthread_spin_destroy(spin) |
Definition at line 143 of file threads-profile.h.
#define SCSpinInit | ( | spin, | |
spin_attr | |||
) | pthread_spin_init(spin, spin_attr) |
Definition at line 142 of file threads-profile.h.
#define SCSpinlock pthread_spinlock_t |
Definition at line 138 of file threads-profile.h.
#define SCSpinLock | ( | mut | ) | SCSpinLock_profile(mut) |
Definition at line 139 of file threads-profile.h.
#define SCSpinLock_profile | ( | spin | ) |
Definition at line 113 of file threads-profile.h.
#define SCSpinTrylock | ( | spin | ) | pthread_spin_trylock(spin) |
Definition at line 140 of file threads-profile.h.
#define SCSpinUnlock | ( | spin | ) | pthread_spin_unlock(spin) |
Definition at line 141 of file threads-profile.h.
typedef struct ProfilingLock_ ProfilingLock |
anonymous enum |
Enumerator | |
---|---|
LOCK_MUTEX | |
LOCK_SPIN | |
LOCK_RWW | rwlock, writer |
LOCK_RWR | rwlock, reader |
Definition at line 36 of file threads-profile.h.
thread_local ProfilingLock locks[PROFILING_MAX_LOCKS] |
thread_local int locks_idx |
thread_local uint64_t mutex_lock_cnt |
thread_local uint64_t mutex_lock_contention |
thread_local uint64_t mutex_lock_wait_ticks |
thread_local int record_locks |
thread_local uint64_t rwr_lock_cnt |
thread_local uint64_t rwr_lock_contention |
thread_local uint64_t rwr_lock_wait_ticks |
thread_local uint64_t rww_lock_cnt |
thread_local uint64_t rww_lock_contention |
thread_local uint64_t rww_lock_wait_ticks |
thread_local uint64_t spin_lock_cnt |
thread_local uint64_t spin_lock_contention |
thread_local uint64_t spin_lock_wait_ticks |