MySQL 9.0.0
Source Code Documentation
pfs.cc File Reference

The performance schema implementation of all instruments. More...

#include "storage/perfschema/pfs.h"
#include "my_config.h"
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <mysql/components/component_implementation.h>
#include <mysql/components/service.h>
#include <mysql/components/service_implementation.h>
#include <mysql/components/services/mysql_server_telemetry_metrics_service.h>
#include <mysql/components/services/mysql_server_telemetry_traces_service.h>
#include <mysql/components/services/pfs_notification.h>
#include <mysql/components/services/psi_cond_service.h>
#include <mysql/components/services/psi_error_service.h>
#include <mysql/components/services/psi_file_service.h>
#include <mysql/components/services/psi_idle_service.h>
#include <mysql/components/services/psi_mdl_service.h>
#include <mysql/components/services/psi_memory_service.h>
#include <mysql/components/services/psi_metric_service.h>
#include <mysql/components/services/psi_mutex_service.h>
#include <mysql/components/services/psi_rwlock_service.h>
#include <mysql/components/services/psi_socket_service.h>
#include <mysql/components/services/psi_stage_service.h>
#include <mysql/components/services/psi_statement_service.h>
#include <mysql/components/services/psi_system_service.h>
#include <mysql/components/services/psi_table_service.h>
#include <mysql/components/services/psi_thread_service.h>
#include <mysql/components/services/psi_tls_channel_service.h>
#include <mysql/components/services/psi_transaction_service.h>
#include <sys/types.h>
#include <time.h>
#include "lex_string.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_io.h"
#include "my_macros.h"
#include "my_thread.h"
#include "mysql/psi/mysql_memory.h"
#include "mysql/psi/mysql_thread.h"
#include "mysql/psi/psi_metric.h"
#include "mysql/strings/m_ctype.h"
#include "pfs_error_provider.h"
#include "pfs_file_provider.h"
#include "pfs_idle_provider.h"
#include "pfs_memory_provider.h"
#include "pfs_metadata_provider.h"
#include "pfs_metric_provider.h"
#include "pfs_socket_provider.h"
#include "pfs_stage_provider.h"
#include "pfs_statement_provider.h"
#include "pfs_system_provider.h"
#include "pfs_table_provider.h"
#include "pfs_thread_provider.h"
#include "pfs_transaction_provider.h"
#include "sql/mdl.h"
#include "sql/sp_head.h"
#include "sql/sql_const.h"
#include "sql/sql_digest.h"
#include "sql/sql_error.h"
#include "storage/perfschema/mysql_server_telemetry_traces_service_imp.h"
#include "storage/perfschema/pfs_account.h"
#include "storage/perfschema/pfs_column_values.h"
#include "storage/perfschema/pfs_data_lock.h"
#include "storage/perfschema/pfs_digest.h"
#include "storage/perfschema/pfs_error.h"
#include "storage/perfschema/pfs_events_stages.h"
#include "storage/perfschema/pfs_events_statements.h"
#include "storage/perfschema/pfs_events_transactions.h"
#include "storage/perfschema/pfs_events_waits.h"
#include "storage/perfschema/pfs_global.h"
#include "storage/perfschema/pfs_host.h"
#include "storage/perfschema/pfs_instr.h"
#include "storage/perfschema/pfs_instr_class.h"
#include "storage/perfschema/pfs_metrics_service_imp.h"
#include "storage/perfschema/pfs_plugin_table.h"
#include "storage/perfschema/pfs_prepared_stmt.h"
#include "storage/perfschema/pfs_program.h"
#include "storage/perfschema/pfs_services.h"
#include "storage/perfschema/pfs_setup_actor.h"
#include "storage/perfschema/pfs_setup_object.h"
#include "storage/perfschema/pfs_timer.h"
#include "storage/perfschema/pfs_tls_channel.h"
#include "storage/perfschema/pfs_user.h"
#include "storage/perfschema/service_pfs_notification.h"
#include "thr_lock.h"

Classes

struct  PFS_spawn_thread_arg
 Arguments given from a parent to a child thread, packaged in one structure. More...
 

Macros

#define HAVE_PSI_COND_INTERFACE
 
#define HAVE_PSI_DATA_LOCK_INTERFACE
 
#define HAVE_PSI_ERROR_INTERFACE
 
#define HAVE_PSI_FILE_INTERFACE
 
#define HAVE_PSI_IDLE_INTERFACE
 
#define HAVE_PSI_MEMORY_INTERFACE
 
#define HAVE_PSI_METADATA_INTERFACE
 
#define HAVE_PSI_MUTEX_INTERFACE
 
#define HAVE_PSI_PS_INTERFACE
 
#define HAVE_PSI_RWLOCK_INTERFACE
 
#define HAVE_PSI_SOCKET_INTERFACE
 
#define HAVE_PSI_SP_INTERFACE
 
#define HAVE_PSI_STAGE_INTERFACE
 
#define HAVE_PSI_STATEMENT_DIGEST_INTERFACE
 
#define HAVE_PSI_STATEMENT_INTERFACE
 
#define HAVE_PSI_SYSTEM_INTERFACE
 
#define HAVE_PSI_TABLE_INTERFACE
 
#define HAVE_PSI_THREAD_INTERFACE
 
#define HAVE_PSI_TRANSACTION_INTERFACE
 
#define HAVE_PSI_TLS_CHANNEL_INTERFACE
 
#define HAVE_PSI_2
 
#define DISABLE_PSI_COND
 Compiling option to disable the cond instrumentation. More...
 
#define DISABLE_PSI_DATA_LOCK
 Compiling option to disable the data lock instrumentation. More...
 
#define DISABLE_PSI_ERROR
 Compiling option to disable the error instrumentation. More...
 
#define DISABLE_PSI_FILE
 Compiling option to disable the file instrumentation. More...
 
#define DISABLE_PSI_IDLE
 Compiling option to disable the idle instrumentation. More...
 
#define DISABLE_PSI_MEMORY
 Compiling option to disable the memory instrumentation. More...
 
#define DISABLE_PSI_METADATA
 Compiling option to disable the metadata instrumentation. More...
 
#define DISABLE_PSI_METRICS
 Compiling option to disable MySQL Server Telemetry metrics instrumentation. More...
 
#define DISABLE_PSI_MUTEX
 Compiling option to disable the mutex instrumentation. More...
 
#define DISABLE_PSI_PS
 Compiling option to disable the prepared statement instrumentation. More...
 
#define DISABLE_PSI_RWLOCK
 Compiling option to disable the rwlock instrumentation. More...
 
#define DISABLE_PSI_SOCKET
 Compiling option to disable the statement instrumentation. More...
 
#define DISABLE_PSI_SP
 Compiling option to disable the stored program instrumentation. More...
 
#define DISABLE_PSI_STAGE
 Compiling option to disable the stage instrumentation. More...
 
#define DISABLE_PSI_STATEMENT
 Compiling option to disable the statement instrumentation. More...
 
#define DISABLE_PSI_STATEMENT_DIGEST
 Compiling option to disable the statement digest instrumentation. More...
 
#define DISABLE_PSI_SYSTEM
 Compiling option to disable the system instrumentation. More...
 
#define DISABLE_PSI_TABLE
 Compiling option to disable the table instrumentation. More...
 
#define DISABLE_PSI_THREAD
 Compiling option to disable the thread instrumentation. More...
 
#define DISABLE_PSI_TRANSACTION
 Compiling option to disable the transaction instrumentation. More...
 
#define DISABLE_PSI_TLS_CHANNEL
 Compiling option to disable TLS Channel instrumentation. More...
 
#define DISABLE_PSI_SERVER_TELEMETRY_TRACES
 Compiling option to disable MySQL Server Telemetry traces instrumentation. More...
 
#define DEBUG_TRACE_MEMORY(P1, P2, P3, P4)
 
#define REGISTER_BODY_V1(KEY_T, PREFIX, REGISTER_FUNC)
 
#define SET_STATEMENT_ATTR_BODY(LOCKER, ATTR, VALUE)
 
#define INC_STATEMENT_ATTR_BODY(LOCKER, ATTR, VALUE)
 
#define INC_TRANSACTION_ATTR_BODY(LOCKER, ATTR, VALUE)
 
#define REFERENCES_SERVICE(component, service)    const_cast<void *>((const void *)&SERVICE_IMPLEMENTATION(component, service))
 

Functions

static void adjust_collect_flags (PSI_statement_locker_state *state)
 Recompute collection flags. More...
 
static PFS_threadmy_thread_get_THR_PFS ()
 
void record_main_thread_id ()
 
static void pfs_thread_setname (PFS_thread *pfs)
 
static void my_thread_set_THR_PFS (PFS_thread *pfs)
 
static int build_prefix (const LEX_CSTRING *prefix, const char *category, char *output, size_t *output_length)
 Build the prefix name of a class of instruments in a category. More...
 
void pfs_register_mutex_v1 (const char *category, PSI_mutex_info_v1 *info, int count)
 Implementation of the mutex instrumentation interface. More...
 
void pfs_register_rwlock_v2 (const char *category, PSI_rwlock_info_v1 *info, int count)
 Implementation of the rwlock instrumentation interface. More...
 
void pfs_register_cond_v1 (const char *category, PSI_cond_info_v1 *info, int count)
 Implementation of the cond instrumentation interface. More...
 
void pfs_register_thread_vc (const char *category, PSI_thread_info *info, int count)
 Implementation of the thread instrumentation interface. More...
 
void pfs_register_thread_v1 (const char *category, PSI_thread_info_v1 *info, int count)
 Implementation of the thread instrumentation interface. More...
 
void pfs_register_file_vc (const char *category, PSI_file_info_v1 *info, int count)
 Implementation of the file instrumentation interface. More...
 
void pfs_register_stage_v1 (const char *category, PSI_stage_info_v1 **info_array, int count)
 
void pfs_register_statement_vc (const char *category, PSI_statement_info *info, int count)
 
void pfs_register_socket_v1 (const char *category, PSI_socket_info_v1 *info, int count)
 
PSI_mutexpfs_init_mutex_v1 (PSI_mutex_key key, const void *identity)
 Implementation of the mutex instrumentation interface. More...
 
void pfs_destroy_mutex_v1 (PSI_mutex *mutex)
 Implementation of the mutex instrumentation interface. More...
 
PSI_rwlockpfs_init_rwlock_v2 (PSI_rwlock_key key, const void *identity)
 Implementation of the rwlock instrumentation interface. More...
 
void pfs_destroy_rwlock_v2 (PSI_rwlock *rwlock)
 Implementation of the rwlock instrumentation interface. More...
 
PSI_condpfs_init_cond_v1 (PSI_cond_key key, const void *identity)
 Implementation of the cond instrumentation interface. More...
 
void pfs_destroy_cond_v1 (PSI_cond *cond)
 Implementation of the cond instrumentation interface. More...
 
PSI_table_sharepfs_get_table_share_v1 (bool temporary, TABLE_SHARE *share)
 Implementation of the table instrumentation interface. More...
 
void pfs_release_table_share_v1 (PSI_table_share *share)
 Implementation of the table instrumentation interface. More...
 
void pfs_drop_table_share_v1 (bool temporary, const char *schema_name, int schema_name_length, const char *table_name, int table_name_length)
 Implementation of the table instrumentation interface. More...
 
PSI_tablepfs_open_table_v1 (PSI_table_share *share, const void *identity)
 Implementation of the table instrumentation interface. More...
 
void pfs_unbind_table_v1 (PSI_table *table)
 Implementation of the table instrumentation interface. More...
 
PSI_tablepfs_rebind_table_v1 (PSI_table_share *share, const void *identity, PSI_table *table)
 Implementation of the table instrumentation interface. More...
 
void pfs_close_table_v1 (TABLE_SHARE *server_share, PSI_table *table)
 Implementation of the table instrumentation interface. More...
 
PSI_socketpfs_init_socket_v1 (PSI_socket_key key, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len)
 
void pfs_destroy_socket_v1 (PSI_socket *socket)
 
void pfs_create_file_vc (PSI_file_key key, const char *name, File file)
 Implementation of the file instrumentation interface. More...
 
static void * pfs_spawn_thread (void *arg)
 
