MySQL 9.0.0
Source Code Documentation
pfs_events_waits.h File Reference

Events waits data structures (declarations). More...

#include <sys/types.h>
#include <atomic>
#include "my_inttypes.h"
#include "storage/perfschema/pfs_column_types.h"
#include "storage/perfschema/pfs_events.h"
#include "storage/perfschema/pfs_global.h"
#include "storage/perfschema/pfs_lock.h"

Go to the source code of this file.

Classes

struct  PFS_events_waits
 A wait event record. More...
 

Macros

#define STATE_FLAG_TIMED   (1 << 0)
 TIMED bit in the state flags bitfield. More...
 
#define STATE_FLAG_THREAD   (1 << 1)
 THREAD bit in the state flags bitfield. More...
 
#define STATE_FLAG_EVENT   (1 << 2)
 EVENT bit in the state flags bitfield. More...
 
#define STATE_FLAG_DIGEST   (1 << 3)
 DIGEST bit in the state flags bitfield. More...
 
#define STATE_FLAG_CPU   (1 << 4)
 CPU bit in the state flags bitfield. More...
 
#define STATE_FLAG_BASE   (1 << 5)
 BASE bit in the state flags bitfield. More...
 

Enumerations

enum  events_waits_class {
  NO_WAIT_CLASS = 0 , WAIT_CLASS_MUTEX , WAIT_CLASS_RWLOCK , WAIT_CLASS_COND ,
  WAIT_CLASS_TABLE , WAIT_CLASS_FILE , WAIT_CLASS_SOCKET , WAIT_CLASS_IDLE ,
  WAIT_CLASS_METADATA
}
 Class of a wait event. More...
 

Functions

void insert_events_waits_history (PFS_thread *thread, PFS_events_waits *wait)
 Insert a wait record in table EVENTS_WAITS_HISTORY. More...
 
void insert_events_waits_history_long (PFS_events_waits *wait)
 Insert a wait record in table EVENTS_WAITS_HISTORY_LONG. More...
 
int init_events_waits_history_long (uint events_waits_history_long_sizing)
 Initialize table EVENTS_WAITS_HISTORY_LONG. More...
 
void cleanup_events_waits_history_long ()
 Cleanup table EVENTS_WAITS_HISTORY_LONG. More...
 
void reset_events_waits_current ()
 Reset table EVENTS_WAITS_CURRENT data. More...
 
void reset_events_waits_history ()
 Reset table EVENTS_WAITS_HISTORY data. More...
 
void reset_events_waits_history_long ()
 Reset table EVENTS_WAITS_HISTORY_LONG data. More...
 
void reset_events_waits_by_thread ()
 Reset table EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME data. More...
 
void reset_events_waits_by_account ()
 Reset table EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data. More...
 
void reset_events_waits_by_user ()
 Reset table EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME data. More...
 
void reset_events_waits_by_host ()
 Reset table EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME data. More...
 
void reset_events_waits_global ()
 
void aggregate_account_waits (PFS_account *account)
 
void aggregate_user_waits (PFS_user *user)
 
void aggregate_host_waits (PFS_host *host)
 
void reset_table_waits_by_table ()
 
void reset_table_io_waits_by_table ()
 
void reset_table_lock_waits_by_table ()
 
void reset_table_waits_by_table_handle ()
 
void reset_table_io_waits_by_table_handle ()
 
void reset_table_lock_waits_by_table_handle ()
 

Variables

bool flag_events_waits_current
 Consumer flag for table EVENTS_WAITS_CURRENT. More...
 
bool flag_events_waits_history
 Consumer flag for table EVENTS_WAITS_HISTORY. More...
 
bool flag_events_waits_history_long
 Consumer flag for table EVENTS_WAITS_HISTORY_LONG. More...
 
bool flag_global_instrumentation
 Consumer flag for the global instrumentation. More...
 
bool flag_thread_instrumentation
 Consumer flag for the per thread instrumentation. More...
 
bool events_waits_history_long_full
 True if EVENTS_WAITS_HISTORY_LONG circular buffer is full. More...
 
PFS_cacheline_atomic_uint32 events_waits_history_long_index
 Index in EVENTS_WAITS_HISTORY_LONG circular buffer. More...
 
PFS_events_waitsevents_waits_history_long_array
 EVENTS_WAITS_HISTORY_LONG circular buffer. More...
 
ulong events_waits_history_long_size
 

Detailed Description

Events waits data structures (declarations).

Macro Definition Documentation

◆ STATE_FLAG_BASE

#define STATE_FLAG_BASE   (1 << 5)

BASE bit in the state flags bitfield.

◆ STATE_FLAG_CPU

#define STATE_FLAG_CPU   (1 << 4)

CPU bit in the state flags bitfield.

◆ STATE_FLAG_DIGEST

#define STATE_FLAG_DIGEST   (1 << 3)

