MySQL 8.3.0
Source Code Documentation
plugin_psi.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2023, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef PLUGIN_PSI_INCLUDED
24#define PLUGIN_PSI_INCLUDED
25
27
28#ifdef HAVE_PSI_INTERFACE
29
30/*
31 Register the psi keys for mutexes
32
33 @param[in] mutexes PSI mutex info
34 @param[in] mutex_count The number of elements in mutexes
35*/
37 size_t mutex_count);
38
39/*
40 Register the psi keys for conditions
41
42 @param[in] conditions PSI condition info
43 @param[in] cond_count The number of elements in conditions
44
45*/
47 size_t cond_count);
48
49/*
50 Register the psi keys for threads
51
52 @param[in] threads PSI thread info
53 @param[in] thread_count The number of elements in threads
54*/
56 size_t thread_count);
57
58/*
59 Register the psi keys for rwlocks
60
61 @param[in] keys PSI rwlock info
62 @param[in] count The number of elements in keys
63*/
65 size_t count);
66
67/*
68 Register the psi keys for mutexes, conditions, threads and rwlocks
69
70*/
72#endif /* HAVE_PSI_INTERFACE */
73
74/* clang-format off */
75
137
179
196
210
234
252/* clang-format on */
253
254#endif /* PLUGIN_PSI_INCLUDED */
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:43
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:48
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:51
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:43
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:49
static uint keys
Definition: hp_test2.cc:48
static int count
Definition: myisam_ftdump.cc:44
PSI_cond_key key_GR_COND_synchronized_queue
Definition: plugin_psi.h:167
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_buffered_transactions
Definition: plugin_psi.h:214
PSI_thread_key key_GR_THD_primary_election_secondary_process
Definition: plugin_psi.h:189
PSI_cond_key key_GR_COND_mysql_thread_handler_run
Definition: plugin_psi.h:175
PSI_mutex_key key_GR_LOCK_mysql_thread_handler_read_only_mode_run
Definition: plugin_psi.h:135
PSI_mutex_key key_GR_LOCK_clone_read_mode
Definition: plugin_psi.h:88
PSI_mutex_key key_GR_LOCK_channel_observation_removal
Definition: plugin_psi.h:84
PSI_stage_info info_GR_STAGE_recovery_connecting_to_donor
Definition: plugin_psi.h:230
PSI_rwlock_key key_GR_RWLOCK_gcs_operations
Definition: plugin_psi.h:199
PSI_stage_info info_GR_STAGE_module_suspending
Definition: plugin_psi.h:229
PSI_mutex_key key_GR_LOCK_mysql_thread_run
Definition: plugin_psi.h:130
PSI_stage_info info_GR_STAGE_primary_election_pending_transactions
Definition: plugin_psi.h:217
PSI_cond_key key_GR_COND_clone_handler_run
Definition: plugin_psi.h:144
PSI_cond_key key_GR_COND_recovery_module_run
Definition: plugin_psi.h:163
PSI_mutex_key key_GR_LOCK_trx_unlocking
Definition: plugin_psi.h:123
PSI_cond_key key_GR_COND_session_thread_method_exec
Definition: plugin_psi.h:165
PSI_cond_key key_GR_COND_mysql_thread_handler_read_only_mode_dispatcher_run
Definition: plugin_psi.h:178
PSI_thread_key key_GR_THD_primary_election_primary_process
Definition: plugin_psi.h:188
PSI_stage_info info_GR_STAGE_recovery_transferring_state
Definition: plugin_psi.h:231
PSI_cond_key key_GR_COND_pipeline_continuation
Definition: plugin_psi.h:154
PSI_thread_key key_GR_THD_group_action_coordinator
Definition: plugin_psi.h:186
PSI_cond_key key_GR_COND_primary_election_action_notification
Definition: plugin_psi.h:157
PSI_mutex_key key_GR_LOCK_primary_election_running_flag
Definition: plugin_psi.h:108
PSI_mutex_key key_GR_LOCK_mysql_thread_handler_read_only_mode_dispatcher_run
Definition: plugin_psi.h:136
PSI_memory_key key_sql_service_command_data
Definition: plugin_psi.h:240
PSI_rwlock_key key_GR_RWLOCK_io_cache_unused_list
Definition: plugin_psi.h:202
PSI_mutex_key key_GR_LOCK_applier_module_suspend
Definition: plugin_psi.h:77
PSI_cond_key key_GR_COND_delayed_init_run
Definition: plugin_psi.h:146
PSI_cond_key key_GR_COND_delayed_init_server_ready
Definition: plugin_psi.h:147
PSI_memory_key key_consistent_transactions_prepared
Definition: plugin_psi.h:247
PSI_thread_key key_GR_THD_plugin_session
Definition: plugin_psi.h:187
PSI_mutex_key key_GR_LOCK_plugin_online
Definition: plugin_psi.h:104
PSI_memory_key key_certification_data_gc
Definition: plugin_psi.h:237
PSI_cond_key key_GR_COND_recovery
Definition: plugin_psi.h:161
PSI_stage_info info_GR_STAGE_clone_execute
Definition: plugin_psi.h:233
PSI_cond_key key_GR_COND_group_part_handler_run
Definition: plugin_psi.h:152
PSI_thread_key key_GR_THD_clone_thd
Definition: plugin_psi.h:184
PSI_mutex_key key_GR_LOCK_group_part_handler_abort
Definition: plugin_psi.h:96
void register_group_replication_cond_psi_keys(PSI_cond_info conditions[], size_t cond_count)
Definition: plugin_psi.cc:690
PSI_cond_key key_GR_COND_cert_broadcast_dispatcher_run
Definition: plugin_psi.h:142
PSI_thread_key key_GR_THD_mysql_thread_handler
Definition: plugin_psi.h:194
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_prepared_transactions_on_my_applier
Definition: plugin_psi.h:207
PSI_mutex_key key_GR_LOCK_applier_module_run
Definition: plugin_psi.cc:31
PSI_mutex_key key_GR_LOCK_delayed_init_run
Definition: plugin_psi.h:90
PSI_mutex_key key_GR_LOCK_mysql_thread_handler_run
Definition: plugin_psi.h:133
PSI_cond_key key_GR_COND_recovery_metadata_receive
Definition: plugin_psi.h:162
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_pending_transactions
Definition: plugin_psi.h:212
PSI_mutex_key key_GR_LOCK_cert_members
Definition: plugin_psi.h:82
PSI_cond_key key_GR_COND_primary_election_primary_process_run
Definition: plugin_psi.h:158
PSI_cond_key key_GR_COND_primary_election_validation_notification
Definition: plugin_psi.h:160
PSI_mutex_key key_GR_LOCK_session_thread_method_exec
Definition: plugin_psi.h:118
PSI_memory_key key_consistent_transactions_delayed_view_change
Definition: plugin_psi.h:249
PSI_thread_key key_GR_THD_group_partition_handler
Definition: plugin_psi.h:190
PSI_stage_info info_GR_STAGE_primary_switch_election
Definition: plugin_psi.h:222
PSI_mutex_key key_GR_LOCK_stage_monitor_handler
Definition: plugin_psi.h:120
PSI_cond_key key_GR_COND_primary_election_secondary_process_run
Definition: plugin_psi.h:159
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_checks
Definition: plugin_psi.h:225
PSI_cond_key key_GR_COND_message_service_run
Definition: plugin_psi.h:164
PSI_stage_info info_GR_STAGE_module_executing
Definition: plugin_psi.h:228
PSI_cond_key key_GR_COND_group_action_coordinator_thread_end
Definition: plugin_psi.h:150
PSI_stage_info info_GR_STAGE_primary_switch_step_completion
Definition: plugin_psi.h:223
PSI_mutex_key key_GR_LOCK_recovery_metadata_receive
Definition: plugin_psi.h:113
PSI_mutex_key key_GR_LOCK_recovery
Definition: plugin_psi.h:111
PSI_cond_key key_GR_COND_count_down_latch
Definition: plugin_psi.h:145
PSI_cond_key key_GR_COND_mysql_thread_run
Definition: plugin_psi.h:173
PSI_mutex_key key_GR_LOCK_primary_promotion_policy
Definition: plugin_psi.h:129
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread
Definition: plugin_psi.h:93
PSI_thread_key key_GR_THD_transaction_monitor
Definition: plugin_psi.h:182
PSI_memory_key key_certification_info
Definition: plugin_psi.h:238
PSI_thread_key key_GR_THD_delayed_init
Definition: plugin_psi.h:185
PSI_cond_key key_GR_COND_group_action_coordinator_process
Definition: plugin_psi.h:148
PSI_cond_key key_GR_COND_session_thread_run
Definition: plugin_psi.h:166
PSI_cond_key key_GR_COND_primary_promotion_policy
Definition: plugin_psi.h:172
PSI_rwlock_key key_GR_RWLOCK_plugin_running
Definition: plugin_psi.h:203
PSI_memory_key key_recovery_metadata_message_buffer
Definition: plugin_psi.h:251
PSI_mutex_key key_GR_LOCK_primary_election_action_phase
Definition: plugin_psi.h:105
PSI_thread_key key_GR_THD_message_service_handler
Definition: plugin_psi.h:192
void register_all_group_replication_psi_keys()
Definition: plugin_psi.cc:733
PSI_stage_info info_GR_STAGE_primary_switch_completion
Definition: plugin_psi.h:224
PSI_mutex_key key_GR_LOCK_recovery_module_run
Definition: plugin_psi.h:115
PSI_mutex_key key_GR_LOCK_pipeline_continuation
Definition: plugin_psi.h:99
PSI_mutex_key key_GR_LOCK_cert_broadcast_run
Definition: plugin_psi.h:79
PSI_mutex_key key_GR_LOCK_count_down_latch
Definition: plugin_psi.h:89
PSI_cond_key key_GR_COND_mysql_thread_handler_read_only_mode_run
Definition: plugin_psi.h:177
PSI_stage_info info_GR_STAGE_primary_switch_pending_transactions
Definition: plugin_psi.h:221
PSI_cond_key key_GR_COND_mysql_thread_dispatcher_run
Definition: plugin_psi.h:174
PSI_memory_key key_compression_data
Definition: plugin_psi.h:250
PSI_mutex_key key_GR_LOCK_group_action_coordinator_process
Definition: plugin_psi.h:92
PSI_stage_info info_GR_STAGE_autorejoin
Definition: plugin_psi.cc:188
PSI_cond_key key_GR_COND_wait_ticket
Definition: plugin_psi.h:170
PSI_memory_key key_group_member_info
Definition: plugin_psi.h:244
PSI_cond_key key_GR_COND_cert_broadcast_run
Definition: plugin_psi.h:143
PSI_cond_key key_GR_COND_mysql_thread_handler_dispatcher_run
Definition: plugin_psi.h:176
PSI_memory_key key_consistent_members_that_must_prepare_transaction
Definition: plugin_psi.h:245
PSI_mutex_key key_GR_LOCK_group_member_info_update_lock
Definition: plugin_psi.h:125
PSI_cond_key key_GR_COND_applier_module_run
Definition: plugin_psi.cc:93
PSI_stage_info info_GR_STAGE_primary_election_buffered_transactions
Definition: plugin_psi.h:216
PSI_mutex_key key_GR_LOCK_pipeline_stats_flow_control
Definition: plugin_psi.h:100
PSI_mutex_key key_GR_LOCK_primary_election_secondary_process_run
Definition: plugin_psi.h:109
PSI_mutex_key key_GR_LOCK_autorejoin_module
Definition: plugin_psi.h:78
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread_end
Definition: plugin_psi.h:94
PSI_rwlock_key key_GR_RWLOCK_channel_observation_list
Definition: plugin_psi.h:198
PSI_memory_key key_consistent_transactions_waiting
Definition: plugin_psi.h:248
PSI_rwlock_key key_GR_RWLOCK_gcs_operations_view_change_observers
Definition: plugin_psi.h:200
PSI_mutex_key key_GR_LOCK_delayed_init_server_ready
Definition: plugin_psi.h:91
PSI_mutex_key key_GR_LOCK_clone_handler_run
Definition: plugin_psi.h:86
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_election
Definition: plugin_psi.h:226
PSI_mutex_key key_GR_LOCK_channel_observation_list
Definition: plugin_psi.h:83
PSI_mutex_key key_GR_LOCK_session_thread_run
Definition: plugin_psi.h:119
PSI_thread_key key_GR_THD_cert_broadcast
Definition: plugin_psi.h:183
PSI_mutex_key key_GR_LOCK_transaction_monitor_module
Definition: plugin_psi.h:122
void register_group_replication_mutex_psi_keys(PSI_mutex_info mutexes[], size_t mutex_count)
Definition: plugin_psi.cc:682
PSI_cond_key key_GR_COND_pipeline_stats_flow_control
Definition: plugin_psi.h:155
PSI_mutex_key key_GR_LOCK_mysql_thread_dispatcher_run
Definition: plugin_psi.h:131
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_map
Definition: plugin_psi.h:206
PSI_mutex_key key_GR_LOCK_connection_map
Definition: plugin_psi.h:132
PSI_cond_key key_GR_COND_multi_primary_action_notification
Definition: plugin_psi.h:153
PSI_mutex_key key_GR_LOCK_cert_broadcast_dispatcher_run
Definition: plugin_psi.h:80
PSI_memory_key key_message_service_received_message
Definition: plugin_psi.h:243
PSI_memory_key key_certification_data
Definition: plugin_psi.h:236
PSI_mutex_key key_GR_LOCK_primary_election_action_notification
Definition: plugin_psi.h:106
PSI_cond_key key_GR_COND_view_modification_wait
Definition: plugin_psi.h:169
PSI_memory_key key_message_service_queue
Definition: plugin_psi.h:242
void register_group_replication_rwlock_psi_keys(PSI_rwlock_info *keys, size_t count)
Definition: plugin_psi.cc:706
PSI_mutex_key key_GR_LOCK_primary_election_primary_process_run
Definition: plugin_psi.h:107
PSI_mutex_key key_GR_LOCK_server_ongoing_transaction_handler
Definition: plugin_psi.h:116
PSI_rwlock_key key_GR_RWLOCK_group_event_observation_list
Definition: plugin_psi.h:201
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_step_completion
Definition: plugin_psi.h:213
PSI_cond_key key_GR_COND_write_lock_protection
Definition: plugin_psi.h:171
PSI_cond_key key_GR_COND_group_part_handler_abort
Definition: plugin_psi.h:151
PSI_mutex_key key_GR_LOCK_group_part_handler_run
Definition: plugin_psi.h:97
PSI_mutex_key key_GR_LOCK_plugin_modules_termination
Definition: plugin_psi.h:102
PSI_memory_key key_mysql_thread_queued_task
Definition: plugin_psi.h:241
PSI_mutex_key key_GR_LOCK_certification_info
Definition: plugin_psi.h:81
PSI_thread_key key_GR_THD_applier_module_receiver
Definition: plugin_psi.cc:136
PSI_thread_key key_GR_THD_autorejoin
Definition: plugin_psi.h:181
PSI_mutex_key key_GR_LOCK_group_info_manager
Definition: plugin_psi.h:95
PSI_mutex_key key_GR_LOCK_clone_query
Definition: plugin_psi.h:87
PSI_thread_key key_GR_THD_recovery
Definition: plugin_psi.h:191
PSI_mutex_key key_GR_LOCK_mysql_thread_handler_dispatcher_run
Definition: plugin_psi.h:134
PSI_cond_key key_GR_COND_transaction_monitor_module
Definition: plugin_psi.h:168
PSI_stage_info info_GR_STAGE_primary_election_group_read_only
Definition: plugin_psi.h:218
PSI_mutex_key key_GR_LOCK_recovery_donor_selection
Definition: plugin_psi.h:112
PSI_cond_key key_GR_COND_applier_module_suspend
Definition: plugin_psi.h:139
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_info_members_that_must_prepare_the_transaction
Definition: plugin_psi.h:209
PSI_thread_key key_GR_THD_mysql_thread_handler_read_only_mode
Definition: plugin_psi.h:195
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_completion
Definition: plugin_psi.h:215
PSI_mutex_key key_GR_LOCK_group_member_info_manager_update_lock
Definition: plugin_psi.h:124
PSI_cond_key key_GR_COND_group_action_coordinator_thread
Definition: plugin_psi.h:149
PSI_stage_info info_GR_STAGE_clone_prepare
Definition: plugin_psi.h:232
PSI_mutex_key key_GR_LOCK_write_lock_protection
Definition: plugin_psi.h:128
PSI_mutex_key key_GR_LOCK_wait_ticket
Definition: plugin_psi.h:127
PSI_stage_info info_GR_STAGE_primary_election_old_primary_transactions
Definition: plugin_psi.h:219
PSI_mutex_key key_GR_LOCK_pipeline_stats_transactions_waiting_apply
Definition: plugin_psi.h:101
PSI_mutex_key key_GR_LOCK_plugin_applier_module_initialize_terminate
Definition: plugin_psi.h:103
PSI_thread_key key_GR_THD_mysql_thread
Definition: plugin_psi.h:193
PSI_mutex_key key_GR_LOCK_multi_primary_action_notification
Definition: plugin_psi.h:98
PSI_rwlock_key key_GR_RWLOCK_plugin_stop
Definition: plugin_psi.h:204
PSI_mutex_key key_GR_LOCK_primary_election_validation_notification
Definition: plugin_psi.h:110
PSI_cond_key key_GR_COND_autorejoin_module
Definition: plugin_psi.h:141
PSI_mutex_key key_GR_LOCK_view_modification_wait
Definition: plugin_psi.h:126
PSI_cond_key key_GR_COND_applier_module_wait
Definition: plugin_psi.h:140
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_completion
Definition: plugin_psi.h:227
PSI_cond_key key_GR_COND_plugin_online
Definition: plugin_psi.h:156
PSI_mutex_key key_GR_LOCK_message_service_run
Definition: plugin_psi.h:117
PSI_rwlock_key key_GR_RWLOCK_cert_stable_gtid_set
Definition: plugin_psi.cc:153
PSI_memory_key key_write_set_encoded
Definition: plugin_psi.cc:167
PSI_memory_key key_transaction_data
Definition: plugin_psi.h:239
PSI_mutex_key key_GR_LOCK_synchronized_queue
Definition: plugin_psi.h:121
void register_group_replication_thread_psi_keys(PSI_thread_info threads[], size_t thread_count)
Definition: plugin_psi.cc:698
PSI_mutex_key key_GR_LOCK_clone_donor_list
Definition: plugin_psi.h:85
PSI_mutex_key key_GR_LOCK_recovery_metadata_module_receive
Definition: plugin_psi.h:114
PSI_stage_info info_GR_STAGE_primary_switch_checks
Definition: plugin_psi.h:220
PSI_rwlock_key key_GR_RWLOCK_transaction_observation_list
Definition: plugin_psi.h:205
PSI_rwlock_key key_GR_RWLOCK_flow_control_module_info
Definition: plugin_psi.h:208
PSI_memory_key key_consistent_transactions
Definition: plugin_psi.h:246
Condition information.
Definition: psi_cond_bits.h:87
Mutex information.
Definition: psi_mutex_bits.h:72
Rwlock information.
Definition: psi_rwlock_bits.h:161
Stage instrument information.
Definition: psi_stage_bits.h:73
Thread instrument information.
Definition: psi_thread_bits.h:116