MySQL 8.4.2
Source Code Documentation
|
Classes | |
struct | PSI_socket |
Interface for an instrumented socket descriptor. More... | |
struct | PSI_socket_info_v1 |
Socket instrument information. More... | |
struct | PSI_socket_locker_state_v1 |
State data storage for start_socket_wait_v1_t . More... | |
struct | PSI_socket_bootstrap |
Entry point for the performance schema interface. More... | |
struct | PSI_socket_service_v1 |
Performance Schema Socket Interface, version 1. More... | |
Macros | |
#define | PSI_SOCKET_VERSION_1 1 |
Performance Schema Socket Interface number for version 1. More... | |
#define | PSI_CURRENT_SOCKET_VERSION 1 |
Performance Schema Socket Interface number for the most recent version. More... | |
#define | PSI_SOCKET_VERSION_1 1 |
Performance Schema Socket Interface number for version 1. More... | |
Typedefs | |
typedef unsigned int | PSI_socket_key |
Instrumented socket key. More... | |
typedef struct PSI_socket | PSI_socket |
typedef struct PSI_socket_locker | PSI_socket_locker |
typedef enum PSI_socket_state | PSI_socket_state |
typedef enum PSI_socket_operation | PSI_socket_operation |
typedef struct PSI_socket_info_v1 | PSI_socket_info_v1 |
typedef struct PSI_socket_locker_state_v1 | PSI_socket_locker_state_v1 |
typedef void(* | register_socket_v1_t) (const char *category, struct PSI_socket_info_v1 *info, int count) |
Socket registration API. More... | |
typedef struct PSI_socket *(* | init_socket_v1_t) (PSI_socket_key key, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len) |
Socket instrumentation initialisation API. More... | |
typedef void(* | destroy_socket_v1_t) (struct PSI_socket *socket) |
socket instrumentation destruction API. More... | |
typedef struct PSI_socket_locker *(* | start_socket_wait_v1_t) (struct PSI_socket_locker_state_v1 *state, struct PSI_socket *socket, enum PSI_socket_operation op, size_t count, const char *src_file, unsigned int src_line) |
Record a socket instrumentation start event. More... | |
typedef void(* | end_socket_wait_v1_t) (struct PSI_socket_locker *locker, size_t count) |
Record a socket instrumentation end event. More... | |
typedef void(* | set_socket_state_v1_t) (struct PSI_socket *socket, enum PSI_socket_state state) |
Set the socket state for an instrumented socket. More... | |
typedef void(* | set_socket_info_v1_t) (struct PSI_socket *socket, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len) |
Set the socket info for an instrumented socket. More... | |
typedef void(* | set_socket_thread_owner_v1_t) (struct PSI_socket *socket) |
Bind a socket to the thread that owns it. More... | |
typedef struct PSI_socket_info_v1 | PSI_socket_info |
typedef struct PSI_socket_locker_state_v1 | PSI_socket_locker_state |
typedef struct PSI_socket_bootstrap | PSI_socket_bootstrap |
typedef struct PSI_socket_service_v1 | PSI_socket_service_t |
Enumerations | |
enum | PSI_socket_state { PSI_SOCKET_STATE_IDLE = 1 , PSI_SOCKET_STATE_ACTIVE = 2 } |
State of an instrumented socket. More... | |
enum | PSI_socket_operation { PSI_SOCKET_CREATE = 0 , PSI_SOCKET_CONNECT = 1 , PSI_SOCKET_BIND = 2 , PSI_SOCKET_CLOSE = 3 , PSI_SOCKET_SEND = 4 , PSI_SOCKET_RECV = 5 , PSI_SOCKET_SENDTO = 6 , PSI_SOCKET_RECVFROM = 7 , PSI_SOCKET_SENDMSG = 8 , PSI_SOCKET_RECVMSG = 9 , PSI_SOCKET_SEEK = 10 , PSI_SOCKET_OPT = 11 , PSI_SOCKET_STAT = 12 , PSI_SOCKET_SHUTDOWN = 13 , PSI_SOCKET_SELECT = 14 } |
Operation performed on an instrumented socket. More... | |
Variables | |
MYSQL_PLUGIN_IMPORT PSI_socket_service_t * | psi_socket_service |
#define PSI_CURRENT_SOCKET_VERSION 1 |
Performance Schema Socket Interface number for the most recent version.
The most current version is PSI_SOCKET_VERSION_1
#define PSI_SOCKET_VERSION_1 1 |
Performance Schema Socket Interface number for version 1.
This version is supported.
#define PSI_SOCKET_VERSION_1 1 |
Performance Schema Socket Interface number for version 1.
This version is supported.
typedef void(* destroy_socket_v1_t) (struct PSI_socket *socket) |
socket instrumentation destruction API.
socket | the socket to destroy |
typedef void(* end_socket_wait_v1_t) (struct PSI_socket_locker *locker, size_t count) |
Record a socket instrumentation end event.
Note that for socket close operations, the instrumented socket handle associated with the socket (which was provided to obtain a locker) is invalid after this call.
locker | a socket locker for the running thread |
count | the number of bytes actually used in the operation, or 0 if not applicable, or -1 if the operation failed |
typedef struct PSI_socket *(* init_socket_v1_t) (PSI_socket_key key, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len) |
Socket instrumentation initialisation API.
key | the registered socket key |
fd | socket file descriptor |
addr | the socket ip address |
addr_len | length of socket ip address |
typedef struct PSI_socket PSI_socket |
typedef struct PSI_socket_bootstrap PSI_socket_bootstrap |
typedef struct PSI_socket_info_v1 PSI_socket_info |
typedef struct PSI_socket_info_v1 PSI_socket_info_v1 |
typedef unsigned int PSI_socket_key |
Instrumented socket key.
To instrument a socket, a socket key must be obtained using register_socket
. Using a zero key always disable the instrumentation.
typedef struct PSI_socket_locker PSI_socket_locker |
typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state |
typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state_v1 |
typedef enum PSI_socket_operation PSI_socket_operation |
typedef struct PSI_socket_service_v1 PSI_socket_service_t |
typedef enum PSI_socket_state PSI_socket_state |
typedef void(* register_socket_v1_t) (const char *category, struct PSI_socket_info_v1 *info, int count) |
Socket registration API.
category | a category name (typically a plugin name) |
info | an array of socket info to register |
count | the size of the info array |
typedef void(* set_socket_info_v1_t) (struct PSI_socket *socket, const my_socket *fd, const struct sockaddr *addr, socklen_t addr_len) |
Set the socket info for an instrumented socket.
socket | the instrumented socket |
fd | the socket descriptor |
addr | the socket ip address |
addr_len | length of socket ip address |
typedef void(* set_socket_state_v1_t) (struct PSI_socket *socket, enum PSI_socket_state state) |
Set the socket state for an instrumented socket.
socket | the instrumented socket |
state | socket state |
typedef void(* set_socket_thread_owner_v1_t) (struct PSI_socket *socket) |
Bind a socket to the thread that owns it.
socket | instrumented socket |
typedef struct PSI_socket_locker *(* start_socket_wait_v1_t) (struct PSI_socket_locker_state_v1 *state, struct PSI_socket *socket, enum PSI_socket_operation op, size_t count, const char *src_file, unsigned int src_line) |
Record a socket instrumentation start event.
state | data storage for the locker |
socket | the instrumented socket |
op | socket operation to be performed |
count | the number of bytes requested, or 0 if not applicable |
src_file | the source file name |
src_line | the source line number |
enum PSI_socket_operation |
Operation performed on an instrumented socket.
enum PSI_socket_state |
|
extern |