DIGEST bit in the state flags bitfield.

◆ STATE_FLAG_EVENT

#define STATE_FLAG_EVENT   (1 << 2)

EVENT bit in the state flags bitfield.

◆ STATE_FLAG_THREAD

#define STATE_FLAG_THREAD   (1 << 1)

THREAD bit in the state flags bitfield.

◆ STATE_FLAG_TIMED

#define STATE_FLAG_TIMED   (1 << 0)

TIMED bit in the state flags bitfield.

Enumeration Type Documentation

◆ events_waits_class

Class of a wait event.

Enumerator
NO_WAIT_CLASS 
WAIT_CLASS_MUTEX 
WAIT_CLASS_RWLOCK 
WAIT_CLASS_COND 
WAIT_CLASS_TABLE 
WAIT_CLASS_FILE 
WAIT_CLASS_SOCKET 
WAIT_CLASS_IDLE 
WAIT_CLASS_METADATA 

Function Documentation

◆ aggregate_account_waits()

void aggregate_account_waits ( PFS_account account)

◆ aggregate_host_waits()

void aggregate_host_waits ( PFS_host host)

◆ aggregate_user_waits()

void aggregate_user_waits ( PFS_user user)

◆ cleanup_events_waits_history_long()

void cleanup_events_waits_history_long ( )

Cleanup table EVENTS_WAITS_HISTORY_LONG.

◆ init_events_waits_history_long()

int init_events_waits_history_long ( uint  events_waits_history_long_sizing)

Initialize table EVENTS_WAITS_HISTORY_LONG.

Parameters
events_waits_history_long_sizingtable sizing

◆ insert_events_waits_history()

void insert_events_waits_history ( PFS_thread thread,
PFS_events_waits wait 
)

Insert a wait record in table EVENTS_WAITS_HISTORY.

Parameters
threadthread that executed the wait
waitrecord to insert

◆ insert_events_waits_history_long()

void insert_events_waits_history_long ( PFS_events_waits wait)

Insert a wait record in table EVENTS_WAITS_HISTORY_LONG.

Parameters
waitrecord to insert

◆ reset_events_waits_by_account()

void reset_events_waits_by_account ( )

Reset table EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data.

◆ reset_events_waits_by_host()

void reset_events_waits_by_host ( )

Reset table EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME data.

◆ reset_events_waits_by_thread()

void reset_events_waits_by_thread ( )

Reset table EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME data.

◆ reset_events_waits_by_user()

void reset_events_waits_by_user ( )

Reset table EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME data.

◆ reset_events_waits_current()

void reset_events_waits_current ( )

Reset table EVENTS_WAITS_CURRENT data.

◆ reset_events_waits_global()

void reset_events_waits_global ( )

◆ reset_events_waits_history()

void reset_events_waits_history ( )

Reset table EVENTS_WAITS_HISTORY data.

◆ reset_events_waits_history_long()

void reset_events_waits_history_long ( )

Reset table EVENTS_WAITS_HISTORY_LONG data.

◆ reset_table_io_waits_by_table()

void reset_table_io_waits_by_table ( )

◆ reset_table_io_waits_by_table_handle()

void reset_table_io_waits_by_table_handle ( )

◆ reset_table_lock_waits_by_table()

void reset_table_lock_waits_by_table ( )

◆ reset_table_lock_waits_by_table_handle()

void reset_table_lock_waits_by_table_handle ( )

◆ reset_table_waits_by_table()

void reset_table_waits_by_table ( )

◆ reset_table_waits_by_table_handle()

void reset_table_waits_by_table_handle ( )

Variable Documentation

◆ events_waits_history_long_array

PFS_events_waits* events_waits_history_long_array
extern

EVENTS_WAITS_HISTORY_LONG circular buffer.

◆ events_waits_history_long_full

bool events_waits_history_long_full
extern

True if EVENTS_WAITS_HISTORY_LONG circular buffer is full.

◆ events_waits_history_long_index

PFS_cacheline_atomic_uint32 events_waits_history_long_index
extern

Index in EVENTS_WAITS_HISTORY_LONG circular buffer.

◆ events_waits_history_long_size

ulong events_waits_history_long_size
extern

◆ flag_events_waits_current

bool flag_events_waits_current
extern

Consumer flag for table EVENTS_WAITS_CURRENT.

◆ flag_events_waits_history

bool flag_events_waits_history
extern

Consumer flag for table EVENTS_WAITS_HISTORY.

◆ flag_events_waits_history_long

bool flag_events_waits_history_long
extern

Consumer flag for table EVENTS_WAITS_HISTORY_LONG.

◆ flag_global_instrumentation

bool flag_global_instrumentation
extern

Consumer flag for the global instrumentation.

◆ flag_thread_instrumentation

bool flag_thread_instrumentation
extern

Consumer flag for the per thread instrumentation.