int pfs_spawn_thread_vc (PSI_thread_key key, PSI_thread_seqnum seqnum, my_thread_handle *thread, const my_thread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 Implementation of the thread instrumentation interface. More...
 
int pfs_spawn_thread_v4 (PSI_thread_key key, my_thread_handle *thread, const my_thread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 
PSI_threadpfs_new_thread_vc (PSI_thread_key key, PSI_thread_seqnum seqnum, const void *identity, ulonglong processlist_id)
 Implementation of the thread instrumentation interface. More...
 
PSI_threadpfs_new_thread_v4 (PSI_thread_key key, const void *identity, ulonglong processlist_id)
 
void pfs_set_thread_id_vc (PSI_thread *thread, ulonglong processlist_id)
 Implementation of the thread instrumentation interface. More...
 
ulonglong pfs_get_current_thread_internal_id_vc ()
 Implementation of the thread instrumentation interface. More...
 
ulonglong pfs_get_thread_internal_id_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
PSI_threadpfs_get_thread_by_id_vc (ulonglong processlist_id)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_THD_vc (PSI_thread *thread, THD *thd)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_mem_cnt_THD_vc (THD *thd, THD **backup_thd)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_os_id_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
PSI_threadpfs_get_thread_vc ()
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_user_vc (const char *user, int user_len)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_account_vc (const char *user, int user_len, const char *host, int host_len)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_db_vc (const char *db, int db_len)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_command_vc (int command)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_connection_type_vc (opaque_vio_type conn_type)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_start_time_vc (time_t start_time)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_state_v1 (const char *)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_info_vc (const char *info, uint info_len)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_secondary_engine_vc (bool secondary)
 Implementation of the thread instrumentation interface. More...
 
int set_thread_resource_group (PFS_thread *pfs, const char *group_name, int group_name_len, void *user_data)
 Set the resource group name for a given thread. More...
 
int pfs_set_thread_resource_group_vc (const char *group_name, int group_name_len, void *user_data)
 Implementation of the thread instrumentation interface. More...
 
int pfs_set_thread_resource_group_by_id_vc (PSI_thread *thread, ulonglong thread_id, const char *group_name, int group_name_len, void *user_data)
 Implementation of the thread instrumentation interface. More...
 
void pfs_get_thread_system_attrs (PFS_thread *pfs, PSI_thread_attrs *thread_attrs)
 
int get_thread_attributes (PFS_thread *pfs, bool current_thread, PSI_thread_attrs *thread_attrs)
 Get the system and session attributes for a given PFS_thread. More...
 
int pfs_get_thread_system_attrs_vc (PSI_thread_attrs *thread_attrs)
 Implementation of the thread instrumentation interface. More...
 
int pfs_get_thread_system_attrs_by_id_vc (PSI_thread *thread, ulonglong thread_id, PSI_thread_attrs *thread_attrs)
 Implementation of the thread instrumentation interface. More...
 
int pfs_register_notification_vc (const PSI_notification *callbacks, bool with_ref_count)
 Implementation of the thread instrumentation interface. More...
 
int pfs_unregister_notification_vc (int handle)
 Implementation of the thread instrumentation interface. More...
 
void pfs_notify_session_connect_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_notify_session_disconnect_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_notify_session_change_user_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_set_thread_peer_port_vc (PSI_thread *thread, uint port)
 Implementation of the thread instrumentation interface. More...
 
void pfs_aggregate_thread_status_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_delete_current_thread_vc ()
 Implementation of the thread instrumentation interface. More...
 
void pfs_delete_thread_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_detect_telemetry_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
void pfs_abort_telemetry_vc (PSI_thread *thread)
 Implementation of the thread instrumentation interface. More...
 
PSI_mutex_lockerpfs_start_mutex_wait_v1 (PSI_mutex_locker_state *state, PSI_mutex *mutex, PSI_mutex_operation op, const char *src_file, uint src_line)
 Implementation of the mutex instrumentation interface. More...
 
static PSI_rwlock_lockerpfs_start_rwlock_wait_v2 (PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line)
 Implementation of the rwlock instrumentation interface. More...
 
PSI_rwlock_lockerpfs_start_rwlock_rdwait_v2 (PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line)
 
PSI_rwlock_lockerpfs_start_rwlock_wrwait_v2 (PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line)
 
PSI_cond_lockerpfs_start_cond_wait_v1 (PSI_cond_locker_state *state, PSI_cond *cond, PSI_mutex *mutex, PSI_cond_operation op, const char *src_file, uint src_line)
 Implementation of the cond instrumentation interface. More...
 
static PFS_TL_LOCK_TYPE lock_flags_to_lock_type (uint flags)
 
static PFS_TL_LOCK_TYPE external_lock_flags_to_lock_type (uint flags)
 
PSI_table_lockerpfs_start_table_io_wait_v1 (PSI_table_locker_state *state, PSI_table *table, PSI_table_io_operation op, uint index, const char *src_file, uint src_line)
 Implementation of the table instrumentation interface. More...
 
PSI_table_lockerpfs_start_table_lock_wait_v1 (PSI_table_locker_state *state, PSI_table *table, PSI_table_lock_operation op, ulong op_flags, const char *src_file, uint src_line)
 Implementation of the table instrumentation interface. More...
 
PSI_file_lockerpfs_get_thread_file_name_locker_vc (PSI_file_locker_state *state, PSI_file_key key, PSI_file_operation op, const char *name, const void *)
 Implementation of the file instrumentation interface. More...
 
PSI_file_lockerpfs_get_thread_file_stream_locker_vc (PSI_file_locker_state *state, PSI_file *file, PSI_file_operation op)
 Implementation of the file instrumentation interface. More...
 
PSI_file_lockerpfs_get_thread_file_descriptor_locker_vc (PSI_file_locker_state *state, File file, PSI_file_operation op)
 Implementation of the file instrumentation interface. More...
 
PSI_socket_lockerpfs_start_socket_wait_v1 (PSI_socket_locker_state *state, PSI_socket *socket, PSI_socket_operation op, size_t count, const char *src_file, uint src_line)
 Socket locker. More...
 
void pfs_unlock_mutex_v1 (PSI_mutex *mutex)
 Implementation of the mutex instrumentation interface. More...
 
void pfs_unlock_rwlock_v2 (PSI_rwlock *rwlock, PSI_rwlock_operation op)
 Implementation of the rwlock instrumentation interface. More...
 
void pfs_signal_cond_v1 (PSI_cond *cond)
 Implementation of the cond instrumentation interface. More...
 
void pfs_broadcast_cond_v1 (PSI_cond *cond)
 Implementation of the cond instrumentation interface. More...
 
PSI_idle_lockerpfs_start_idle_wait_v1 (PSI_idle_locker_state *state, const char *src_file, uint src_line)
 Implementation of the idle instrumentation interface. More...
 
void pfs_end_idle_wait_v1 (PSI_idle_locker *locker)
 Implementation of the mutex instrumentation interface. More...
 
void pfs_end_mutex_wait_v1 (PSI_mutex_locker *locker, int rc)
 Implementation of the mutex instrumentation interface. More...
 
void pfs_end_rwlock_rdwait_v2 (PSI_rwlock_locker *locker, int rc)
 Implementation of the rwlock instrumentation interface. More...
 
void pfs_end_rwlock_wrwait_v2 (PSI_rwlock_locker *locker, int rc)
 Implementation of the rwlock instrumentation interface. More...
 
void pfs_end_cond_wait_v1 (PSI_cond_locker *locker, int)
 Implementation of the cond instrumentation interface. More...
 
void pfs_end_table_io_wait_v1 (PSI_table_locker *locker, ulonglong numrows)
 Implementation of the table instrumentation interface. More...
 
void pfs_end_table_lock_wait_v1 (PSI_table_locker *locker)
 Implementation of the table instrumentation interface. More...
 
void pfs_start_file_wait_vc (PSI_file_locker *locker, size_t count, const char *src_file, uint src_line)
 Implementation of the file instrumentation interface. More...
 
void pfs_end_file_wait_vc (PSI_file_locker *locker, size_t byte_count)
 Implementation of the file instrumentation interface. More...
 
void pfs_start_file_open_wait_vc (PSI_file_locker *locker, const char *src_file, uint src_line)
 Implementation of the file instrumentation interface. More...
 
PSI_filepfs_end_file_open_wait_vc (PSI_file_locker *locker, void *result)
 Implementation of the file instrumentation interface. More...
 
void pfs_end_file_open_wait_and_bind_to_descriptor_vc (PSI_file_locker *locker, File file)
 Implementation of the file instrumentation interface. More...
 
void pfs_end_temp_file_open_wait_and_bind_to_descriptor_vc (PSI_file_locker *locker, File file, const char *filename)
 Implementation of the file instrumentation interface. More...
 
void pfs_start_file_close_wait_vc (PSI_file_locker *locker, const char *src_file, uint src_line)
 Implementation of the file instrumentation interface. More...
 
void pfs_end_file_close_wait_vc (PSI_file_locker *locker, int rc)
 Implementation of the file instrumentation interface. More...
 
void pfs_start_file_rename_wait_vc (PSI_file_locker *locker, size_t count, const char *old_name, const char *new_name, const char *src_file, uint src_line)
 Implementation of the file instrumentation interface. More...
 
void pfs_end_file_rename_wait_vc (PSI_file_locker *locker, const char *old_name, const char *new_name, int rc)
 Implementation of the file instrumentation interface. More...
 
PSI_stage_progresspfs_start_stage_v1 (PSI_stage_key key, const char *src_file, int src_line)
 
PSI_stage_progresspfs_get_current_stage_progress_v1 ()
 
void pfs_end_stage_v1 ()
 
PSI_statement_lockerpfs_get_thread_statement_locker_vc (PSI_statement_locker_state *state, PSI_statement_key key, const void *charset, PSI_sp_share *sp_share)
 This is the entry point to the performance schema statement instrumentation. More...
 
PSI_statement_lockerpfs_refine_statement_vc (PSI_statement_locker *locker, PSI_statement_key key)
 
void pfs_start_statement_vc (PSI_statement_locker *locker, const char *db, uint db_len, const char *src_file, uint src_line)
 
void pfs_set_statement_text_vc (PSI_statement_locker *locker, const char *text, uint text_len)
 
void pfs_set_statement_query_id_vc (PSI_statement_locker *locker, ulonglong query_id)
 
void pfs_set_statement_lock_time_vc (PSI_statement_locker *locker, ulonglong count)
 
void pfs_set_statement_rows_sent_vc (PSI_statement_locker *locker, ulonglong count)
 
void pfs_set_statement_rows_examined_vc (PSI_statement_locker *locker, ulonglong count)
 
void pfs_inc_statement_created_tmp_disk_tables_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_created_tmp_tables_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_select_full_join_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_select_full_range_join_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_select_range_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_select_range_check_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_select_scan_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_sort_merge_passes_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_sort_range_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_sort_rows_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_inc_statement_sort_scan_vc (PSI_statement_locker *locker, ulong count)
 
void pfs_set_statement_no_index_used_vc (PSI_statement_locker *locker)
 
void pfs_set_statement_no_good_index_used_vc (PSI_statement_locker *locker)
 
void pfs_set_statement_secondary_engine_vc (PSI_statement_locker *locker, bool secondary)
 
void pfs_end_statement_vc (PSI_statement_locker *locker, void *stmt_da)
 
static enum_object_type sp_type_to_object_type (uint sp_type)
 
static PSI_sp_sharepfs_get_sp_share_vc (uint sp_type, const char *schema_name, uint schema_name_length, const char *object_name, uint object_name_length)
 Implementation of the stored program instrumentation interface. More...
 
static void pfs_release_sp_share_vc (PSI_sp_share *)
 
static PSI_sp_lockerpfs_start_sp_vc (PSI_sp_locker_state *state, PSI_sp_share *sp_share)
 
static void pfs_end_sp_vc (PSI_sp_locker *locker)
 
static void pfs_drop_sp_vc (uint sp_type, const char *schema_name, uint schema_name_length, const char *object_name, uint object_name_length)
 
void pfs_notify_statement_query_attributes_vc (PSI_statement_locker *locker, bool with_query_attributes)
 
void pfs_statement_abort_telemetry_vc (PSI_statement_locker *locker)
 
PSI_transaction_lockerpfs_get_thread_transaction_locker_v1 (PSI_transaction_locker_state *state, const void *xid, const ulonglong *trxid, int isolation_level, bool read_only, bool autocommit)
 
void pfs_start_transaction_v1 (PSI_transaction_locker *locker, const char *src_file, uint src_line)
 
void pfs_set_transaction_gtid_v1 (PSI_transaction_locker *locker, const void *sid, const void *gtid_spec)
 
void pfs_set_transaction_xid_v1 (PSI_transaction_locker *locker, const void *xid, int xa_state)
 
void pfs_set_transaction_xa_state_v1 (PSI_transaction_locker *locker, int xa_state)
 
void pfs_set_transaction_trxid_v1 (PSI_transaction_locker *locker, const ulonglong *trxid)
 
void pfs_inc_transaction_savepoints_v1 (PSI_transaction_locker *locker, ulong count)
 
void pfs_inc_transaction_rollback_to_savepoint_v1 (PSI_transaction_locker *locker, ulong count)
 
void pfs_inc_transaction_release_savepoint_v1 (PSI_transaction_locker *locker, ulong count)
 
void pfs_end_transaction_v1 (PSI_transaction_locker *locker, bool commit)
 
void pfs_end_socket_wait_v1 (PSI_socket_locker *locker, size_t byte_count)
 Implementation of the socket instrumentation interface. More...
 
void pfs_set_socket_state_v1 (PSI_socket *socket, PSI_socket_state state)
 
void pfs_set_socket_info_v1 (PSI_socket *socket, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len)
 Set socket descriptor and address info. More...
 
void pfs_set_socket_thread_owner_v1 (PSI_socket *socket)
 Implementation of the socket instrumentation interface. More...
 
struct PSI_digest_lockerpfs_digest_start_vc (PSI_statement_locker *locker)
 
void pfs_digest_end_vc (PSI_digest_locker *locker, const sql_digest_storage *digest)
 
PSI_prepared_stmtpfs_create_prepared_stmt_vc (void *identity, uint stmt_id, PSI_statement_locker *locker, const char *stmt_name, size_t stmt_name_length, const char *sql_text, size_t sql_text_length)
 
void pfs_execute_prepared_stmt_vc (PSI_statement_locker *locker, PSI_prepared_stmt *ps)
 
void pfs_destroy_prepared_stmt_vc (PSI_prepared_stmt *prepared_stmt)
 
void pfs_reprepare_prepared_stmt_vc (PSI_prepared_stmt *prepared_stmt)
 
void pfs_set_prepared_stmt_text_vc (PSI_prepared_stmt *prepared_stmt, const char *text, uint text_len)
 
void pfs_set_prepared_stmt_secondary_engine_vc (PSI_prepared_stmt *prepared_stmt, bool secondary)
 
int pfs_set_thread_connect_attrs_vc (const char *buffer, uint length, const void *from_cs)
 Implementation of the thread attribute connection interface. More...
 
void pfs_get_current_thread_event_id_vc (ulonglong *internal_thread_id, ulonglong *event_id)
 Implementation of the get event id interface. More...
 
void pfs_get_thread_event_id_v1 (ulonglong *internal_thread_id, ulonglong *event_id)
 Implementation of the get event id interface. More...
 
void pfs_get_thread_event_id_vc (PSI_thread *psi, ulonglong *internal_thread_id, ulonglong *event_id)
 Implementation of the get event id interface. More...
 
void pfs_register_memory_vc (const char *category, PSI_memory_info_v1 *info, int count)
 
PSI_memory_key pfs_memory_alloc_vc (PSI_memory_key key, size_t size, PSI_thread **owner)
 
PSI_memory_key pfs_memory_realloc_vc (PSI_memory_key key, size_t old_size, size_t new_size, PSI_thread **owner)
 
PSI_memory_key pfs_memory_claim_vc (PSI_memory_key key, size_t size, PSI_thread **owner, bool claim)
 
void pfs_memory_free_vc (PSI_memory_key key, size_t size, PSI_thread *owner)
 
void pfs_unlock_table_v1 (PSI_table *table)
 
PSI_metadata_lockpfs_create_metadata_lock_vc (void *identity, const MDL_key *mdl_key, opaque_mdl_type mdl_type, opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status, const char *src_file, uint src_line)
 
void pfs_set_metadata_lock_status_vc (PSI_metadata_lock *lock, opaque_mdl_status mdl_status)
 
void pfs_set_metadata_lock_duration_vc (PSI_metadata_lock *lock, opaque_mdl_duration mdl_duration)
 
void pfs_destroy_metadata_lock_vc (PSI_metadata_lock *lock)
 
PSI_metadata_lockerpfs_start_metadata_wait_vc (PSI_metadata_locker_state *state, PSI_metadata_lock *lock, const char *src_file, uint src_line)
 
void pfs_end_metadata_wait_vc (PSI_metadata_locker *locker, int)
 
void pfs_log_error_v1 (uint error_num, PSI_error_operation error_operation)
 
void pfs_register_data_lock_v1 (PSI_engine_data_lock_inspector *inspector)
 
void pfs_unregister_data_lock_v1 (PSI_engine_data_lock_inspector *)
 
void pfs_unload_plugin_v1 (const char *plugin_name)
 Implementation of the thread instrumentation interface. More...
 
const mysql_service_psi_thread_v4_t SERVICE_IMPLEMENTATION (performance_schema, psi_thread_v4)
 
const mysql_service_psi_thread_v5_t SERVICE_IMPLEMENTATION (performance_schema, psi_thread_v5)
 
const mysql_service_psi_thread_v6_t SERVICE_IMPLEMENTATION (performance_schema, psi_thread_v6)
 
const mysql_service_psi_thread_v7_t SERVICE_IMPLEMENTATION (performance_schema, psi_thread_v7)
 
const mysql_service_psi_mutex_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_mutex_v1)
 
const mysql_service_psi_rwlock_v2_t SERVICE_IMPLEMENTATION (performance_schema, psi_rwlock_v2)
 
const mysql_service_psi_cond_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_cond_v1)
 
