23#ifndef PFS_EVENTS_WAITS_H
24#define PFS_EVENTS_WAITS_H
114#define STATE_FLAG_TIMED (1 << 0)
116#define STATE_FLAG_THREAD (1 << 1)
118#define STATE_FLAG_EVENT (1 << 2)
120#define STATE_FLAG_DIGEST (1 << 3)
122#define STATE_FLAG_CPU (1 << 4)
124#define STATE_FLAG_BASE (1 << 5)
Some integer typedefs for easier portability.
uint32_t uint32
Definition: my_inttypes.h:66
char * user
Definition: mysqladmin.cc:64
const char * host
Definition: mysqladmin.cc:63
static int wait(mysql_cond_t *that, mysql_mutex_t *mutex_arg, const char *, unsigned int)
Definition: mysql_cond_v1_native.cc:62
Data types for columns used in the performance schema tables (declarations)
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:221
enum_operation_type
Enum values for the various OPERATION columns.
Definition: pfs_column_types.h:124
Events data structures (declarations).
void reset_table_lock_waits_by_table()
Definition: pfs_events_waits.cc:256
bool flag_events_waits_current
Consumer flag for table EVENTS_WAITS_CURRENT.
Definition: pfs_events_waits.cc:46
void reset_events_waits_by_thread()
Reset table EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME data.
Definition: pfs_events_waits.cc:203
void reset_events_waits_global()
void reset_table_lock_waits_by_table_handle()
Definition: pfs_events_waits.cc:280
ulong events_waits_history_long_size
Definition: pfs_events_waits.cc:44
bool flag_global_instrumentation
Consumer flag for the global instrumentation.
Definition: pfs_events_waits.cc:52
void reset_events_waits_by_account()
Reset table EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data.
Definition: pfs_events_waits.cc:214
void reset_table_waits_by_table_handle()
Definition: pfs_events_waits.cc:264
void reset_events_waits_history()
Reset table EVENTS_WAITS_HISTORY data.
Definition: pfs_events_waits.cc:179
bool flag_events_waits_history_long
Consumer flag for table EVENTS_WAITS_HISTORY_LONG.
Definition: pfs_events_waits.cc:50
void reset_events_waits_current()
Reset table EVENTS_WAITS_CURRENT data.
Definition: pfs_events_waits.cc:163
PFS_cacheline_atomic_uint32 events_waits_history_long_index
Index in EVENTS_WAITS_HISTORY_LONG circular buffer.
Definition: pfs_events_waits.cc:59
void insert_events_waits_history(PFS_thread *thread, PFS_events_waits *wait)
Insert a wait record in table EVENTS_WAITS_HISTORY.
Definition: pfs_events_waits.cc:108
void aggregate_account_waits(PFS_account *account)
bool flag_thread_instrumentation
Consumer flag for the per thread instrumentation.
Definition: pfs_events_waits.cc:54
void reset_table_io_waits_by_table()
Definition: pfs_events_waits.cc:248
void aggregate_host_waits(PFS_host *host)
void reset_events_waits_history_long()
Reset table EVENTS_WAITS_HISTORY_LONG data.
Definition: pfs_events_waits.cc:184
void insert_events_waits_history_long(PFS_events_waits *wait)
Insert a wait record in table EVENTS_WAITS_HISTORY_LONG.
Definition: pfs_events_waits.cc:137
int init_events_waits_history_long(uint events_waits_history_long_sizing)
Initialize table EVENTS_WAITS_HISTORY_LONG.
Definition: pfs_events_waits.cc:67
void cleanup_events_waits_history_long()
Cleanup table EVENTS_WAITS_HISTORY_LONG.
Definition: pfs_events_waits.cc:90
bool events_waits_history_long_full
True if EVENTS_WAITS_HISTORY_LONG circular buffer is full.
Definition: pfs_events_waits.cc:57
void aggregate_user_waits(PFS_user *user)
void reset_events_waits_by_host()
Reset table EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME data.
Definition: pfs_events_waits.cc:232
PFS_events_waits * events_waits_history_long_array
EVENTS_WAITS_HISTORY_LONG circular buffer.
Definition: pfs_events_waits.cc:61
void reset_table_waits_by_table()
Definition: pfs_events_waits.cc:240
events_waits_class
Class of a wait event.
Definition: pfs_events_waits.h:55
@ WAIT_CLASS_MUTEX
Definition: pfs_events_waits.h:57
@ NO_WAIT_CLASS
Definition: pfs_events_waits.h:56
@ WAIT_CLASS_FILE
Definition: pfs_events_waits.h:61
@ WAIT_CLASS_COND
Definition: pfs_events_waits.h:59
@ WAIT_CLASS_SOCKET
Definition: pfs_events_waits.h:62
@ WAIT_CLASS_METADATA
Definition: pfs_events_waits.h:64
@ WAIT_CLASS_TABLE
Definition: pfs_events_waits.h:60
@ WAIT_CLASS_IDLE
Definition: pfs_events_waits.h:63
@ WAIT_CLASS_RWLOCK
Definition: pfs_events_waits.h:58
void reset_events_waits_by_user()
Reset table EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME data.
Definition: pfs_events_waits.cc:223
void reset_table_io_waits_by_table_handle()
Definition: pfs_events_waits.cc:272
bool flag_events_waits_history
Consumer flag for table EVENTS_WAITS_HISTORY.
Definition: pfs_events_waits.cc:48
Miscellaneous global dependencies (declarations).
Performance schema internal locks (declarations).
Per account statistics.
Definition: pfs_account.h:66
An atomic uint32 variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:76
Instrumented condition implementation.
Definition: pfs_instr.h:161
A wait event record.
Definition: pfs_events_waits.h:68
uint32 m_weak_version
For weak pointers, target object version.
Definition: pfs_events_waits.h:92
size_t m_number_of_bytes
Number of bytes/rows read/written.
Definition: pfs_events_waits.h:103
PFS_table_share * m_weak_table_share
Table share, for table operations only.
Definition: pfs_events_waits.h:84
PFS_socket * m_weak_socket
Socket, for socket operations only.
Definition: pfs_events_waits.h:88
PFS_file * m_weak_file
File, for file operations only.
Definition: pfs_events_waits.h:86
events_waits_class m_wait_class
The type of wait.
Definition: pfs_events_waits.h:80
enum_operation_type m_operation
Operation performed.
Definition: pfs_events_waits.h:96
ulong m_flags
Flags.
Definition: pfs_events_waits.h:110
uint m_index
Index used.
Definition: pfs_events_waits.h:108
enum_object_type m_object_type
Object type.
Definition: pfs_events_waits.h:82
PFS_metadata_lock * m_weak_metadata_lock
Metadata lock, for MDL operations only.
Definition: pfs_events_waits.h:90
const void * m_object_instance_addr
Address in memory of the object instance waited on.
Definition: pfs_events_waits.h:94
An event record.
Definition: pfs_events.h:37
Instrumented File and FILE implementation.
Definition: pfs_instr.h:178
Per host statistics.
Definition: pfs_host.h:63
Information for all instrumentation.
Definition: pfs_instr_class.h:211
Instrumented mutex implementation.
Definition: pfs_instr.h:102
Instrumented rwlock implementation.
Definition: pfs_instr.h:128
Instrumented socket implementation.
Definition: pfs_instr.h:288
Instrumentation metadata for a table share.
Definition: pfs_instr_class.h:453
Instrumented table implementation.
Definition: pfs_instr.h:194
Instrumented thread implementation.
Definition: pfs_instr.h:374
Per user statistics.
Definition: pfs_user.h:62