MySQL 9.1.0
Source Code Documentation
psi_thread_bits.h File Reference

Performance schema instrumentation interface. More...

Go to the source code of this file.

Classes

struct  PSI_thread_info_v1
 Thread instrument information. More...
 
struct  PSI_thread_info_v5
 Thread instrument information. More...
 
struct  PSI_thread_attrs_v3
 Performance Schema thread type: user/foreground or system/background. More...
 
struct  PSI_notification_v3
 Registration structure for the pfs_notification service. More...
 

Macros

#define PSI_USERNAME_LENGTH   (32 * 3)
 
#define PSI_NAME_LEN   (64 * 3)
 
#define PSI_HOSTNAME_LENGTH   (255)
 

Typedefs

typedef unsigned int PSI_thread_key
 Instrumented thread key. More...
 
typedef unsigned int PSI_thread_seqnum
 Instrumented thread sequence number. More...
 
typedef int opaque_vio_type
 
typedef struct PSI_thread PSI_thread
 
typedef struct PSI_thread_info_v1 PSI_thread_info_v1
 
typedef struct PSI_thread_info_v5 PSI_thread_info_v5
 
typedef void(* register_thread_v1_t) (const char *category, struct PSI_thread_info_v1 *info, int count)
 Thread registration API. More...
 
typedef void(* register_thread_v5_t) (const char *category, struct PSI_thread_info_v5 *info, int count)
 Thread registration API. More...
 
typedef int(* spawn_thread_v1_t) (PSI_thread_key key, my_thread_handle *thread, const my_thread_attr_t *attr, void *(*start_routine) (void *), void *arg)
 Spawn a thread. More...
 
typedef int(* spawn_thread_v5_t) (PSI_thread_key key, PSI_thread_seqnum seqnum, my_thread_handle *thread, const my_thread_attr_t *attr, void *(*start_routine) (void *), void *arg)
 
typedef struct PSI_thread *(* new_thread_v1_t) (PSI_thread_key key, const void *identity, unsigned long long thread_id)
 Create instrumentation for a thread. More...
 
typedef struct PSI_thread *(* new_thread_v5_t) (PSI_thread_key key, PSI_thread_seqnum seqnum, const void *identity, unsigned long long thread_id)
 
typedef void(* set_thread_THD_v1_t) (struct PSI_thread *thread, THD *thd)
 Assign a THD to an instrumented thread. More...
 
typedef void(* set_thread_id_v1_t) (struct PSI_thread *thread, unsigned long long id)
 Assign an id to an instrumented thread. More...
 
typedef unsigned long long(* get_current_thread_internal_id_v2_t) ()
 Read the THREAD_ID of the current thread. More...
 
typedef unsigned long long(* get_thread_internal_id_v2_t) (struct PSI_thread *thread)
 Read the THREAD_ID of an instrumented thread. More...
 
typedef struct PSI_thread *(* get_thread_by_id_v2_t) (unsigned long long processlist_id)
 Get the instrumentation for the thread of given PROCESSLIST_ID. More...
 
typedef void(* set_thread_os_id_v1_t) (struct PSI_thread *thread)
 Assign the current operating system thread id to an instrumented thread. More...
 
typedef struct PSI_thread *(* get_thread_v1_t) (void)
 Get the instrumentation for the running thread. More...
 
typedef void(* set_thread_user_v1_t) (const char *user, int user_len)
 Assign a user name to the instrumented thread. More...
 
typedef void(* set_thread_account_v1_t) (const char *user, int user_len, const char *host, int host_len)
 Assign a user name and host name to the instrumented thread. More...
 
typedef void(* set_thread_db_v1_t) (const char *db, int db_len)
 Assign a current database to the instrumented thread. More...
 
typedef void(* set_thread_command_v1_t) (int command)
 Assign a current command to the instrumented thread. More...
 
typedef void(* set_connection_type_v1_t) (opaque_vio_type conn_type)
 Assign a connection type to the instrumented thread. More...
 