const mysql_service_psi_file_v2_t SERVICE_IMPLEMENTATION (performance_schema, psi_file_v2)
 
const mysql_service_psi_socket_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_socket_v1)
 
const mysql_service_psi_table_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_table_v1)
 
const mysql_service_psi_mdl_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_mdl_v1)
 
const mysql_service_psi_mdl_v2_t SERVICE_IMPLEMENTATION (performance_schema, psi_mdl_v2)
 
const mysql_service_psi_idle_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_idle_v1)
 
const mysql_service_psi_stage_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_stage_v1)
 
const mysql_service_psi_statement_v5_t SERVICE_IMPLEMENTATION (performance_schema, psi_statement_v5)
 
const mysql_service_psi_transaction_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_transaction_v1)
 
const mysql_service_psi_memory_v2_t SERVICE_IMPLEMENTATION (performance_schema, psi_memory_v2)
 
const mysql_service_psi_error_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_error_v1)
 
const mysql_service_psi_tls_channel_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_tls_channel_v1)
 
static void * get_system_interface (int version)
 
static void * get_thread_interface (int version)
 
static void * get_mutex_interface (int version)
 
static void * get_rwlock_interface (int version)
 
static void * get_cond_interface (int version)
 
static void * get_file_interface (int version)
 
static void * get_socket_interface (int version)
 
static void * get_table_interface (int version)
 
static void * get_mdl_interface (int version)
 
static void * get_idle_interface (int version)
 
static void * get_stage_interface (int version)
 
static void * get_statement_interface (int version)
 
static void * get_transaction_interface (int version)
 
static void * get_memory_interface (int version)
 
static void * get_error_interface (int version)
 
static void * get_data_lock_interface (int version)
 
static void * get_tls_channel_interface (int version)
 
static void * get_metric_interface (int version)
 
void * get_services ()
 

Variables

static constexpr uint STATE_FLAG_STATEMENT_TELEMETRY
 
thread_local PFS_threadTHR_PFS = nullptr
 Performance schema Thread Local Storage. More...
 
static my_thread_t main_thread_id
 
static enum_operation_type mutex_operation_map []
 Conversion map from PSI_mutex_operation to enum_operation_type. More...
 
static enum_operation_type rwlock_operation_map []
 Conversion map from PSI_rwlock_operation to enum_operation_type. More...
 
static enum_operation_type cond_operation_map []
 Conversion map from PSI_cond_operation to enum_operation_type. More...
 
static enum_operation_type file_operation_map []
 Conversion map from PSI_file_operation to enum_operation_type. More...
 
static enum_operation_type table_io_operation_map []
 Conversion map from PSI_table_operation to enum_operation_type. More...
 
static enum_operation_type table_lock_operation_map []
 Conversion map from enum PFS_TL_LOCK_TYPE to enum_operation_type. More...
 
static enum_operation_type socket_operation_map []
 Conversion map from PSI_socket_operation to enum_operation_type. More...
 
PSI_system_service_v1 pfs_system_service_v1
 Implementation of the instrumentation interface. More...
 
const mysql_service_psi_system_v1_t SERVICE_IMPLEMENTATION (performance_schema, psi_system_v1)
 
PSI_thread_service_v4 pfs_thread_service_v4
 Implementation of the instrumentation interface. More...
 
PSI_thread_service_v5 pfs_thread_service_v5
 Implementation of the instrumentation interface. More...
 
PSI_thread_service_v6 pfs_thread_service_v6
 Implementation of the instrumentation interface. More...
 
PSI_thread_service_v7 pfs_thread_service_v7
 Implementation of the instrumentation interface. More...
 
PSI_mutex_service_v1 pfs_mutex_service_v1
 
PSI_rwlock_service_v2 pfs_rwlock_service_v2
 
PSI_cond_service_v1 pfs_cond_service_v1
 
PSI_file_service_v2 pfs_file_service_v2
 
PSI_socket_service_v1 pfs_socket_service_v1
 
PSI_table_service_v1 pfs_table_service_v1
 
PSI_mdl_service_v1 pfs_mdl_service_v1
 
PSI_mdl_service_v2 pfs_mdl_service_v2
 
PSI_idle_service_v1 pfs_idle_service_v1
 
PSI_stage_service_v1 pfs_stage_service_v1
 
PSI_statement_service_v5 pfs_statement_service_v5
 
PSI_transaction_service_v1 pfs_transaction_service_v1
 
PSI_memory_service_v2 pfs_memory_service_v2
 
PSI_error_service_v1 pfs_error_service_v1
 
PSI_data_lock_service_v1 pfs_data_lock_service_v1
 
PSI_tls_channel_service_v1 pfs_tls_channel_service_v1
 
PSI_metric_service_v1 pfs_metric_service_v1
 
struct PSI_cond_bootstrap pfs_cond_bootstrap = {get_cond_interface}
 Entry point to the performance schema implementation. More...
 
struct PSI_data_lock_bootstrap pfs_data_lock_bootstrap
 
PSI_engine_data_lock_inspectorg_data_lock_inspector [COUNT_DATA_LOCK_ENGINES]
 
unsigned int g_data_lock_inspector_count = 0
 
struct PSI_error_bootstrap pfs_error_bootstrap = {get_error_interface}
 
struct PSI_file_bootstrap pfs_file_bootstrap = {get_file_interface}
 
struct PSI_idle_bootstrap pfs_idle_bootstrap = {get_idle_interface}
 
struct PSI_mdl_bootstrap pfs_mdl_bootstrap = {get_mdl_interface}
 
struct PSI_memory_bootstrap pfs_memory_bootstrap = {get_memory_interface}
 
struct PSI_mutex_bootstrap pfs_mutex_bootstrap = {get_mutex_interface}
 
struct PSI_rwlock_bootstrap pfs_rwlock_bootstrap = {get_rwlock_interface}
 
struct PSI_socket_bootstrap pfs_socket_bootstrap = {get_socket_interface}
 
struct PSI_stage_bootstrap pfs_stage_bootstrap = {get_stage_interface}
 
struct PSI_statement_bootstrap pfs_statement_bootstrap
 
struct PSI_system_bootstrap pfs_system_bootstrap = {get_system_interface}
 
struct PSI_table_bootstrap pfs_table_bootstrap = {get_table_interface}
 
struct PSI_thread_bootstrap pfs_thread_bootstrap = {get_thread_interface}
 
struct PSI_tls_channel_bootstrap pfs_tls_channel_bootstrap
 
struct PSI_metric_bootstrap pfs_metric_bootstrap = {get_metric_interface}
 
struct PSI_transaction_bootstrap pfs_transaction_bootstrap
 
static void * services []
 

Detailed Description

The performance schema implementation of all instruments.

Macro Definition Documentation

◆ DEBUG_TRACE_MEMORY

#define DEBUG_TRACE_MEMORY (   P1,
  P2,
  P3,
  P4 
)
Value:
do { \
} while (0)

◆ DISABLE_PSI_COND

#define DISABLE_PSI_COND

Compiling option to disable the cond instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_DATA_LOCK

#define DISABLE_PSI_DATA_LOCK

Compiling option to disable the data lock instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_ERROR

#define DISABLE_PSI_ERROR

Compiling option to disable the error instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_FILE

#define DISABLE_PSI_FILE

Compiling option to disable the file instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_IDLE

#define DISABLE_PSI_IDLE

Compiling option to disable the idle instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_MEMORY

#define DISABLE_PSI_MEMORY

Compiling option to disable the memory instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_METADATA

#define DISABLE_PSI_METADATA

Compiling option to disable the metadata instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_METRICS

#define DISABLE_PSI_METRICS

Compiling option to disable MySQL Server Telemetry metrics instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_MUTEX

#define DISABLE_PSI_MUTEX

Compiling option to disable the mutex instrumentation.

This option is mostly intended to be used during development, when doing special builds with only a subset of the performance schema instrumentation, for code analysis / profiling / performance tuning of a specific instrumentation alone.

See also
DISABLE_PSI_COND
DISABLE_PSI_DATA_LOCK
DISABLE_PSI_ERROR
DISABLE_PSI_FILE
DISABLE_PSI_IDLE
DISABLE_PSI_MEMORY
DISABLE_PSI_METADATA
DISABLE_PSI_PS
DISABLE_PSI_RWLOCK
DISABLE_PSI_SOCKET
DISABLE_PSI_SP
DISABLE_PSI_STAGE
DISABLE_PSI_STATEMENT
DISABLE_PSI_STATEMENT_DIGEST
DISABLE_PSI_SYSTEM
DISABLE_PSI_TABLE
DISABLE_PSI_THREAD
DISABLE_PSI_TRANSACTION
DISABLE_TLS_CHANNEL
DISABLE_PSI_SERVER_TELEMETRY_TRACES
DISABLE_PSI_METRICS

◆ DISABLE_PSI_PS

#define DISABLE_PSI_PS

Compiling option to disable the prepared statement instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_RWLOCK

#define DISABLE_PSI_RWLOCK

Compiling option to disable the rwlock instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_SERVER_TELEMETRY_TRACES

#define DISABLE_PSI_SERVER_TELEMETRY_TRACES

Compiling option to disable MySQL Server Telemetry traces instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_SOCKET

#define DISABLE_PSI_SOCKET

Compiling option to disable the statement instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_SP

#define DISABLE_PSI_SP

Compiling option to disable the stored program instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_STAGE

#define DISABLE_PSI_STAGE

Compiling option to disable the stage instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_STATEMENT

#define DISABLE_PSI_STATEMENT

Compiling option to disable the statement instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_STATEMENT_DIGEST

#define DISABLE_PSI_STATEMENT_DIGEST

Compiling option to disable the statement digest instrumentation.

◆ DISABLE_PSI_SYSTEM

#define DISABLE_PSI_SYSTEM

Compiling option to disable the system instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_TABLE

#define DISABLE_PSI_TABLE

Compiling option to disable the table instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_THREAD

#define DISABLE_PSI_THREAD

Compiling option to disable the thread instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_TLS_CHANNEL

#define DISABLE_PSI_TLS_CHANNEL

Compiling option to disable TLS Channel instrumentation.

See also
DISABLE_PSI_MUTEX

◆ DISABLE_PSI_TRANSACTION

#define DISABLE_PSI_TRANSACTION

Compiling option to disable the transaction instrumentation.

See also
DISABLE_PSI_MUTEX

◆ HAVE_PSI_2

#define HAVE_PSI_2

◆ HAVE_PSI_COND_INTERFACE

#define HAVE_PSI_COND_INTERFACE

◆ HAVE_PSI_DATA_LOCK_INTERFACE

#define HAVE_PSI_DATA_LOCK_INTERFACE

◆ HAVE_PSI_ERROR_INTERFACE

#define HAVE_PSI_ERROR_INTERFACE

◆ HAVE_PSI_FILE_INTERFACE

#define HAVE_PSI_FILE_INTERFACE

◆ HAVE_PSI_IDLE_INTERFACE

#define HAVE_PSI_IDLE_INTERFACE

◆ HAVE_PSI_MEMORY_INTERFACE

#define HAVE_PSI_MEMORY_INTERFACE

◆ HAVE_PSI_METADATA_INTERFACE

#define HAVE_PSI_METADATA_INTERFACE

◆ HAVE_PSI_MUTEX_INTERFACE

#define HAVE_PSI_MUTEX_INTERFACE

◆ HAVE_PSI_PS_INTERFACE

#define HAVE_PSI_PS_INTERFACE

◆ HAVE_PSI_RWLOCK_INTERFACE

#define HAVE_PSI_RWLOCK_INTERFACE

◆ HAVE_PSI_SOCKET_INTERFACE

#define HAVE_PSI_SOCKET_INTERFACE

◆ HAVE_PSI_SP_INTERFACE

#define HAVE_PSI_SP_INTERFACE

◆ HAVE_PSI_STAGE_INTERFACE

#define HAVE_PSI_STAGE_INTERFACE

◆ HAVE_PSI_STATEMENT_DIGEST_INTERFACE

#define HAVE_PSI_STATEMENT_DIGEST_INTERFACE

◆ HAVE_PSI_STATEMENT_INTERFACE

#define HAVE_PSI_STATEMENT_INTERFACE

◆ HAVE_PSI_SYSTEM_INTERFACE

#define HAVE_PSI_SYSTEM_INTERFACE

◆ HAVE_PSI_TABLE_INTERFACE

#define HAVE_PSI_TABLE_INTERFACE

◆ HAVE_PSI_THREAD_INTERFACE

#define HAVE_PSI_THREAD_INTERFACE

◆ HAVE_PSI_TLS_CHANNEL_INTERFACE

#define HAVE_PSI_TLS_CHANNEL_INTERFACE

◆ HAVE_PSI_TRANSACTION_INTERFACE

#define HAVE_PSI_TRANSACTION_INTERFACE

◆ INC_STATEMENT_ATTR_BODY

#define INC_STATEMENT_ATTR_BODY (   LOCKER,
  ATTR,
  VALUE 
)
Value:
auto *state = reinterpret_cast<PSI_statement_locker_state *>(LOCKER); \
if (unlikely(state == nullptr)) { \
return; \
} \
state->ATTR += VALUE; \
if (state->m_pfs_flags & STATE_FLAG_EVENT) { \
PFS_events_statements *pfs; \
pfs = reinterpret_cast<PFS_events_statements *>(state->m_statement); \
assert(pfs != nullptr); \
pfs->ATTR += VALUE; \
} \
return;
constexpr bool unlikely(bool expr)
Definition: my_compiler.h:58
#define STATE_FLAG_EVENT
EVENT bit in the state flags bitfield.
Definition: pfs_events_waits.h:119
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
A statement record.
Definition: pfs_events_statements.h:47
State data storage for get_thread_statement_locker_v5_t.
Definition: psi_statement_bits.h:166

◆ INC_TRANSACTION_ATTR_BODY

#define INC_TRANSACTION_ATTR_BODY (   LOCKER,
  ATTR,
  VALUE 
)
Value:
auto *state = reinterpret_cast<PSI_transaction_locker_state *>(LOCKER); \
if (unlikely(state == nullptr)) { \
return; \
} \
state->ATTR += VALUE; \
if (state->m_flags & STATE_FLAG_EVENT) { \
PFS_events_transactions *pfs; \
pfs = reinterpret_cast<PFS_events_transactions *>(state->m_transaction); \
assert(pfs != nullptr); \
pfs->ATTR += VALUE; \
} \
return;
A transaction record.
Definition: pfs_events_transactions.h:86
State data storage for get_thread_transaction_locker_v1_t, get_thread_transaction_locker_v1_t.
Definition: psi_transaction_bits.h:53

◆ REFERENCES_SERVICE

#define REFERENCES_SERVICE (   component,
  service 
)     const_cast<void *>((const void *)&SERVICE_IMPLEMENTATION(component, service))

◆ REGISTER_BODY_V1

#define REGISTER_BODY_V1 (   KEY_T,
  PREFIX,
  REGISTER_FUNC 
)

◆ SET_STATEMENT_ATTR_BODY

