Instrumentation Interface
The Performance Schema instrumentation interface (PSI) that the server and plugins use to report locks, I/O, statements, and other events, with links to each instrumentation group.
Groups
Instrumentation helpers for metadata locks.
Instrumentation helpers for prepared statements.
Instrumentation helpers for stored programs.
Classes
Interface for an instrumented stage progress. This is a public structure, for efficiency.
State data storage for start_table_io_wait_v1_t, start_table_lock_wait_v1_t. This structure provide temporary storage to a table locker. The content of this structure is considered opaque, the fields are only hints of what an implementation of the psi interface can use. This memory is provided by the instrumented code for performance reasons. See also: start_table_io_wait_v1_t
Entry point for the performance schema interface.
Dummy structure, used to declare PSI_server when no instrumentation is available. The content does not matter, since PSI_server will be NULL.
Stage instrument information. Since: PSI_VERSION_1 This structure is used to register an instrumented stage.
Macros
Global flag. This flag indicate that an instrumentation point is a global variable, or a singleton.
Mutable flag. This flag indicate that an instrumentation point is a general placeholder, that can mutate into a more specific instrumentation point.
Stage progress flag. This flag apply to the stage instruments only. It indicates the instrumentation provides progress data.
Shared Exclusive flag. Indicates that rwlock support the shared exclusive state.
Transferable flag. This flag indicate that an instrumented object can be created by a thread and destroyed by another thread.
Volatility flag. This flag indicate that an instrumented object has a volatility (life cycle) comparable to the volatility of a session.
System thread flag. Indicates that the instrumented object exists on a system thread.
psi_likely
Defined in psi/psi.h:52
psi_unlikely
Defined in psi/psi.h:53
PSI_DYNAMIC_CALL
Defined in psi/psi.h:3030
USE_PSI_1
Defined in psi/psi_abi_v1.h:34
USE_PSI_2
Defined in psi/psi_abi_v2.h:34
HAVE_PSI_INTERFACE
Defined in psi/psi_abi_v2.h:35
MY_GLOBAL_INCLUDED
Defined in psi/psi_abi_v2.h:36
PSI_INSTRUMENT_ME
Defined in psi/psi_base.h:47
PSI_INSTRUMENT_MEM
Defined in psi/psi_base.h:48
PSI_NOT_INSTRUMENTED
Defined in psi/psi_base.h:50
PSI_FLAG_GLOBAL
Defined in psi/psi_base.h:57
Global flag. This flag indicate that an instrumentation point is a global variable, or a singleton.
PSI_FLAG_MUTABLE
Defined in psi/psi_base.h:64
Mutable flag. This flag indicate that an instrumentation point is a general placeholder, that can mutate into a more specific instrumentation point.
PSI_FLAG_THREAD
Defined in psi/psi_base.h:66
PSI_FLAG_STAGE_PROGRESS
Defined in psi/psi_base.h:73
Stage progress flag. This flag apply to the stage instruments only. It indicates the instrumentation provides progress data.
PSI_RWLOCK_FLAG_SX
Defined in psi/psi_base.h:79
Shared Exclusive flag. Indicates that rwlock support the shared exclusive state.
PSI_FLAG_TRANSFER
Defined in psi/psi_base.h:86
Transferable flag. This flag indicate that an instrumented object can be created by a thread and destroyed by another thread.
PSI_FLAG_VOLATILITY_SESSION
Defined in psi/psi_base.h:94
Volatility flag. This flag indicate that an instrumented object has a volatility (life cycle) comparable to the volatility of a session.
PSI_FLAG_THREAD_SYSTEM
Defined in psi/psi_base.h:100
System thread flag. Indicates that the instrumented object exists on a system thread.
Enumerations
IO operation performed on an instrumented table.
PSI_table_io_operation
Defined in psi/psi.h:243
IO operation performed on an instrumented table.
PSI_TABLE_FETCH_ROW
Row fetch.
PSI_TABLE_WRITE_ROW
Row write.
PSI_TABLE_UPDATE_ROW
Row update.
PSI_TABLE_DELETE_ROW
Row delete.
Typedefs
unsigned int
Instrumented mutex key. To instrument a mutex, a mutex key must be obtained using register_mutex. Using a zero key always disable the instrumentation.
unsigned int
Instrumented rwlock key. To instrument a rwlock, a rwlock key must be obtained using register_rwlock. Using a zero key always disable the instrumentation.
unsigned int
Instrumented cond key. To instrument a condition, a condition key must be obtained using register_cond. Using a zero key always disable the instrumentation.
unsigned int
Instrumented thread key. To instrument a thread, a thread key must be obtained using register_thread. Using a zero key always disable the instrumentation.
unsigned int
Instrumented file key. To instrument a file, a file key must be obtained using register_file. Using a zero key always disable the instrumentation.
unsigned int
Instrumented stage key. To instrument a stage, a stage key must be obtained using register_stage. Using a zero key always disable the instrumentation.
unsigned int
Instrumented statement key. To instrument a statement, a statement key must be obtained using register_statement. Using a zero key always disable the instrumentation.
unsigned int
Instrumented socket key. To instrument a socket, a socket key must be obtained using register_socket. Using a zero key always disable the instrumentation.
struct PSI_v1
The instrumentation interface for the current version. See also: PSI_CURRENT_VERSION
struct PSI_stage_info_v1
The stage instrumentation has to co exist with the legacy THD::set_proc_info instrumentation. To avoid duplication of the instrumentation in the server, the common PSI_stage_info structure is used, so we export it here, even when not building with HAVE_PSI_INTERFACE.
unsigned int
Instrumented memory key. To instrument memory, a memory key must be obtained using register_memory. Using a zero key always disable the instrumentation.
MDL_key
Type: struct MDL_key
Defined in psi/psi.h:75
opaque_mdl_type
Defined in psi/psi.h:78
See also: enum_mdl_type.
opaque_mdl_duration
Defined in psi/psi.h:81
See also: enum_mdl_duration.
opaque_mdl_status
Defined in psi/psi.h:84
See also: MDL_wait::enum_wait_status.
opaque_vio_type
Defined in psi/psi.h:87
See also: enum_vio_type.
PSI_mutex
Type: struct PSI_mutex
Defined in psi/psi.h:117
PSI_rwlock
Type: struct PSI_rwlock
Defined in psi/psi.h:124
PSI_cond
Type: struct PSI_cond
Defined in psi/psi.h:131
PSI_table_share
Type: struct PSI_table_share
Defined in psi/psi.h:138
PSI_table
Type: struct PSI_table
Defined in psi/psi.h:145
PSI_thread
Type: struct PSI_thread
Defined in psi/psi.h:152
PSI_file
Type: struct PSI_file
Defined in psi/psi.h:159
PSI_socket
Type: struct PSI_socket
Defined in psi/psi.h:166
PSI_prepared_stmt
Type: struct PSI_prepared_stmt
Defined in psi/psi.h:173
PSI_table_locker
Type: struct PSI_table_locker
Defined in psi/psi.h:180
PSI_statement_locker
Type: struct PSI_statement_locker
Defined in psi/psi.h:187
PSI_transaction_locker
Type: struct PSI_transaction_locker
Defined in psi/psi.h:194
PSI_idle_locker
Type: struct PSI_idle_locker
Defined in psi/psi.h:201
PSI_digest_locker
Type: struct PSI_digest_locker
Defined in psi/psi.h:208
PSI_sp_share
Type: struct PSI_sp_share
Defined in psi/psi.h:215
PSI_sp_locker
Type: struct PSI_sp_locker
Defined in psi/psi.h:222
PSI_metadata_lock
Type: struct PSI_metadata_lock
Defined in psi/psi.h:229
PSI_stage_progress
Type: struct PSI_stage_progress
Defined in psi/psi.h:240
PSI_table_io_operation
Type: enum PSI_table_io_operation
Defined in psi/psi.h:254
PSI_table_locker_state
Type: struct PSI_table_locker_state
Defined in psi/psi.h:292
PSI_bootstrap
Type: struct PSI_bootstrap
Defined in psi/psi.h:312
PSI_mutex_key
Defined in psi/psi.h:794
Instrumented mutex key. To instrument a mutex, a mutex key must be obtained using register_mutex. Using a zero key always disable the instrumentation.
PSI_rwlock_key
Defined in psi/psi.h:802
Instrumented rwlock key. To instrument a rwlock, a rwlock key must be obtained using register_rwlock. Using a zero key always disable the instrumentation.
PSI_cond_key
Defined in psi/psi.h:810
Instrumented cond key. To instrument a condition, a condition key must be obtained using register_cond. Using a zero key always disable the instrumentation.
PSI_thread_key
Defined in psi/psi.h:818
Instrumented thread key. To instrument a thread, a thread key must be obtained using register_thread. Using a zero key always disable the instrumentation.
PSI_file_key
Defined in psi/psi.h:825
Instrumented file key. To instrument a file, a file key must be obtained using register_file. Using a zero key always disable the instrumentation.
PSI_stage_key
Defined in psi/psi.h:832
Instrumented stage key. To instrument a stage, a stage key must be obtained using register_stage. Using a zero key always disable the instrumentation.
PSI_statement_key
Defined in psi/psi.h:839
Instrumented statement key. To instrument a statement, a statement key must be obtained using register_statement. Using a zero key always disable the instrumentation.
PSI_socket_key
Defined in psi/psi.h:846
Instrumented socket key. To instrument a socket, a socket key must be obtained using register_socket. Using a zero key always disable the instrumentation.
PSI
Type: struct PSI_v1
Defined in psi/psi.h:2932
The instrumentation interface for the current version. See also: PSI_CURRENT_VERSION
PSI_mutex_info
Type: struct PSI_mutex_info_v1
Defined in psi/psi.h:2933
The mutex information structure for the current version.
PSI_rwlock_info
Type: struct PSI_rwlock_info_v1
Defined in psi/psi.h:2934
The rwlock information structure for the current version.
PSI_cond_info
Type: struct PSI_cond_info_v1
Defined in psi/psi.h:2935
The cond information structure for the current version.
PSI_thread_info
Type: struct PSI_thread_info_v1
Defined in psi/psi.h:2936
The thread information structure for the current version.
PSI_file_info
Type: struct PSI_file_info_v1
Defined in psi/psi.h:2937
The file information structure for the current version.
PSI_stage_info
Type: struct PSI_stage_info_v1
Defined in psi/psi.h:2938
The stage instrumentation has to co exist with the legacy THD::set_proc_info instrumentation. To avoid duplication of the instrumentation in the server, the common PSI_stage_info structure is used, so we export it here, even when not building with HAVE_PSI_INTERFACE.
PSI_statement_info
Type: struct PSI_statement_info_v1
Defined in psi/psi.h:2939
PSI_transaction_info
Defined in psi/psi.h:2940
PSI_socket_info
Type: struct PSI_socket_info_v1
Defined in psi/psi.h:2941
PSI_idle_locker_state
Type: struct PSI_idle_locker_state_v1
Defined in psi/psi.h:2942
PSI_mutex_locker_state
Type: struct PSI_mutex_locker_state_v1
Defined in psi/psi.h:2943
PSI_rwlock_locker_state
Type: struct PSI_rwlock_locker_state_v1
Defined in psi/psi.h:2944
PSI_cond_locker_state
Type: struct PSI_cond_locker_state_v1
Defined in psi/psi.h:2945
PSI_file_locker_state
Type: struct PSI_file_locker_state_v1
Defined in psi/psi.h:2946
PSI_statement_locker_state
Type: struct PSI_statement_locker_state_v1
Defined in psi/psi.h:2947
PSI_transaction_locker_state
Type: struct PSI_transaction_locker_state_v1
Defined in psi/psi.h:2948
PSI_socket_locker_state
Type: struct PSI_socket_locker_state_v1
Defined in psi/psi.h:2949
PSI_sp_locker_state
Type: struct PSI_sp_locker_state_v1
Defined in psi/psi.h:2950
PSI_metadata_locker_state
Type: struct PSI_metadata_locker_state_v1
Defined in psi/psi.h:2951
PSI_metadata_locker
Type: struct PSI_stage_info_none
Defined in psi/psi.h:3017
PSI_memory_key
Defined in psi/psi_base.h:175
Instrumented memory key. To instrument memory, a memory key must be obtained using register_memory. Using a zero key always disable the instrumentation.
PSI_memory_info
Type: struct PSI_memory_info_v1
Defined in psi/psi_memory.h:148
Variables
PSI_server
Type: MYSQL_PLUGIN_IMPORT PSI *
Defined in psi/psi.h:3021
Class Definitions
PSI_stage_progress
Defined in psi/psi.h:235
Interface for an instrumented stage progress. This is a public structure, for efficiency.
Public Attributes
m_work_completed
Defined in psi/psi.h:237
m_work_estimated
Defined in psi/psi.h:238
PSI_table_locker_state
Defined in psi/psi.h:267
State data storage for start_table_io_wait_v1_t, start_table_lock_wait_v1_t. This structure provide temporary storage to a table locker. The content of this structure is considered opaque, the fields are only hints of what an implementation of the psi interface can use. This memory is provided by the instrumented code for performance reasons. See also: start_table_io_wait_v1_t
See also: start_table_lock_wait_v1_t
Public Attributes
uint
Implementation specific. For table io, the table io index. For table lock, the lock type.
m_flags
Defined in psi/psi.h:270
Internal state.
m_io_operation
Type: enum PSI_table_io_operation
Defined in psi/psi.h:272
Current io operation.
m_table
Type: struct PSI_table *
Defined in psi/psi.h:274
Current table handle.
m_table_share
Type: struct PSI_table_share *
Defined in psi/psi.h:276
Current table share.
m_thread
Type: struct PSI_thread *
Defined in psi/psi.h:278
Current thread.
m_timer_start
Defined in psi/psi.h:280
Timer start.
m_timer
Defined in psi/psi.h:282
Timer function.
m_wait
Defined in psi/psi.h:284
Internal data.
m_index
Defined in psi/psi.h:290
Implementation specific. For table io, the table io index. For table lock, the lock type.
PSI_bootstrap
Defined in psi/psi.h:295
Entry point for the performance schema interface.
Public Attributes
void *(*
ABI interface finder. Calling this method with an interface version number returns either an instance of the ABI for this version, or NULL.
get_interface
Defined in psi/psi.h:310
ABI interface finder. Calling this method with an interface version number returns either an instance of the ABI for this version, or NULL.
Returns
a versioned interface (PSI_v1, PSI_v2 or PSI)
See also: PSI_VERSION_1
See also: PSI_v1
See also: PSI_VERSION_2
See also: PSI_v2
See also: PSI_CURRENT_VERSION
See also: PSI
Parameters
version
the interface version number to find
PSI_none
Defined in psi/psi.h:2984
Dummy structure, used to declare PSI_server when no instrumentation is available. The content does not matter, since PSI_server will be NULL.
Public Attributes
opaque
Defined in psi/psi.h:2986
PSI_stage_info_none
Defined in psi/psi.h:2995
Stage instrument information. Since: PSI_VERSION_1 This structure is used to register an instrumented stage.
Public Attributes
m_key
Defined in psi/psi.h:2998
Unused stage key.
m_name
Defined in psi/psi.h:3000
The name of the stage instrument.
m_flags
Defined in psi/psi.h:3002
Unused stage flags.
This page is licensed: GPLv2
Last updated
Was this helpful?