typedef void(* set_thread_start_time_v1_t) (time_t start_time)
 Assign a start time to the instrumented thread. More...
 
typedef void(* set_thread_state_v1_t) (const char *state)
 Assign a state to the instrumented thread. More...
 
typedef void(* set_thread_info_v1_t) (const char *info, unsigned int info_len)
 Assign a process info to the instrumented thread. More...
 
typedef void(* set_thread_secondary_engine_v6_t) (bool secondary)
 Set a thread EXECUTION_ENGINE attribute. More...
 
typedef int(* set_thread_resource_group_v1_t) (const char *group_name, int group_name_len, void *user_data)
 Assign a resource group name to the current thread. More...
 
typedef int(* set_thread_resource_group_by_id_v1_t) (PSI_thread *thread, unsigned long long thread_id, const char *group_name, int group_name_len, void *user_data)
 Assign a resource group name to an instrumented thread, identified either by the thread instrumentation or Performance Schema thread id. More...
 
typedef void(* set_thread_v1_t) (struct PSI_thread *thread)
 Attach a thread instrumentation to the running thread. More...
 
typedef void(* set_thread_peer_port_v4_t) (PSI_thread *thread, unsigned int port)
 Assign the remote (peer) port to the instrumented thread. More...
 
typedef void(* aggregate_thread_status_v2_t) (struct PSI_thread *thread)
 Aggregate the thread status variables. More...
 
typedef void(* delete_current_thread_v1_t) (void)
 Delete the current thread instrumentation. More...
 
typedef void(* delete_thread_v1_t) (struct PSI_thread *thread)
 Delete a thread instrumentation. More...
 
typedef int(* set_thread_connect_attrs_v1_t) (const char *buffer, unsigned int length, const void *from_cs)
 Stores an array of connection attributes. More...
 
typedef void(* get_current_thread_event_id_v2_t) (unsigned long long *thread_internal_id, unsigned long long *event_id)
 Get the current thread current event. More...
 
typedef void(* get_thread_event_id_v1_t) (unsigned long long *thread_internal_id, unsigned long long *event_id)
 Get the thread current event. More...
 
typedef void(* get_thread_event_id_v2_t) (struct PSI_thread *psi, unsigned long long *thread_internal_id, unsigned long long *event_id)
 Get the thread current event. More...
 
typedef struct PSI_thread_attrs_v3 PSI_thread_attrs
 
typedef void(* PSI_notification_cb_v3) (const PSI_thread_attrs_v3 *thread_attrs)
 Callback for the pfs_notification service. More...
 
typedef struct PSI_notification_v3 PSI_notification
 
typedef int(* get_thread_system_attrs_v3_t) (PSI_thread_attrs_v3 *thread_attrs)
 Get system attributes for the current thread. More...
 
typedef int(* get_thread_system_attrs_by_id_v3_t) (PSI_thread *thread, unsigned long long thread_id, PSI_thread_attrs_v3 *thread_attrs)
 Get system attributes for an instrumented thread, identified either by the thread instrumentation or Performance Schema thread id. More...
 
typedef int(* register_notification_v3_t) (const PSI_notification_v3 *callbacks, bool with_ref_count)
 Register callback functions for the Notification service. More...
 
typedef int(* unregister_notification_v1_t) (int handle)
 Unregister callback functions for the Notification service. More...
 
typedef void(* notify_session_connect_v1_t) (PSI_thread *thread)
 Invoke the callback function registered for a session connect event. More...
 
typedef void(* notify_session_disconnect_v1_t) (PSI_thread *thread)
 Invoke the callback function registered for a session disconnect event. More...
 
typedef void(* notify_session_change_user_v1_t) (PSI_thread *thread)
 Invoke the callback function registered for a change user event. More...
 
typedef struct PSI_thread_info_v5 PSI_thread_info
 
typedef void(* thread_detect_telemetry_v7_t) (PSI_thread *thread)
 
typedef void(* thread_abort_telemetry_v7_t) (PSI_thread *thread)
 

Detailed Description

Performance schema instrumentation interface.