#define SET_STATEMENT_ATTR_BODY (   LOCKER,
  ATTR,
  VALUE 
)
Value:
auto *state = reinterpret_cast<PSI_statement_locker_state *>(LOCKER); \
if (unlikely(state == nullptr)) { \
return; \
} \
state->ATTR = VALUE; \
if (state->m_pfs_flags & STATE_FLAG_EVENT) { \
PFS_events_statements *pfs; \
pfs = reinterpret_cast<PFS_events_statements *>(state->m_statement); \
assert(pfs != nullptr); \
pfs->ATTR = VALUE; \
} \
return;

Function Documentation

◆ adjust_collect_flags()

static void adjust_collect_flags ( PSI_statement_locker_state state)
static

Recompute collection flags.

This helper adjusts the internal collection flags, based on the current telemetry requests.

Parameters
[in,out]stateStatement instrumentation internal state

Input: PSI_statement_locker_state::pfs_flags PSI_statement_locker_state::m_telemetry_scope Output: PSI_statement_locker_state::m_collect_flags PSI_statement_locker_state::m_tel_flags

◆ build_prefix()

static int build_prefix ( const LEX_CSTRING prefix,
const char *  category,
char *  output,
size_t *  output_length 
)
static

Build the prefix name of a class of instruments in a category.

For example, this function builds the string 'wait/sync/mutex/sql/' from a prefix 'wait/sync/mutex' and a category 'sql'. This prefix is used later to build each instrument name, such as 'wait/sync/mutex/sql/LOCK_open'.

Parameters
prefixPrefix for this class of instruments
categoryCategory name
[out]outputBuffer of length PFS_MAX_INFO_NAME_LENGTH.
[out]output_lengthLength of the resulting output string.
Returns
0 for success, non zero for errors

◆ external_lock_flags_to_lock_type()

static PFS_TL_LOCK_TYPE external_lock_flags_to_lock_type ( uint  flags)
inlinestatic

◆ get_cond_interface()

static void * get_cond_interface ( int  version)
static

◆ get_data_lock_interface()

static void * get_data_lock_interface ( int  version)
static

◆ get_error_interface()

static void * get_error_interface ( int  version)
static

◆ get_file_interface()

static void * get_file_interface ( int  version)
static

◆ get_idle_interface()

static void * get_idle_interface ( int  version)
static

◆ get_mdl_interface()

static void * get_mdl_interface ( int  version)
static

◆ get_memory_interface()

static void * get_memory_interface ( int  version)
static

◆ get_metric_interface()

static void * get_metric_interface ( int  version)
static

◆ get_mutex_interface()

static void * get_mutex_interface ( int  version)
static

◆ get_rwlock_interface()

static void * get_rwlock_interface ( int  version)
static

◆ get_services()

void * get_services ( )

◆ get_socket_interface()

static void * get_socket_interface ( int  version)
static

◆ get_stage_interface()

static void * get_stage_interface ( int  version)
static

◆ get_statement_interface()

static void * get_statement_interface ( int  version)
static

◆ get_system_interface()

static void * get_system_interface ( int  version)
static

◆ get_table_interface()

static void * get_table_interface ( int  version)
static

◆ get_thread_attributes()

int get_thread_attributes ( PFS_thread pfs,
bool  current_thread,
PSI_thread_attrs thread_attrs 
)

Get the system and session attributes for a given PFS_thread.

Parameters
pfsthread instrumentation
current_threadtrue if pfs refers to the current thread
thread_attrsthread attribute structure
Returns
0 if successful, non-zero otherwise

◆ get_thread_interface()

static void * get_thread_interface ( int  version)
static

◆ get_tls_channel_interface()

static void * get_tls_channel_interface ( int  version)
static

◆ get_transaction_interface()

static void * get_transaction_interface ( int  version)
static

◆ lock_flags_to_lock_type()

static PFS_TL_LOCK_TYPE lock_flags_to_lock_type ( uint  flags)
inlinestatic

◆ my_thread_get_THR_PFS()

static PFS_thread * my_thread_get_THR_PFS ( )
inlinestatic

◆ my_thread_set_THR_PFS()

static void my_thread_set_THR_PFS ( PFS_thread pfs)
inlinestatic

◆ pfs_abort_telemetry_vc()

void pfs_abort_telemetry_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::abort_telemetry.

◆ pfs_aggregate_thread_status_vc()

void pfs_aggregate_thread_status_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::aggregate_thread_status.

◆ pfs_broadcast_cond_v1()

void pfs_broadcast_cond_v1 ( PSI_cond cond)

Implementation of the cond instrumentation interface.

See also
PSI_v1::broadcast_cond.

◆ pfs_close_table_v1()

