24#ifndef COMPONENTS_SERVICES_BITS_PSI_SOCKET_BITS_H
25#define COMPONENTS_SERVICES_BITS_PSI_SOCKET_BITS_H
27#ifndef MYSQL_ABI_CHECK
56#define PSI_SOCKET_VERSION_1 1
63#define PSI_CURRENT_SOCKET_VERSION 1
224 unsigned int src_line);
void(* register_socket_v1_t)(const char *category, struct PSI_socket_info_v1 *info, int count)
Socket registration API.
Definition: psi_socket_bits.h:188
PSI_socket_operation
Operation performed on an instrumented socket.
Definition: psi_socket_bits.h:89
struct PSI_socket_locker PSI_socket_locker
Definition: psi_socket_bits.h:77
PSI_socket_state
State of an instrumented socket.
Definition: psi_socket_bits.h:80
void(* set_socket_state_v1_t)(struct PSI_socket *socket, enum PSI_socket_state state)
Set the socket state for an instrumented socket.
Definition: psi_socket_bits.h:244
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.
Definition: psi_socket_bits.h:254
void(* destroy_socket_v1_t)(struct PSI_socket *socket)
socket instrumentation destruction API.
Definition: psi_socket_bits.h:209
unsigned int PSI_socket_key
Instrumented socket key.
Definition: psi_socket_bits.h:49
void(* set_socket_thread_owner_v1_t)(struct PSI_socket *socket)
Bind a socket to the thread that owns it.
Definition: psi_socket_bits.h:263
void(* end_socket_wait_v1_t)(struct PSI_socket_locker *locker, size_t count)
Record a socket instrumentation end event.
Definition: psi_socket_bits.h:236
@ PSI_SOCKET_CLOSE
Socket close, as in shutdown().
Definition: psi_socket_bits.h:97
@ PSI_SOCKET_RECVMSG
Socket receive, recvmsg().
Definition: psi_socket_bits.h:109
@ PSI_SOCKET_STAT
Socket status, as in sockatmark() and isfdtype().
Definition: psi_socket_bits.h:115
@ PSI_SOCKET_SEND
Socket send, send().
Definition: psi_socket_bits.h:99
@ PSI_SOCKET_SENDMSG
Socket send, sendmsg().
Definition: psi_socket_bits.h:107
@ PSI_SOCKET_RECV
Socket receive, recv().
Definition: psi_socket_bits.h:101
@ PSI_SOCKET_BIND
Socket bind, as in bind(), getsockname() and getpeername().
Definition: psi_socket_bits.h:95
@ PSI_SOCKET_SEEK
Socket seek, such as fseek() or seek().
Definition: psi_socket_bits.h:111
@ PSI_SOCKET_CREATE
Socket creation, as in socket() or socketpair().
Definition: psi_socket_bits.h:91
@ PSI_SOCKET_CONNECT
Socket connection, as in connect(), listen() and accept().
Definition: psi_socket_bits.h:93
@ PSI_SOCKET_SENDTO
Socket send, sendto().
Definition: psi_socket_bits.h:103
@ PSI_SOCKET_SHUTDOWN
Socket shutdown, as in shutdown().
Definition: psi_socket_bits.h:117
@ PSI_SOCKET_RECVFROM
Socket receive, recvfrom).
Definition: psi_socket_bits.h:105
@ PSI_SOCKET_SELECT
Socket select, as in select() and poll().
Definition: psi_socket_bits.h:119
@ PSI_SOCKET_OPT
Socket options, as in getsockopt() and setsockopt().
Definition: psi_socket_bits.h:113
@ PSI_SOCKET_STATE_ACTIVE
Active, executing a command.
Definition: psi_socket_bits.h:84
@ PSI_SOCKET_STATE_IDLE
Idle, waiting for the next command.
Definition: psi_socket_bits.h:82
struct PSI_thread PSI_thread
Definition: psi_thread_bits.h:82
Types to make file and socket I/O compatible.
static int count
Definition: myisam_ftdump.cc:43
int my_socket
Definition: mysql.h:65
stdx::expected< native_handle_type, error_type > socket(int family, int sock_type, int protocol)
Definition: socket.h:63
static const char * category
Definition: sha2_password.cc:170
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
struct sockaddr sockaddr
Definition: sock_probe_win32.h:63
Instrumented artifact.
Definition: psi_bits.h:177
Socket instrument information.
Definition: psi_socket_bits.h:128
int m_volatility
Volatility index.
Definition: psi_socket_bits.h:143
PSI_socket_key * m_key
Pointer to the key assigned to the registered socket.
Definition: psi_socket_bits.h:132
const char * m_documentation
Documentation.
Definition: psi_socket_bits.h:145
const char * m_name
The name of the socket instrument to register.
Definition: psi_socket_bits.h:136
unsigned int m_flags
The flags of the socket instrument to register.
Definition: psi_socket_bits.h:141
State data storage for start_socket_wait_v1_t.
Definition: psi_socket_bits.h:158
unsigned long long m_timer_start
Timer start.
Definition: psi_socket_bits.h:168
enum PSI_socket_operation m_operation
Current operation.
Definition: psi_socket_bits.h:172
unsigned int m_flags
Internal state.
Definition: psi_socket_bits.h:160
struct PSI_socket * m_socket
Current socket.
Definition: psi_socket_bits.h:162
struct PSI_thread * m_thread
Current thread.
Definition: psi_socket_bits.h:164
const char * m_src_file
Source file.
Definition: psi_socket_bits.h:174
size_t m_number_of_bytes
Operation number of bytes.
Definition: psi_socket_bits.h:166
int m_src_line
Source line number.
Definition: psi_socket_bits.h:176
unsigned long long(* m_timer)(void)
Timer function.
Definition: psi_socket_bits.h:170
void * m_wait
Internal data.
Definition: psi_socket_bits.h:178
Interface for an instrumented socket descriptor.
Definition: psi_socket_bits.h:69