void pfs_close_table_v1 ( TABLE_SHARE server_share,
PSI_table table 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::close_table.

◆ pfs_create_file_vc()

void pfs_create_file_vc ( PSI_file_key  key,
const char *  name,
File  file 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::create_file.

◆ pfs_create_metadata_lock_vc()

PSI_metadata_lock * pfs_create_metadata_lock_vc ( void *  identity,
const MDL_key mdl_key,
opaque_mdl_type  mdl_type,
opaque_mdl_duration  mdl_duration,
opaque_mdl_status  mdl_status,
const char *  src_file,
uint  src_line 
)

◆ pfs_create_prepared_stmt_vc()

PSI_prepared_stmt * pfs_create_prepared_stmt_vc ( void *  identity,
uint  stmt_id,
PSI_statement_locker locker,
const char *  stmt_name,
size_t  stmt_name_length,
const char *  sql_text,
size_t  sql_text_length 
)

◆ pfs_delete_current_thread_vc()

void pfs_delete_current_thread_vc ( void  )

Implementation of the thread instrumentation interface.

See also
PSI_v2::delete_current_thread.

◆ pfs_delete_thread_vc()

void pfs_delete_thread_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::delete_thread.

◆ pfs_destroy_cond_v1()

void pfs_destroy_cond_v1 ( PSI_cond cond)

Implementation of the cond instrumentation interface.

See also
PSI_v1::destroy_cond.

◆ pfs_destroy_metadata_lock_vc()

void pfs_destroy_metadata_lock_vc ( PSI_metadata_lock lock)

◆ pfs_destroy_mutex_v1()

void pfs_destroy_mutex_v1 ( PSI_mutex mutex)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::destroy_mutex.

◆ pfs_destroy_prepared_stmt_vc()

void pfs_destroy_prepared_stmt_vc ( PSI_prepared_stmt prepared_stmt)

◆ pfs_destroy_rwlock_v2()

void pfs_destroy_rwlock_v2 ( PSI_rwlock rwlock)

Implementation of the rwlock instrumentation interface.

See also
PSI_v2::destroy_rwlock.

◆ pfs_destroy_socket_v1()

void pfs_destroy_socket_v1 ( PSI_socket socket)

◆ pfs_detect_telemetry_vc()

void pfs_detect_telemetry_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::detect_telemetry.

◆ pfs_digest_end_vc()

void pfs_digest_end_vc ( PSI_digest_locker locker,
const sql_digest_storage digest 
)

◆ pfs_digest_start_vc()

struct PSI_digest_locker * pfs_digest_start_vc ( PSI_statement_locker locker)

◆ pfs_drop_sp_vc()

static void pfs_drop_sp_vc ( uint  sp_type,
const char *  schema_name,
uint  schema_name_length,
const char *  object_name,
uint  object_name_length 
)
static

◆ pfs_drop_table_share_v1()

void pfs_drop_table_share_v1 ( bool  temporary,
const char *  schema_name,
int  schema_name_length,
const char *  table_name,
int  table_name_length 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::drop_table_share.

◆ pfs_end_cond_wait_v1()

void pfs_end_cond_wait_v1 ( PSI_cond_locker locker,
int  rc 
)

Implementation of the cond instrumentation interface.

See also
PSI_v1::end_cond_wait.

◆ pfs_end_file_close_wait_vc()

void pfs_end_file_close_wait_vc ( PSI_file_locker locker,
int  rc 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::end_file_close_wait.

◆ pfs_end_file_open_wait_and_bind_to_descriptor_vc()

void pfs_end_file_open_wait_and_bind_to_descriptor_vc ( PSI_file_locker locker,
File  file 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::end_file_open_wait_and_bind_to_descriptor.

◆ pfs_end_file_open_wait_vc()

PSI_file * pfs_end_file_open_wait_vc ( PSI_file_locker locker,
void *  result 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::end_file_open_wait.

◆ pfs_end_file_rename_wait_vc()

void pfs_end_file_rename_wait_vc ( PSI_file_locker locker,
const char *  old_name,
const char *  new_name,
int  rc 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::end_file_rename_wait.

◆ pfs_end_file_wait_vc()

void pfs_end_file_wait_vc ( PSI_file_locker locker,
size_t  byte_count 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::end_file_wait.

◆ pfs_end_idle_wait_v1()

void pfs_end_idle_wait_v1 ( PSI_idle_locker locker)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::end_idle_wait.

◆ pfs_end_metadata_wait_vc()

void pfs_end_metadata_wait_vc ( PSI_metadata_locker locker,
int  rc 
)

◆ pfs_end_mutex_wait_v1()

void pfs_end_mutex_wait_v1 ( PSI_mutex_locker locker,
int  rc 
)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::end_mutex_wait.

◆ pfs_end_rwlock_rdwait_v2()

void pfs_end_rwlock_rdwait_v2 ( PSI_rwlock_locker locker,
int  rc 
)

Implementation of the rwlock instrumentation interface.

See also
PSI_v2::end_rwlock_rdwait.

◆ pfs_end_rwlock_wrwait_v2()

void pfs_end_rwlock_wrwait_v2 ( PSI_rwlock_locker locker,
int  rc 
)

Implementation of the rwlock instrumentation interface.

See also
PSI_v2::end_rwlock_wrwait.

◆ pfs_end_socket_wait_v1()

void pfs_end_socket_wait_v1 ( PSI_socket_locker locker,
size_t  byte_count 
)

Implementation of the socket instrumentation interface.

See also
PSI_v1::end_socket_wait.

◆ pfs_end_sp_vc()

static void pfs_end_sp_vc ( PSI_sp_locker locker)
static

◆ pfs_end_stage_v1()

void pfs_end_stage_v1 ( )

◆ pfs_end_statement_vc()

void pfs_end_statement_vc ( PSI_statement_locker locker,
void *  stmt_da 
)

◆ pfs_end_table_io_wait_v1()

void pfs_end_table_io_wait_v1 ( PSI_table_locker locker,
ulonglong  numrows 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::end_table_io_wait.

◆ pfs_end_table_lock_wait_v1()

void pfs_end_table_lock_wait_v1 ( PSI_table_locker locker)

Implementation of the table instrumentation interface.

See also
PSI_v1::end_table_lock_wait.

◆ pfs_end_temp_file_open_wait_and_bind_to_descriptor_vc()

void pfs_end_temp_file_open_wait_and_bind_to_descriptor_vc ( PSI_file_locker locker,
File  file,
const char *  filename 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::end_temp_file_open_wait_and_bind_to_descriptor.

◆ pfs_end_transaction_v1()

void pfs_end_transaction_v1 ( PSI_transaction_locker locker,
bool  commit 
)

◆ pfs_execute_prepared_stmt_vc()

void pfs_execute_prepared_stmt_vc ( PSI_statement_locker locker,
PSI_prepared_stmt ps 
)

◆ pfs_get_current_stage_progress_v1()

PSI_stage_progress * pfs_get_current_stage_progress_v1 ( )

◆ pfs_get_current_thread_event_id_vc()

void pfs_get_current_thread_event_id_vc ( ulonglong internal_thread_id,
ulonglong event_id 
)

Implementation of the get event id interface.

See also
PSI_v2::get_thread_event_id.

◆ pfs_get_current_thread_internal_id_vc()

ulonglong pfs_get_current_thread_internal_id_vc ( )

Implementation of the thread instrumentation interface.

See also
PSI_v2::get_current_thread_internal_id.

◆ pfs_get_sp_share_vc()

static PSI_sp_share * pfs_get_sp_share_vc ( uint  sp_type,
const char *  schema_name,
uint  schema_name_length,
const char *  object_name,
uint  object_name_length 
)
static

Implementation of the stored program instrumentation interface.

See also
PSI_v1::get_sp_share.

◆ pfs_get_table_share_v1()

PSI_table_share * pfs_get_table_share_v1 ( bool  temporary,
TABLE_SHARE share 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::get_table_share.

◆ pfs_get_thread_by_id_vc()

PSI_thread * pfs_get_thread_by_id_vc ( ulonglong  processlist_id)

Implementation of the thread instrumentation interface.

See also
PSI_v2::get_thread_by_id.

◆ pfs_get_thread_event_id_v1()

void pfs_get_thread_event_id_v1 ( ulonglong internal_thread_id,
ulonglong event_id 
)

Implementation of the get event id interface.

See also
PSI_v1::get_thread_event_id.

◆ pfs_get_thread_event_id_vc()

void pfs_get_thread_event_id_vc ( PSI_thread psi,
ulonglong internal_thread_id,
ulonglong event_id 
)

Implementation of the get event id interface.

See also
PSI_v1::get_thread_event_id.

◆ pfs_get_thread_file_descriptor_locker_vc()

PSI_file_locker * pfs_get_thread_file_descriptor_locker_vc ( PSI_file_locker_state state,
File  file,
PSI_file_operation  op 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::get_thread_file_descriptor_locker.

◆ pfs_get_thread_file_name_locker_vc()

PSI_file_locker * pfs_get_thread_file_name_locker_vc ( PSI_file_locker_state state,
PSI_file_key  key,
PSI_file_operation  op,
const char *  name,
const void *  identity 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::get_thread_file_name_locker.

◆ pfs_get_thread_file_stream_locker_vc()

PSI_file_locker * pfs_get_thread_file_stream_locker_vc ( PSI_file_locker_state state,
PSI_file file,
PSI_file_operation  op 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::get_thread_file_stream_locker.

◆ pfs_get_thread_internal_id_vc()

ulonglong pfs_get_thread_internal_id_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::get_thread_internal_id.

◆ pfs_get_thread_statement_locker_vc()

PSI_statement_locker * pfs_get_thread_statement_locker_vc ( PSI_statement_locker_state state,
PSI_statement_key  key,
const void *  charset,
PSI_sp_share sp_share 
)

This is the entry point to the performance schema statement instrumentation.

This instrumentation is used to:

  • provide data to the performance schema tables, according to the performance schema configuration,
  • provide data to the telemetry traces component, if present, according to the telemetry component configuration.

These two data paths are executed in parallel, based on data collected once, and possibly used twice for different purposes.

is used to collect data.

How each field in PSI_statement_locker_state is used is described here, not in PSI_statement_locker_state, because usage is specific to the implementation.

Other instrumentations of the PSI interface, (namely, LOCK_ORDER), may choose to use fields differently, or not at all.

Fields in PSI_statement_locker_state are used as follows.

PSI_statement_locker_state::m_class

Statement instrument class. Always populated. Not null.

PSI_statement_locker_state::m_cs_number

Always populated. Character set number, for query text.

PSI_statement_locker_state::m_thread

Thread instrumentation. Always populated. May be null.

PSI_statement_locker_state::m_parent_sp_share

Parent stored program instrumentation. Always populated. May be null.

PSI_statement_locker_state::m_pfs_flags

Flags controlling how collected data is used to feed performance schema tables. Always populated.

Bits have the following semantic:

  • STATE_FLAG_BASE indicates that basic statement statistics are to be collected.
  • STATE_FLAG_THREAD indicates that per thread statistics are to be populated. When not set, global statistics are populated instead.
  • STATE_FLAG_EVENT indicates that detail event data is to be collected.
  • STATE_FLAG_TIMED indicates that timing data is collected.
  • STATE_FLAG_CPU indicates that cpu data is collected.
  • STATE_FLAG_DIGEST indicates that digest data is collected.

In addition, the following filters are implemented:

  • STATE_FLAG_BASE depends on PFS_statement_class::m_enabled. That is, column SETUP_INSTRUMENTS.ENABLED is honored.
  • STATE_FLAG_THREAD depends on PFS_thread::m_enabled. That is, column THREADS.ENABLED is honored.
  • STATE_FLAG_TIMED depends on PFS_statement_class::m_timed. That is, column SETUP_INSTRUMENTS.TIMED is honored.

PSI_statement_locker_state::m_telemetry_scope

These flags are set by the telemetry traces component, to indicate if/how to collect data for telemetry. Never populated, when not compiling with telemetry. Always populated, when compiling with telemetry.

Possible values are:

  • 0, to indicate statement traces are not collected.
  • TRACE_STATEMENTS, to indicate statement traces are required.

These values are exposed in the mysql_server_telemetry_traces_v1 service, and part of the public mysql_server_telemetry_traces interface.

Subsequent calls to telemetry trace apis can narrow down flags, but can never add more flags.

PSI_statement_locker_state::m_tel_flags

These flags are a translation, in performance schema implementation terms, of interface PSI_statement_locker_state::m_telemetry_scope. Never populated, when not compiling with telemetry traces. Always populated, when compiling with telemetry traces.

Bits have the following semantic:

  • STATE_FLAG_BASE indicates that statement statistics are collected.
  • STATE_FLAG_THREAD indicates that the thread instrumentation object PFS_thread exists and is not NULL.
  • STATE_FLAG_TIMED indicates that timing data is collected.
  • STATE_FLAG_CPU indicates that cpu data is collected.
  • STATE_FLAG_DIGEST indicates that digest data is collected.
  • STATE_FLAG_EVENT indicates that per event data (query text, error message) is collected.

In practice, these flags are not set individually. See STATE_FLAG_STATEMENT_TELEMETRY.

PSI_statement_locker_state::m_collect_flags

Flags controlling data collection. These flags are the union of m_pfs_flags and m_telemetry_scope Always populated.

A value 0 indicates nothing is collected.

PSI_statement_locker_state::m_telemetry_locker

Opaque pointer to a telemetry span inside the telemetry component. Never populated, when not compiling with telemetry. Always populated, when compiling with telemetry. May be NULL.

PSI_statement_locker_state::m_telemetry

Pointer to the telemetry traces component code.

Typed as a void* pointer in public headers, to avoid exposing implementation details. The effective type is guaranteed to be

Definition: server_telemetry_traces_bits.h:137

which is the component entry point loaded by INSTALL COMPONENT <telemetry.so>

Never populated, when not compiling with telemetry traces. Conditionally populated, when compiling with telemetry traces. Not NULL if populated.

This member is initialized only when m_telemetry_locker != nullptr. It points to the telemetry traces component that created the m_telemetry_locker.

When m_telemetry_locker == nullptr, this member is not set.

PSI_statement_locker_state::m_telemetry_session

Pointer to a telemetry session, inside the telemetry component.

Never populated, when not compiling with telemetry traces. Conditionally populated, when compiling with telemetry traces. Not NULL if populated.

This member is initialized only when m_telemetry_locker != nullptr. It points to the telemetry session associated with the m_telemetry_locker.

When m_telemetry_locker == nullptr, this member is not set.

PSI_statement_locker_state::m_controlled_local_size_start PSI_statement_locker_state::m_controlled_stmt_size_start PSI_statement_locker_state::m_total_local_size_start PSI_statement_locker_state::m_total_stmt_size_start

Temporary storage used by the instrumentation to compute the amount of memory used by a sub statement.

Conditionally populated, several conditions apply:

  • m_thread != nullptr, the thread instrumentation must exist
  • m_collect_flags != 0, data is collected
  • m_parent_sp_share != nullptr, the statement is a sub statement.

Used to compute MAX_CONTROLLED_MEMORY and MAX_TOTAL_MEMORY.

PSI_statement_locker_state::m_timer_start

Statement timing information. Conditionally populated, if m_collect_flags != 0. May be 0.

Value set only when bit STATE_FLAG_TIMED is set in m_collect_flags.

Note that m_collect_flags & STATE_FLAG_TIMED can be true, while m_pfs_flags & STATE_FLAG_TIMED can be false, so check the proper flag before using this field.

PSI_statement_locker_state::m_cpu_time_start

CPU timing information. Conditionally populated, if m_collect_flags != 0. May be 0.

Value set only when bit STATE_FLAG_CPU is set in m_collect_flags.

Note that m_collect_flags & STATE_FLAG_CPU can be true, while m_pfs_flags & STATE_FLAG_CPU can be false, so check the proper flag before using this field.

PSI_statement_locker_state::m_no_index_used PSI_statement_locker_state::m_no_good_index_used PSI_statement_locker_state::m_lock_time PSI_statement_locker_state::m_rows_sent PSI_statement_locker_state::m_rows_examined PSI_statement_locker_state::m_created_tmp_disk_tables PSI_statement_locker_state::m_created_tmp_tables PSI_statement_locker_state::m_select_full_join PSI_statement_locker_state::m_select_full_range_join PSI_statement_locker_state::m_select_range PSI_statement_locker_state::m_select_range_check PSI_statement_locker_state::m_select_scan PSI_statement_locker_state::m_sort_merge_passes PSI_statement_locker_state::m_sort_range PSI_statement_locker_state::m_sort_rows PSI_statement_locker_state::m_sort_scan

Optimizer metrics associated with a statement. Conditionally populated, if m_collect_flags & STATE_FLAG_BASE.

PSI_statement_locker_state::m_digest

Query digest. Conditionally populated, if m_collect_flags != 0. May be NULL.

Value set only when bit STATE_FLAG_DIGEST is set in m_collect_flags.

PSI_statement_locker_state::m_schema_name PSI_statement_locker_state::m_schema_name_length

Current schema. Conditionally populated, if m_collect_flags != 0. May be empty.

PSI_statement_locker_state::m_query_sample PSI_statement_locker_state::m_query_sample_length PSI_statement_locker_state::m_query_sample_truncated

Query sample. Conditionally populated, if m_collect_flags != 0. May be empty.

PSI_statement_locker_state::m_secondary

Secondary engine. Conditionally populated, if m_collect_flags != 0.

PSI_statement_locker_state::m_parent_prepared_stmt

Parent prepare statement. Conditionally populated, if m_collect_flags != 0. May be NULL.

PSI_statement_locker_state::m_in_prepare

Prepare or Execute the parent prepared statement. Conditionally populated:

  • m_collect_flags != 0
  • m_parent_prepared_stmt != nullptr

If a parent prepared statement exists, indicate if the code prepares (true) or executes (false) the parent statement.

PSI_statement_locker_state::m_statement

Performance schema STATEMENT_CURRENT record. Conditionally populated, if m_collect_flags != 0. May be NULL.

Value set only if pfs_flags & STATE_FLAG_EVENT

◆ pfs_get_thread_system_attrs()

void pfs_get_thread_system_attrs ( PFS_thread pfs,
PSI_thread_attrs thread_attrs 
)

◆ pfs_get_thread_system_attrs_by_id_vc()

int pfs_get_thread_system_attrs_by_id_vc ( PSI_thread thread,
ulonglong  thread_id,
PSI_thread_attrs thread_attrs 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::get_thread_system_attrs_by_id.

◆ pfs_get_thread_system_attrs_vc()

int pfs_get_thread_system_attrs_vc ( PSI_thread_attrs thread_attrs)

Implementation of the thread instrumentation interface.

See also
PSI_v2::get_thread_system_attrs.

◆ pfs_get_thread_transaction_locker_v1()

PSI_transaction_locker * pfs_get_thread_transaction_locker_v1 ( PSI_transaction_locker_state state,
const void *  xid,
const ulonglong trxid,
int  isolation_level,
bool  read_only,
bool  autocommit 
)

◆ pfs_get_thread_vc()

PSI_thread * pfs_get_thread_vc ( void  )

Implementation of the thread instrumentation interface.

See also
PSI_v2::get_thread.

◆ pfs_inc_statement_created_tmp_disk_tables_vc()

void pfs_inc_statement_created_tmp_disk_tables_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_created_tmp_tables_vc()

void pfs_inc_statement_created_tmp_tables_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_select_full_join_vc()

void pfs_inc_statement_select_full_join_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_select_full_range_join_vc()

void pfs_inc_statement_select_full_range_join_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_select_range_check_vc()

void pfs_inc_statement_select_range_check_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_select_range_vc()

void pfs_inc_statement_select_range_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_select_scan_vc()

void pfs_inc_statement_select_scan_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_sort_merge_passes_vc()

void pfs_inc_statement_sort_merge_passes_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_sort_range_vc()

void pfs_inc_statement_sort_range_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_sort_rows_vc()

void pfs_inc_statement_sort_rows_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_statement_sort_scan_vc()

void pfs_inc_statement_sort_scan_vc ( PSI_statement_locker locker,
ulong  count 
)

◆ pfs_inc_transaction_release_savepoint_v1()

void pfs_inc_transaction_release_savepoint_v1 ( PSI_transaction_locker locker,
ulong  count 
)

◆ pfs_inc_transaction_rollback_to_savepoint_v1()

void pfs_inc_transaction_rollback_to_savepoint_v1 ( PSI_transaction_locker locker,
ulong  count 
)

◆ pfs_inc_transaction_savepoints_v1()

void pfs_inc_transaction_savepoints_v1 ( PSI_transaction_locker locker,
ulong  count 
)

◆ pfs_init_cond_v1()

PSI_cond * pfs_init_cond_v1 ( PSI_cond_key  key,
const void *  identity 
)

Implementation of the cond instrumentation interface.

See also
PSI_v1::init_cond.

◆ pfs_init_mutex_v1()

PSI_mutex * pfs_init_mutex_v1 ( PSI_mutex_key  key,
const void *  identity 
)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::init_mutex.

◆ pfs_init_rwlock_v2()

PSI_rwlock * pfs_init_rwlock_v2 ( PSI_rwlock_key  key,
const void *  identity 
)

Implementation of the rwlock instrumentation interface.

See also
PSI_v2::init_rwlock.

◆ pfs_init_socket_v1()

PSI_socket * pfs_init_socket_v1 ( PSI_socket_key  key,
const my_socket fd,
const struct sockaddr addr,
socklen_t  addr_len 
)

◆ pfs_log_error_v1()

void pfs_log_error_v1 ( uint  error_num,
PSI_error_operation  error_operation 
)

◆ pfs_memory_alloc_vc()

PSI_memory_key pfs_memory_alloc_vc ( PSI_memory_key  key,
size_t  size,
PSI_thread **  owner 
)

◆ pfs_memory_claim_vc()

PSI_memory_key pfs_memory_claim_vc ( PSI_memory_key  key,
size_t  size,
PSI_thread **  owner,
bool  claim 
)

◆ pfs_memory_free_vc()

void pfs_memory_free_vc ( PSI_memory_key  key,
size_t  size,
PSI_thread owner 
)

◆ pfs_memory_realloc_vc()

PSI_memory_key pfs_memory_realloc_vc ( PSI_memory_key  key,
size_t  old_size,
size_t  new_size,
PSI_thread **  owner 
)

◆ pfs_new_thread_v4()

PSI_thread * pfs_new_thread_v4 ( PSI_thread_key  key,
const void *  identity,
ulonglong  processlist_id 
)

◆ pfs_new_thread_vc()

PSI_thread * pfs_new_thread_vc ( PSI_thread_key  key,
PSI_thread_seqnum  seqnum,
const void *  identity,
ulonglong  processlist_id 
)

Implementation of the thread instrumentation interface.

See also
PSI_v5::new_thread.

◆ pfs_notify_session_change_user_vc()

void pfs_notify_session_change_user_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::notify_session_change_user.

◆ pfs_notify_session_connect_vc()

void pfs_notify_session_connect_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::notify_session_connect.

◆ pfs_notify_session_disconnect_vc()

void pfs_notify_session_disconnect_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::notify_session_disconnect.

◆ pfs_notify_statement_query_attributes_vc()

void pfs_notify_statement_query_attributes_vc ( PSI_statement_locker locker,
bool  with_query_attributes 
)

◆ pfs_open_table_v1()

PSI_table * pfs_open_table_v1 ( PSI_table_share share,
const void *  identity 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::open_table.

◆ pfs_rebind_table_v1()

PSI_table * pfs_rebind_table_v1 ( PSI_table_share share,
const void *  identity,
PSI_table table 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::rebind_table.

◆ pfs_refine_statement_vc()

PSI_statement_locker * pfs_refine_statement_vc ( PSI_statement_locker locker,
PSI_statement_key  key 
)

◆ pfs_register_cond_v1()

void pfs_register_cond_v1 ( const char *  category,
PSI_cond_info_v1 info,
int  count 
)

Implementation of the cond instrumentation interface.

See also
PSI_v1::register_cond.

◆ pfs_register_data_lock_v1()

void pfs_register_data_lock_v1 ( PSI_engine_data_lock_inspector inspector)

◆ pfs_register_file_vc()

void pfs_register_file_vc ( const char *  category,
PSI_file_info_v1 info,
int  count 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::register_file.

◆ pfs_register_memory_vc()

void pfs_register_memory_vc ( const char *  category,
PSI_memory_info_v1 info,
int  count 
)

◆ pfs_register_mutex_v1()

void pfs_register_mutex_v1 ( const char *  category,
PSI_mutex_info_v1 info,
int  count 
)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::register_mutex.

◆ pfs_register_notification_vc()

int pfs_register_notification_vc ( const PSI_notification callbacks,
bool  with_ref_count 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::register_notification.

◆ pfs_register_rwlock_v2()

void pfs_register_rwlock_v2 ( const char *  category,
PSI_rwlock_info_v1 info,
int  count 
)

Implementation of the rwlock instrumentation interface.

See also
PSI_v2::register_rwlock.

◆ pfs_register_socket_v1()

void pfs_register_socket_v1 ( const char *  category,
PSI_socket_info_v1 info,
int  count 
)

◆ pfs_register_stage_v1()

void pfs_register_stage_v1 ( const char *  category,
PSI_stage_info_v1 **  info_array,
int  count 
)

◆ pfs_register_statement_vc()

void pfs_register_statement_vc ( const char *  category,
PSI_statement_info info,
int  count 
)

◆ pfs_register_thread_v1()

void pfs_register_thread_v1 ( const char *  category,
PSI_thread_info_v1 info,
int  count 
)

Implementation of the thread instrumentation interface.

See also
PSI_v1::register_thread.

◆ pfs_register_thread_vc()

void pfs_register_thread_vc ( const char *  category,
PSI_thread_info info,
int  count 
)

Implementation of the thread instrumentation interface.

See also
PSI_v5::register_thread.

◆ pfs_release_sp_share_vc()

static void pfs_release_sp_share_vc ( PSI_sp_share )
static

◆ pfs_release_table_share_v1()

void pfs_release_table_share_v1 ( PSI_table_share share)

Implementation of the table instrumentation interface.

See also
PSI_v1::release_table_share.

◆ pfs_reprepare_prepared_stmt_vc()

void pfs_reprepare_prepared_stmt_vc ( PSI_prepared_stmt prepared_stmt)

◆ pfs_set_connection_type_vc()

void pfs_set_connection_type_vc ( opaque_vio_type  conn_type)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_connection_type.

◆ pfs_set_mem_cnt_THD_vc()

void pfs_set_mem_cnt_THD_vc ( THD thd,
THD **  backup_thd 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_mem_cnt_THD.

◆ pfs_set_metadata_lock_duration_vc()

void pfs_set_metadata_lock_duration_vc ( PSI_metadata_lock lock,
opaque_mdl_duration  mdl_duration 
)

◆ pfs_set_metadata_lock_status_vc()

void pfs_set_metadata_lock_status_vc ( PSI_metadata_lock lock,
opaque_mdl_status  mdl_status 
)

◆ pfs_set_prepared_stmt_secondary_engine_vc()

void pfs_set_prepared_stmt_secondary_engine_vc ( PSI_prepared_stmt prepared_stmt,
bool  secondary 
)

◆ pfs_set_prepared_stmt_text_vc()

void pfs_set_prepared_stmt_text_vc ( PSI_prepared_stmt prepared_stmt,
const char *  text,
uint  text_len 
)

◆ pfs_set_socket_info_v1()

void pfs_set_socket_info_v1 ( PSI_socket socket,
const my_socket fd,
const struct sockaddr addr,
socklen_t  addr_len 
)

Set socket descriptor and address info.

◆ pfs_set_socket_state_v1()

void pfs_set_socket_state_v1 ( PSI_socket socket,
PSI_socket_state  state 
)

◆ pfs_set_socket_thread_owner_v1()

void pfs_set_socket_thread_owner_v1 ( PSI_socket socket)

Implementation of the socket instrumentation interface.

See also
PSI_v1::set_socket_info.

◆ pfs_set_statement_lock_time_vc()

void pfs_set_statement_lock_time_vc ( PSI_statement_locker locker,
ulonglong  count 
)

◆ pfs_set_statement_no_good_index_used_vc()

void pfs_set_statement_no_good_index_used_vc ( PSI_statement_locker locker)

◆ pfs_set_statement_no_index_used_vc()

void pfs_set_statement_no_index_used_vc ( PSI_statement_locker locker)

◆ pfs_set_statement_query_id_vc()

void pfs_set_statement_query_id_vc ( PSI_statement_locker locker,
ulonglong  query_id 
)

◆ pfs_set_statement_rows_examined_vc()

void pfs_set_statement_rows_examined_vc ( PSI_statement_locker locker,
ulonglong  count 
)

◆ pfs_set_statement_rows_sent_vc()

void pfs_set_statement_rows_sent_vc ( PSI_statement_locker locker,
ulonglong  count 
)

◆ pfs_set_statement_secondary_engine_vc()

void pfs_set_statement_secondary_engine_vc ( PSI_statement_locker locker,
bool  secondary 
)

◆ pfs_set_statement_text_vc()

void pfs_set_statement_text_vc ( PSI_statement_locker locker,
const char *  text,
uint  text_len 
)

◆ pfs_set_thread_account_vc()

void pfs_set_thread_account_vc ( const char *  user,
int  user_len,
const char *  host,
int  host_len 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_account.

◆ pfs_set_thread_command_vc()

void pfs_set_thread_command_vc ( int  command)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_command.

◆ pfs_set_thread_connect_attrs_vc()

int pfs_set_thread_connect_attrs_vc ( const char *  buffer,
uint  length,
const void *  from_cs 
)

Implementation of the thread attribute connection interface.

See also
PSI_v2::set_thread_connect_attr.

◆ pfs_set_thread_db_vc()

void pfs_set_thread_db_vc ( const char *  db,
int  db_len 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_db.

◆ pfs_set_thread_id_vc()

void pfs_set_thread_id_vc ( PSI_thread thread,
ulonglong  processlist_id 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_id.

◆ pfs_set_thread_info_vc()

void pfs_set_thread_info_vc ( const char *  info,
uint  info_len 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_info.

◆ pfs_set_thread_os_id_vc()

void pfs_set_thread_os_id_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_os_thread_id.

◆ pfs_set_thread_peer_port_vc()

void pfs_set_thread_peer_port_vc ( PSI_thread thread,
uint  port 
)

Implementation of the thread instrumentation interface.

See also
PSI_v4::set_thread_peer_port

◆ pfs_set_thread_resource_group_by_id_vc()

int pfs_set_thread_resource_group_by_id_vc ( PSI_thread thread,
ulonglong  thread_id,
const char *  group_name,
int  group_name_len,
void *  user_data 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_resource_group_by_id

◆ pfs_set_thread_resource_group_vc()

int pfs_set_thread_resource_group_vc ( const char *  group_name,
int  group_name_len,
void *  user_data 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_resource_group

◆ pfs_set_thread_secondary_engine_vc()

void pfs_set_thread_secondary_engine_vc ( bool  secondary)

Implementation of the thread instrumentation interface.

See also
PSI_v6::set_thread_secondary_engine.

◆ pfs_set_thread_start_time_vc()

void pfs_set_thread_start_time_vc ( time_t  start_time)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_start_time.

◆ pfs_set_thread_state_v1()

void pfs_set_thread_state_v1 ( const char *  )

Implementation of the thread instrumentation interface.

See also
PSI_v1::set_thread_state.

◆ pfs_set_thread_THD_vc()

void pfs_set_thread_THD_vc ( PSI_thread thread,
THD thd 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_THD.

◆ pfs_set_thread_user_vc()

void pfs_set_thread_user_vc ( const char *  user,
int  user_len 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread_user.

◆ pfs_set_thread_vc()

void pfs_set_thread_vc ( PSI_thread thread)

Implementation of the thread instrumentation interface.

See also
PSI_v2::set_thread.

◆ pfs_set_transaction_gtid_v1()

void pfs_set_transaction_gtid_v1 ( PSI_transaction_locker locker,
const void *  sid,
const void *  gtid_spec 
)

◆ pfs_set_transaction_trxid_v1()

void pfs_set_transaction_trxid_v1 ( PSI_transaction_locker locker,
const ulonglong trxid 
)

◆ pfs_set_transaction_xa_state_v1()

void pfs_set_transaction_xa_state_v1 ( PSI_transaction_locker locker,
int  xa_state 
)

◆ pfs_set_transaction_xid_v1()

void pfs_set_transaction_xid_v1 ( PSI_transaction_locker locker,
const void *  xid,
int  xa_state 
)

◆ pfs_signal_cond_v1()

void pfs_signal_cond_v1 ( PSI_cond cond)

Implementation of the cond instrumentation interface.

See also
PSI_v1::signal_cond.

◆ pfs_spawn_thread()

static void * pfs_spawn_thread ( void *  arg)
static

◆ pfs_spawn_thread_v4()

int pfs_spawn_thread_v4 ( PSI_thread_key  key,
my_thread_handle thread,
const my_thread_attr_t attr,
void *(*)(void *)  start_routine,
void *  arg 
)

◆ pfs_spawn_thread_vc()

int pfs_spawn_thread_vc ( PSI_thread_key  key,
PSI_thread_seqnum  seqnum,
my_thread_handle thread,
const my_thread_attr_t attr,
void *(*)(void *)  start_routine,
void *  arg 
)

Implementation of the thread instrumentation interface.

See also
PSI_v2::spawn_thread.

◆ pfs_start_cond_wait_v1()

PSI_cond_locker * pfs_start_cond_wait_v1 ( PSI_cond_locker_state state,
PSI_cond cond,
PSI_mutex mutex,
PSI_cond_operation  op,
const char *  src_file,
uint  src_line 
)

Implementation of the cond instrumentation interface.

See also
PSI_v1::start_cond_wait.

◆ pfs_start_file_close_wait_vc()

void pfs_start_file_close_wait_vc ( PSI_file_locker locker,
const char *  src_file,
uint  src_line 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::start_file_close_wait.

◆ pfs_start_file_open_wait_vc()

void pfs_start_file_open_wait_vc ( PSI_file_locker locker,
const char *  src_file,
uint  src_line 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::start_file_open_wait.

◆ pfs_start_file_rename_wait_vc()

void pfs_start_file_rename_wait_vc ( PSI_file_locker locker,
size_t  count,
const char *  old_name,
const char *  new_name,
const char *  src_file,
uint  src_line 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::start_file_rename_wait.

◆ pfs_start_file_wait_vc()

void pfs_start_file_wait_vc ( PSI_file_locker locker,
size_t  count,
const char *  src_file,
uint  src_line 
)

Implementation of the file instrumentation interface.

See also
PSI_v1::start_file_wait.

◆ pfs_start_idle_wait_v1()

PSI_idle_locker * pfs_start_idle_wait_v1 ( PSI_idle_locker_state state,
const char *  src_file,
uint  src_line 
)

Implementation of the idle instrumentation interface.

See also
PSI_v1::start_idle_wait.

◆ pfs_start_metadata_wait_vc()

PSI_metadata_locker * pfs_start_metadata_wait_vc ( PSI_metadata_locker_state state,
PSI_metadata_lock lock,
const char *  src_file,
uint  src_line 
)

◆ pfs_start_mutex_wait_v1()

PSI_mutex_locker * pfs_start_mutex_wait_v1 ( PSI_mutex_locker_state state,
PSI_mutex mutex,
PSI_mutex_operation  op,
const char *  src_file,
uint  src_line 
)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::start_mutex_wait.

◆ pfs_start_rwlock_rdwait_v2()

PSI_rwlock_locker * pfs_start_rwlock_rdwait_v2 ( PSI_rwlock_locker_state state,
PSI_rwlock rwlock,
PSI_rwlock_operation  op,
const char *  src_file,
uint  src_line 
)

◆ pfs_start_rwlock_wait_v2()

static PSI_rwlock_locker * pfs_start_rwlock_wait_v2 ( PSI_rwlock_locker_state state,
PSI_rwlock rwlock,
PSI_rwlock_operation  op,
const char *  src_file,
uint  src_line 
)
static

Implementation of the rwlock instrumentation interface.

See also
PSI_v2::start_rwlock_rdwait
PSI_v2::start_rwlock_wrwait

◆ pfs_start_rwlock_wrwait_v2()

PSI_rwlock_locker * pfs_start_rwlock_wrwait_v2 ( PSI_rwlock_locker_state state,
PSI_rwlock rwlock,
PSI_rwlock_operation  op,
const char *  src_file,
uint  src_line 
)

◆ pfs_start_socket_wait_v1()

PSI_socket_locker * pfs_start_socket_wait_v1 ( PSI_socket_locker_state state,
PSI_socket socket,
PSI_socket_operation  op,
size_t  count,
const char *  src_file,
uint  src_line 
)

Socket locker.

◆ pfs_start_sp_vc()

static PSI_sp_locker * pfs_start_sp_vc ( PSI_sp_locker_state state,
PSI_sp_share sp_share 
)
static

◆ pfs_start_stage_v1()

PSI_stage_progress * pfs_start_stage_v1 ( PSI_stage_key  key,
const char *  src_file,
int  src_line 
)

◆ pfs_start_statement_vc()

void pfs_start_statement_vc ( PSI_statement_locker locker,
const char *  db,
uint  db_len,
const char *  src_file,
uint  src_line 
)

◆ pfs_start_table_io_wait_v1()

PSI_table_locker * pfs_start_table_io_wait_v1 ( PSI_table_locker_state state,
PSI_table table,
PSI_table_io_operation  op,
uint  index,
const char *  src_file,
uint  src_line 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::start_table_io_wait_v1

◆ pfs_start_table_lock_wait_v1()

PSI_table_locker * pfs_start_table_lock_wait_v1 ( PSI_table_locker_state state,
PSI_table table,
PSI_table_lock_operation  op,
ulong  op_flags,
const char *  src_file,
uint  src_line 
)

Implementation of the table instrumentation interface.

See also
PSI_v1::start_table_lock_wait.

◆ pfs_start_transaction_v1()

void pfs_start_transaction_v1 ( PSI_transaction_locker locker,
const char *  src_file,
uint  src_line 
)

◆ pfs_statement_abort_telemetry_vc()

void pfs_statement_abort_telemetry_vc ( PSI_statement_locker locker)

◆ pfs_thread_setname()

static void pfs_thread_setname ( PFS_thread pfs)
static

◆ pfs_unbind_table_v1()

void pfs_unbind_table_v1 ( PSI_table table)

Implementation of the table instrumentation interface.

See also
PSI_v1::unbind_table.

◆ pfs_unload_plugin_v1()

void pfs_unload_plugin_v1 ( const char *  plugin_name)

Implementation of the thread instrumentation interface.

See also
PSI_v1::unload_plugin.

◆ pfs_unlock_mutex_v1()

void pfs_unlock_mutex_v1 ( PSI_mutex mutex)

Implementation of the mutex instrumentation interface.

See also
PSI_v1::unlock_mutex.

◆ pfs_unlock_rwlock_v2()

void pfs_unlock_rwlock_v2 ( PSI_rwlock rwlock,
PSI_rwlock_operation  op 
)

Implementation of the rwlock instrumentation interface.

See also
PSI_v1::unlock_rwlock.

◆ pfs_unlock_table_v1()

void pfs_unlock_table_v1 ( PSI_table table)

◆ pfs_unregister_data_lock_v1()

void pfs_unregister_data_lock_v1 ( PSI_engine_data_lock_inspector inspector)

◆ pfs_unregister_notification_vc()

int pfs_unregister_notification_vc ( int  handle)

Implementation of the thread instrumentation interface.

See also
PSI_v2::unregister_notification.

◆ record_main_thread_id()

void record_main_thread_id ( )

◆ SERVICE_IMPLEMENTATION() [1/19]

const mysql_service_psi_cond_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_cond_v1   
)

◆ SERVICE_IMPLEMENTATION() [2/19]

const mysql_service_psi_error_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_error_v1   
)

◆ SERVICE_IMPLEMENTATION() [3/19]

const mysql_service_psi_file_v2_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_file_v2   
)

◆ SERVICE_IMPLEMENTATION() [4/19]

const mysql_service_psi_idle_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_idle_v1   
)

◆ SERVICE_IMPLEMENTATION() [5/19]

const mysql_service_psi_mdl_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_mdl_v1   
)

◆ SERVICE_IMPLEMENTATION() [6/19]

const mysql_service_psi_mdl_v2_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_mdl_v2   
)

◆ SERVICE_IMPLEMENTATION() [7/19]

const mysql_service_psi_memory_v2_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_memory_v2   
)

◆ SERVICE_IMPLEMENTATION() [8/19]

const mysql_service_psi_mutex_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_mutex_v1   
)

◆ SERVICE_IMPLEMENTATION() [9/19]

const mysql_service_psi_rwlock_v2_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_rwlock_v2   
)

◆ SERVICE_IMPLEMENTATION() [10/19]

const mysql_service_psi_socket_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_socket_v1   
)

◆ SERVICE_IMPLEMENTATION() [11/19]

const mysql_service_psi_stage_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_stage_v1   
)

◆ SERVICE_IMPLEMENTATION() [12/19]

const mysql_service_psi_statement_v5_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_statement_v5   
)

◆ SERVICE_IMPLEMENTATION() [13/19]

const mysql_service_psi_table_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_table_v1   
)

◆ SERVICE_IMPLEMENTATION() [14/19]

const mysql_service_psi_thread_v4_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_thread_v4   
)

◆ SERVICE_IMPLEMENTATION() [15/19]

const mysql_service_psi_thread_v5_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_thread_v5   
)

◆ SERVICE_IMPLEMENTATION() [16/19]

const mysql_service_psi_thread_v6_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_thread_v6   
)

◆ SERVICE_IMPLEMENTATION() [17/19]

const mysql_service_psi_thread_v7_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_thread_v7   
)

◆ SERVICE_IMPLEMENTATION() [18/19]

const mysql_service_psi_tls_channel_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_tls_channel_v1   
)

◆ SERVICE_IMPLEMENTATION() [19/19]

const mysql_service_psi_transaction_v1_t SERVICE_IMPLEMENTATION ( performance_schema  ,
psi_transaction_v1   
)

◆ set_thread_resource_group()

int set_thread_resource_group ( PFS_thread pfs,
const char *  group_name,
int  group_name_len,
void *  user_data 
)

Set the resource group name for a given thread.

Parameters
pfsThread instrumentation
group_nameGroup name
group_name_lenLength of group_name
user_dataOptional pointer to user-defined data
Returns
0 if successful, 1 otherwise

◆ sp_type_to_object_type()

static enum_object_type sp_type_to_object_type ( uint  sp_type)
inlinestatic

Variable Documentation

◆ cond_operation_map

enum_operation_type cond_operation_map[]
static
Initial value:
@ OPERATION_TYPE_WAIT
Definition: pfs_column_types.h:154
@ OPERATION_TYPE_TIMEDWAIT
Definition: pfs_column_types.h:155

Conversion map from PSI_cond_operation to enum_operation_type.

Indexed by enum PSI_cond_operation.

◆ file_operation_map

enum_operation_type file_operation_map[]
static
Initial value:
= {
@ OPERATION_TYPE_FILESTAT
Definition: pfs_column_types.h:169
@ OPERATION_TYPE_FILEDELETE
Definition: pfs_column_types.h:172
@ OPERATION_TYPE_FILESYNC
Definition: pfs_column_types.h:174
@ OPERATION_TYPE_FILECREATETMP
Definition: pfs_column_types.h:159
@ OPERATION_TYPE_FILECHSIZE
Definition: pfs_column_types.h:171
@ OPERATION_TYPE_FILEREAD
Definition: pfs_column_types.h:164
@ OPERATION_TYPE_FILERENAME
Definition: pfs_column_types.h:173
@ OPERATION_TYPE_FILECLOSE
Definition: pfs_column_types.h:162
@ OPERATION_TYPE_FILEWRITE
Definition: pfs_column_types.h:165
@ OPERATION_TYPE_FILETELL
Definition: pfs_column_types.h:167
@ OPERATION_TYPE_FILEFLUSH
Definition: pfs_column_types.h:168
@ OPERATION_TYPE_FILESTREAMOPEN
Definition: pfs_column_types.h:161
@ OPERATION_TYPE_FILEFSTAT
Definition: pfs_column_types.h:170
@ OPERATION_TYPE_FILESEEK
Definition: pfs_column_types.h:166
@ OPERATION_TYPE_FILECREATE
Definition: pfs_column_types.h:158
@ OPERATION_TYPE_FILEOPEN
Definition: pfs_column_types.h:160
@ OPERATION_TYPE_FILESTREAMCLOSE
Definition: pfs_column_types.h:163

Conversion map from PSI_file_operation to enum_operation_type.

Indexed by enum PSI_file_operation.

◆ g_data_lock_inspector

Initial value:
=
{nullptr}

◆ g_data_lock_inspector_count

unsigned int g_data_lock_inspector_count = 0

◆ main_thread_id

my_thread_t main_thread_id
static

◆ mutex_operation_map

enum_operation_type mutex_operation_map[]
static
Initial value:
@ OPERATION_TYPE_TRYLOCK
Definition: pfs_column_types.h:133
@ OPERATION_TYPE_LOCK
Definition: pfs_column_types.h:132

Conversion map from PSI_mutex_operation to enum_operation_type.

Indexed by enum PSI_mutex_operation.

◆ pfs_cond_bootstrap

struct PSI_cond_bootstrap pfs_cond_bootstrap = {get_cond_interface}

Entry point to the performance schema implementation.

This singleton is used to discover the performance schema services.

◆ pfs_cond_service_v1

PSI_cond_service_v1 pfs_cond_service_v1
Initial value:
= {
PSI_cond * pfs_init_cond_v1(PSI_cond_key key, const void *identity)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:2718
void pfs_destroy_cond_v1(PSI_cond *cond)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:2738
void pfs_end_cond_wait_v1(PSI_cond_locker *locker, int)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:5318
void pfs_signal_cond_v1(PSI_cond *cond)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:4931
PSI_cond_locker * pfs_start_cond_wait_v1(PSI_cond_locker_state *state, PSI_cond *cond, PSI_mutex *mutex, PSI_cond_operation op, const char *src_file, uint src_line)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:3995
void pfs_register_cond_v1(const char *category, PSI_cond_info_v1 *info, int count)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:2524
void pfs_broadcast_cond_v1(PSI_cond *cond)
Implementation of the cond instrumentation interface.
Definition: pfs.cc:4945

◆ pfs_data_lock_bootstrap

struct PSI_data_lock_bootstrap pfs_data_lock_bootstrap
Initial value:
= {
static void * get_data_lock_interface(int version)
Definition: pfs.cc:9882

◆ pfs_data_lock_service_v1

PSI_data_lock_service_v1 pfs_data_lock_service_v1
Initial value:
= {
void pfs_unregister_data_lock_v1(PSI_engine_data_lock_inspector *)
Definition: pfs.cc:9013
void pfs_register_data_lock_v1(PSI_engine_data_lock_inspector *inspector)
Definition: pfs.cc:9006

◆ pfs_error_bootstrap

struct PSI_error_bootstrap pfs_error_bootstrap = {get_error_interface}

◆ pfs_error_service_v1

PSI_error_service_v1 pfs_error_service_v1
Initial value:
= {
void pfs_log_error_v1(uint error_num, PSI_error_operation error_operation)
Definition: pfs.cc:8955

◆ pfs_file_bootstrap

struct PSI_file_bootstrap pfs_file_bootstrap = {get_file_interface}

◆ pfs_file_service_v2

PSI_file_service_v2 pfs_file_service_v2
Initial value:
= {
void pfs_create_file_vc(PSI_file_key key, const char *name, File file)
Implementation of the file instrumentation interface.
Definition: pfs.cc:2959
void pfs_start_file_close_wait_vc(PSI_file_locker *locker, const char *src_file, uint src_line)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5774
PSI_file_locker * pfs_get_thread_file_name_locker_vc(PSI_file_locker_state *state, PSI_file_key key, PSI_file_operation op, const char *name, const void *)
Implementation of the file instrumentation interface.
Definition: pfs.cc:4353
void pfs_end_file_close_wait_vc(PSI_file_locker *locker, int rc)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5799
PSI_file_locker * pfs_get_thread_file_descriptor_locker_vc(PSI_file_locker_state *state, File file, PSI_file_operation op)
Implementation of the file instrumentation interface.
Definition: pfs.cc:4560
void pfs_end_file_open_wait_and_bind_to_descriptor_vc(PSI_file_locker *locker, File file)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5584
PSI_file * pfs_end_file_open_wait_vc(PSI_file_locker *locker, void *result)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5549
void pfs_end_file_rename_wait_vc(PSI_file_locker *locker, const char *old_name, const char *new_name, int rc)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5867
void pfs_start_file_wait_vc(PSI_file_locker *locker, size_t count, const char *src_file, uint src_line)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5638
void pfs_end_temp_file_open_wait_and_bind_to_descriptor_vc(PSI_file_locker *locker, File file, const char *filename)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5618
void pfs_register_file_vc(const char *category, PSI_file_info_v1 *info, int count)
Implementation of the file instrumentation interface.
Definition: pfs.cc:2568
PSI_file_locker * pfs_get_thread_file_stream_locker_vc(PSI_file_locker_state *state, PSI_file *file, PSI_file_operation op)
Implementation of the file instrumentation interface.
Definition: pfs.cc:4463
void pfs_start_file_open_wait_vc(PSI_file_locker *locker, const char *src_file, uint src_line)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5540
void pfs_end_file_wait_vc(PSI_file_locker *locker, size_t count)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5666
void pfs_start_file_rename_wait_vc(PSI_file_locker *locker, size_t count, const char *old_name, const char *new_name, const char *src_file, uint src_line)
Implementation of the file instrumentation interface.
Definition: pfs.cc:5844

◆ pfs_idle_bootstrap

struct PSI_idle_bootstrap pfs_idle_bootstrap = {get_idle_interface}

◆ pfs_idle_service_v1

PSI_idle_service_v1 pfs_idle_service_v1
Initial value:
= {
PSI_idle_locker * pfs_start_idle_wait_v1(PSI_idle_locker_state *state, const char *src_file, uint src_line)
Implementation of the idle instrumentation interface.
Definition: pfs.cc:4959
void pfs_end_idle_wait_v1(PSI_idle_locker *locker)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:5041

◆ pfs_mdl_bootstrap

struct PSI_mdl_bootstrap pfs_mdl_bootstrap = {get_mdl_interface}

◆ pfs_mdl_service_v1

PSI_mdl_service_v1 pfs_mdl_service_v1
Initial value:
= {
void pfs_destroy_metadata_lock_vc(PSI_metadata_lock *lock)
Definition: pfs.cc:8811
PSI_metadata_lock * pfs_create_metadata_lock_vc(void *identity, const MDL_key *mdl_key, opaque_mdl_type mdl_type, opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status, const char *src_file, uint src_line)
Definition: pfs.cc:8768
PSI_metadata_locker * pfs_start_metadata_wait_vc(PSI_metadata_locker_state *state, PSI_metadata_lock *lock, const char *src_file, uint src_line)
Definition: pfs.cc:8817
void pfs_set_metadata_lock_status_vc(PSI_metadata_lock *lock, opaque_mdl_status mdl_status)
Definition: pfs.cc:8797
void pfs_end_metadata_wait_vc(PSI_metadata_locker *locker, int)
Definition: pfs.cc:8900

◆ pfs_mdl_service_v2

PSI_mdl_service_v2 pfs_mdl_service_v2
Initial value:
= {
void pfs_set_metadata_lock_duration_vc(PSI_metadata_lock *lock, opaque_mdl_duration mdl_duration)
Definition: pfs.cc:8804

◆ pfs_memory_bootstrap

struct PSI_memory_bootstrap pfs_memory_bootstrap = {get_memory_interface}

◆ pfs_memory_service_v2

PSI_memory_service_v2 pfs_memory_service_v2
Initial value:
= {
PSI_memory_key pfs_memory_realloc_vc(PSI_memory_key key, size_t old_size, size_t new_size, PSI_thread **owner)
Definition: pfs.cc:8457
PSI_memory_key pfs_memory_claim_vc(PSI_memory_key key, size_t size, PSI_thread **owner, bool claim)
Definition: pfs.cc:8534
void pfs_register_memory_vc(const char *category, PSI_memory_info_v1 *info, int count)
Definition: pfs.cc:8364
PSI_memory_key pfs_memory_alloc_vc(PSI_memory_key key, size_t size, PSI_thread **owner)
Definition: pfs.cc:8370
void pfs_memory_free_vc(PSI_memory_key key, size_t size, PSI_thread *owner)
Definition: pfs.cc:8688

◆ pfs_metric_bootstrap

struct PSI_metric_bootstrap pfs_metric_bootstrap = {get_metric_interface}

◆ pfs_metric_service_v1

PSI_metric_service_v1 pfs_metric_service_v1
Initial value:
= {
void pfs_unregister_change_notification_v1(meter_registration_changes_v1_t callback)
Definition: pfs_metrics_service_imp.cc:474
void pfs_register_change_notification_v1(meter_registration_changes_v1_t callback)
Definition: pfs_metrics_service_imp.cc:464
void pfs_unregister_meters_v1(PSI_meter_info_v1 *info, size_t count)
Definition: pfs_metrics_service_imp.cc:430
void pfs_register_meters_v1(PSI_meter_info_v1 *info, size_t count)
Definition: pfs_metrics_service_imp.cc:323
void pfs_send_change_notification_v1(const char *meter, MeterNotifyType change)
Definition: pfs_metrics_service_imp.cc:484

◆ pfs_mutex_bootstrap

struct PSI_mutex_bootstrap pfs_mutex_bootstrap = {get_mutex_interface}

◆ pfs_mutex_service_v1

PSI_mutex_service_v1 pfs_mutex_service_v1
Initial value:
= {
void pfs_destroy_mutex_v1(PSI_mutex *mutex)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:2674
void pfs_end_mutex_wait_v1(PSI_mutex_locker *locker, int rc)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:5099
void pfs_register_mutex_v1(const char *category, PSI_mutex_info_v1 *info, int count)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:2439
PSI_mutex * pfs_init_mutex_v1(PSI_mutex_key key, const void *identity)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:2654
void pfs_unlock_mutex_v1(PSI_mutex *mutex)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:4807
PSI_mutex_locker * pfs_start_mutex_wait_v1(PSI_mutex_locker_state *state, PSI_mutex *mutex, PSI_mutex_operation op, const char *src_file, uint src_line)
Implementation of the mutex instrumentation interface.
Definition: pfs.cc:3769

◆ pfs_rwlock_bootstrap

struct PSI_rwlock_bootstrap pfs_rwlock_bootstrap = {get_rwlock_interface}

◆ pfs_rwlock_service_v2

PSI_rwlock_service_v2 pfs_rwlock_service_v2
Initial value:
= {
void pfs_end_rwlock_wrwait_v2(PSI_rwlock_locker *locker, int rc)
Implementation of the rwlock instrumentation interface.
Definition: pfs.cc:5244
PSI_rwlock_locker * pfs_start_rwlock_wrwait_v2(PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line)
Definition: pfs.cc:3977
void pfs_end_rwlock_rdwait_v2(PSI_rwlock_locker *locker, int rc)
Implementation of the rwlock instrumentation interface.
Definition: pfs.cc:5168
void pfs_destroy_rwlock_v2(PSI_rwlock *rwlock)
Implementation of the rwlock instrumentation interface.
Definition: pfs.cc:2706
PSI_rwlock_locker * pfs_start_rwlock_rdwait_v2(PSI_rwlock_locker_state *state, PSI_rwlock *rwlock, PSI_rwlock_operation op, const char *src_file, uint src_line)
Definition: pfs.cc:3966
void pfs_register_rwlock_v2(const char *category, PSI_rwlock_info_v1 *info, int count)
Implementation of the rwlock instrumentation interface.
Definition: pfs.cc:2449
PSI_rwlock * pfs_init_rwlock_v2(PSI_rwlock_key key, const void *identity)
Implementation of the rwlock instrumentation interface.
Definition: pfs.cc:2686
void pfs_unlock_rwlock_v2(PSI_rwlock *rwlock, PSI_rwlock_operation op)
Implementation of the rwlock instrumentation interface.
Definition: pfs.cc:4851

◆ pfs_socket_bootstrap

struct PSI_socket_bootstrap pfs_socket_bootstrap = {get_socket_interface}

◆ pfs_socket_service_v1

PSI_socket_service_v1 pfs_socket_service_v1
Initial value:
= {
void pfs_set_socket_info_v1(PSI_socket *socket, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len)
Set socket descriptor and address info.
Definition: pfs.cc:8041
PSI_socket * pfs_init_socket_v1(PSI_socket_key key, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len)
Definition: pfs.cc:2929
void pfs_end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count)
Implementation of the socket instrumentation interface.
Definition: pfs.cc:7950
void pfs_register_socket_v1(const char *category, PSI_socket_info_v1 *info, int count)
Definition: pfs.cc:2644
void pfs_set_socket_thread_owner_v1(PSI_socket *socket)
Implementation of the socket instrumentation interface.
Definition: pfs.cc:8064
PSI_socket_locker * pfs_start_socket_wait_v1(PSI_socket_locker_state *state, PSI_socket *socket, PSI_socket_operation op, size_t count, const char *src_file, uint src_line)
Socket locker.
Definition: pfs.cc:4688
void pfs_set_socket_state_v1(PSI_socket *socket, PSI_socket_state state)
Definition: pfs.cc:8028
void pfs_destroy_socket_v1(PSI_socket *socket)
Definition: pfs.cc:2947

◆ pfs_stage_bootstrap

struct PSI_stage_bootstrap pfs_stage_bootstrap = {get_stage_interface}

◆ pfs_stage_service_v1

PSI_stage_service_v1 pfs_stage_service_v1
Initial value:
= {
void pfs_register_stage_v1(const char *category, PSI_stage_info_v1 **info_array, int count)
Definition: pfs.cc:2573
PSI_stage_progress * pfs_start_stage_v1(PSI_stage_key key, const char *src_file, int src_line)
Definition: pfs.cc:5891
PSI_stage_progress * pfs_get_current_stage_progress_v1()
Definition: pfs.cc:6003
void pfs_end_stage_v1()
Definition: pfs.cc:6012

◆ pfs_statement_bootstrap

struct PSI_statement_bootstrap pfs_statement_bootstrap
Initial value:
= {
static void * get_statement_interface(int version)
Definition: pfs.cc:9806

◆ pfs_statement_service_v5

PSI_statement_service_v5 pfs_statement_service_v5

◆ pfs_system_bootstrap

struct PSI_system_bootstrap pfs_system_bootstrap = {get_system_interface}

◆ pfs_system_service_v1

PSI_system_service_v1 pfs_system_service_v1
Initial value:
= {
void pfs_unload_plugin_v1(const char *plugin_name)
Implementation of the thread instrumentation interface.
Definition: pfs.cc:9035

Implementation of the instrumentation interface.

See also
PSI_system_service_v1

◆ pfs_table_bootstrap

struct PSI_table_bootstrap pfs_table_bootstrap = {get_table_interface}

◆ pfs_table_service_v1

PSI_table_service_v1 pfs_table_service_v1
Initial value:
= {
void pfs_end_table_io_wait_v1(PSI_table_locker *locker, ulonglong numrows)
Implementation of the table instrumentation interface.
Definition: pfs.cc:5377
PSI_table_share * pfs_get_table_share_v1(bool temporary, TABLE_SHARE *share)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2750
void pfs_end_table_lock_wait_v1(PSI_table_locker *locker)
Implementation of the table instrumentation interface.
Definition: pfs.cc:5469
void pfs_drop_table_share_v1(bool temporary, const char *schema_name, int schema_name_length, const char *table_name, int table_name_length)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2783
void pfs_release_table_share_v1(PSI_table_share *share)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2769
PSI_table * pfs_rebind_table_v1(PSI_table_share *share, const void *identity, PSI_table *table)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2854
void pfs_unbind_table_v1(PSI_table *table)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2842
void pfs_unlock_table_v1(PSI_table *table)
Definition: pfs.cc:8760
PSI_table_locker * pfs_start_table_io_wait_v1(PSI_table_locker_state *state, PSI_table *table, PSI_table_io_operation op, uint index, const char *src_file, uint src_line)
Implementation of the table instrumentation interface.
Definition: pfs.cc:4138
PSI_table * pfs_open_table_v1(PSI_table_share *share, const void *identity)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2803
void pfs_close_table_v1(TABLE_SHARE *server_share, PSI_table *table)
Implementation of the table instrumentation interface.
Definition: pfs.cc:2920
PSI_table_locker * pfs_start_table_lock_wait_v1(PSI_table_locker_state *state, PSI_table *table, PSI_table_lock_operation op, ulong op_flags, const char *src_file, uint src_line)
Implementation of the table instrumentation interface.
Definition: pfs.cc:4232

◆ pfs_thread_bootstrap

struct PSI_thread_bootstrap pfs_thread_bootstrap = {get_thread_interface}

◆ pfs_thread_service_v4

PSI_thread_service_v4 pfs_thread_service_v4

Implementation of the instrumentation interface.

See also
PSI_thread_service_v4

◆ pfs_thread_service_v5

PSI_thread_service_v5 pfs_thread_service_v5

Implementation of the instrumentation interface.

See also
PSI_thread_service_v5

◆ pfs_thread_service_v6

PSI_thread_service_v6 pfs_thread_service_v6

Implementation of the instrumentation interface.

See also
PSI_thread_service_v6

◆ pfs_thread_service_v7

PSI_thread_service_v7 pfs_thread_service_v7

Implementation of the instrumentation interface.

See also
PSI_thread_service_v7

◆ pfs_tls_channel_bootstrap

struct PSI_tls_channel_bootstrap pfs_tls_channel_bootstrap
Initial value:
= {
static void * get_tls_channel_interface(int version)
Definition: pfs.cc:9891

◆ pfs_tls_channel_service_v1

PSI_tls_channel_service_v1 pfs_tls_channel_service_v1
Initial value:
= {
void pfs_register_tls_channel_v1(TLS_channel_property_iterator *provider)
Definition: pfs_tls_channel.cc:223
void pfs_unregister_tls_channel_v1(TLS_channel_property_iterator *provider)
Definition: pfs_tls_channel.cc:237

◆ pfs_transaction_bootstrap

struct PSI_transaction_bootstrap pfs_transaction_bootstrap
Initial value:
= {
static void * get_transaction_interface(int version)
Definition: pfs.cc:9855

◆ pfs_transaction_service_v1

PSI_transaction_service_v1 pfs_transaction_service_v1
Initial value:
= {
void pfs_set_transaction_xa_state_v1(PSI_transaction_locker *locker, int xa_state)
Definition: pfs.cc:7806
void pfs_inc_transaction_rollback_to_savepoint_v1(PSI_transaction_locker *locker, ulong count)
Definition: pfs.cc:7858
void pfs_end_transaction_v1(PSI_transaction_locker *locker, bool commit)
Definition: pfs.cc:7868
void pfs_set_transaction_trxid_v1(PSI_transaction_locker *locker, const ulonglong *trxid)
Definition: pfs.cc:7821
void pfs_start_transaction_v1(PSI_transaction_locker *locker, const char *src_file, uint src_line)
Definition: pfs.cc:7745
void pfs_set_transaction_gtid_v1(PSI_transaction_locker *locker, const void *sid, const void *gtid_spec)
Definition: pfs.cc:7772
void pfs_set_transaction_xid_v1(PSI_transaction_locker *locker, const void *xid, int xa_state)
Definition: pfs.cc:7789
void pfs_inc_transaction_savepoints_v1(PSI_transaction_locker *locker, ulong count)
Definition: pfs.cc:7853
void pfs_inc_transaction_release_savepoint_v1(PSI_transaction_locker *locker, ulong count)
Definition: pfs.cc:7863
PSI_transaction_locker * pfs_get_thread_transaction_locker_v1(PSI_transaction_locker_state *state, const void *xid, const ulonglong *trxid, int isolation_level, bool read_only, bool autocommit)
Definition: pfs.cc:7655

◆ rwlock_operation_map

enum_operation_type rwlock_operation_map[]
static
Initial value:
= {
@ OPERATION_TYPE_TRYSHAREDLOCK
Definition: pfs_column_types.h:146
@ OPERATION_TYPE_TRYWRITELOCK
Definition: pfs_column_types.h:139
@ OPERATION_TYPE_EXCLUSIVEUNLOCK
Definition: pfs_column_types.h:151
@ OPERATION_TYPE_SHAREDLOCK
Definition: pfs_column_types.h:143
@ OPERATION_TYPE_TRYREADLOCK
Definition: pfs_column_types.h:138
@ OPERATION_TYPE_UNLOCK
Definition: pfs_column_types.h:140
@ OPERATION_TYPE_READLOCK
Definition: pfs_column_types.h:136
@ OPERATION_TYPE_TRYEXCLUSIVELOCK
Definition: pfs_column_types.h:148
@ OPERATION_TYPE_TRYSHAREDEXCLUSIVELOCK
Definition: pfs_column_types.h:147
@ OPERATION_TYPE_SHAREDEXCLUSIVELOCK
Definition: pfs_column_types.h:144
@ OPERATION_TYPE_SHAREDEXCLUSIVEUNLOCK
Definition: pfs_column_types.h:150
@ OPERATION_TYPE_WRITELOCK
Definition: pfs_column_types.h:137
@ OPERATION_TYPE_SHAREDUNLOCK
Definition: pfs_column_types.h:149
@ OPERATION_TYPE_EXCLUSIVELOCK
Definition: pfs_column_types.h:145

Conversion map from PSI_rwlock_operation to enum_operation_type.

Indexed by enum PSI_rwlock_operation.

◆ SERVICE_IMPLEMENTATION

const mysql_service_psi_tls_channel_v1_t SERVICE_IMPLEMENTATION(performance_schema, psi_tls_channel_v1) ( performance_schema  ,
psi_system_v1   
)
Initial value:

◆ services

void* services[]
static

◆ socket_operation_map

enum_operation_type socket_operation_map[]
static
Initial value:
= {
@ OPERATION_TYPE_SOCKETSHUTDOWN
Definition: pfs_column_types.h:208
@ OPERATION_TYPE_SOCKETSELECT
Definition: pfs_column_types.h:209
@ OPERATION_TYPE_SOCKETCONNECT
Definition: pfs_column_types.h:196
@ OPERATION_TYPE_SOCKETSTAT
Definition: pfs_column_types.h:207
@ OPERATION_TYPE_SOCKETCREATE
Definition: pfs_column_types.h:195
@ OPERATION_TYPE_SOCKETRECVFROM
Definition: pfs_column_types.h:202
@ OPERATION_TYPE_SOCKETRECV
Definition: pfs_column_types.h:200
@ OPERATION_TYPE_SOCKETSENDTO
Definition: pfs_column_types.h:201
@ OPERATION_TYPE_SOCKETOPT
Definition: pfs_column_types.h:206
@ OPERATION_TYPE_SOCKETSEND
Definition: pfs_column_types.h:199
@ OPERATION_TYPE_SOCKETSENDMSG
Definition: pfs_column_types.h:203
@ OPERATION_TYPE_SOCKETBIND
Definition: pfs_column_types.h:197
@ OPERATION_TYPE_SOCKETRECVMSG
Definition: pfs_column_types.h:204
@ OPERATION_TYPE_SOCKETCLOSE
Definition: pfs_column_types.h:198
@ OPERATION_TYPE_SOCKETSEEK
Definition: pfs_column_types.h:205

Conversion map from PSI_socket_operation to enum_operation_type.

Indexed by enum PSI_socket_operation.

◆ STATE_FLAG_STATEMENT_TELEMETRY

constexpr uint STATE_FLAG_STATEMENT_TELEMETRY
staticconstexpr
Initial value:
=
#define STATE_FLAG_DIGEST
DIGEST bit in the state flags bitfield.
Definition: pfs_events_waits.h:121
#define STATE_FLAG_CPU
CPU bit in the state flags bitfield.
Definition: pfs_events_waits.h:123
#define STATE_FLAG_THREAD
THREAD bit in the state flags bitfield.
Definition: pfs_events_waits.h:117
#define STATE_FLAG_BASE
BASE bit in the state flags bitfield.
Definition: pfs_events_waits.h:125
#define STATE_FLAG_TIMED
TIMED bit in the state flags bitfield.
Definition: pfs_events_waits.h:115

◆ table_io_operation_map

enum_operation_type table_io_operation_map[]
static
Initial value:
= {
@ OPERATION_TYPE_TABLE_DELETE_ROW
Definition: pfs_column_types.h:180
@ OPERATION_TYPE_TABLE_UPDATE_ROW
Definition: pfs_column_types.h:179
@ OPERATION_TYPE_TABLE_FETCH
Definition: pfs_column_types.h:177
@ OPERATION_TYPE_TABLE_WRITE_ROW
Definition: pfs_column_types.h:178

Conversion map from PSI_table_operation to enum_operation_type.

Indexed by enum PSI_table_io_operation.

◆ table_lock_operation_map

enum_operation_type table_lock_operation_map[]
static
Initial value:
= {
}
@ OPERATION_TYPE_TL_WRITE_CONCURRENT_INSERT
Definition: pfs_column_types.h:188
@ OPERATION_TYPE_TL_READ_EXTERNAL
Definition: pfs_column_types.h:191
@ OPERATION_TYPE_TL_WRITE_LOW_PRIORITY
Definition: pfs_column_types.h:189
@ OPERATION_TYPE_TL_WRITE_EXTERNAL
Definition: pfs_column_types.h:192
@ OPERATION_TYPE_TL_WRITE_ALLOW_WRITE
Definition: pfs_column_types.h:187
@ OPERATION_TYPE_TL_READ_NO_INSERTS
Definition: pfs_column_types.h:186
@ OPERATION_TYPE_TL_READ_HIGH_PRIORITY
Definition: pfs_column_types.h:185
@ OPERATION_TYPE_TL_READ_WITH_SHARED_LOCKS
Definition: pfs_column_types.h:184
@ OPERATION_TYPE_TL_READ_NORMAL
Definition: pfs_column_types.h:183
@ OPERATION_TYPE_TL_WRITE_NORMAL
Definition: pfs_column_types.h:190

Conversion map from enum PFS_TL_LOCK_TYPE to enum_operation_type.

Indexed by enum PFS_TL_LOCK_TYPE.

◆ THR_PFS

thread_local PFS_thread* THR_PFS = nullptr

Performance schema Thread Local Storage.