MySQL 8.0.40
Source Code Documentation
plugin_psi.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef PLUGIN_PSI_INCLUDED
25#define PLUGIN_PSI_INCLUDED
26
28
29#ifdef HAVE_PSI_INTERFACE
30
31/*
32 Register the psi keys for mutexes
33
34 @param[in] mutexes PSI mutex info
35 @param[in] mutex_count The number of elements in mutexes
36*/
38 size_t mutex_count);
39
40/*
41 Register the psi keys for conditions
42
43 @param[in] conditions PSI condition info
44 @param[in] cond_count The number of elements in conditions
45
46*/
48 size_t cond_count);
49
50/*
51 Register the psi keys for threads
52
53 @param[in] threads PSI thread info
54 @param[in] thread_count The number of elements in threads
55*/
57 size_t thread_count);
58
59/*
60 Register the psi keys for rwlocks
61
62 @param[in] keys PSI rwlock info
63 @param[in] count The number of elements in keys
64*/
66 size_t count);
67
68/*
69 Register the psi keys for mutexes, conditions, threads and rwlocks
70
71*/
73#endif /* HAVE_PSI_INTERFACE */
74
75/* clang-format off */
76
137
178
195
209
233
249/* clang-format on */
250
251#endif /* PLUGIN_PSI_INCLUDED */
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:44
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:49
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:52
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:44
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:50
static uint keys
Definition: hp_test2.cc:46
static int count
Definition: myisam_ftdump.cc:43
PSI_cond_key key_GR_COND_synchronized_queue
Definition: plugin_psi.h:166
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_buffered_transactions
Definition: plugin_psi.h:213
PSI_thread_key key_GR_THD_primary_election_secondary_process
Definition: plugin_psi.h:188
PSI_cond_key key_GR_COND_mysql_thread_handler_run
Definition: plugin_psi.h:174
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:89
PSI_mutex_key key_GR_LOCK_channel_observation_removal
Definition: plugin_psi.h:85
PSI_stage_info info_GR_STAGE_recovery_connecting_to_donor
Definition: plugin_psi.h:229
PSI_rwlock_key key_GR_RWLOCK_gcs_operations
Definition: plugin_psi.h:198
PSI_stage_info info_GR_STAGE_module_suspending
Definition: plugin_psi.h:228
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:216
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:162
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:164
PSI_cond_key key_GR_COND_mysql_thread_handler_read_only_mode_dispatcher_run
Definition: plugin_psi.h:177
PSI_thread_key key_GR_THD_primary_election_primary_process
Definition: plugin_psi.h:187
PSI_stage_info info_GR_STAGE_recovery_transferring_state
Definition: plugin_psi.h:230
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:185
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:110
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:239
PSI_rwlock_key key_GR_RWLOCK_io_cache_unused_list
Definition: plugin_psi.h:201
PSI_mutex_key key_GR_LOCK_applier_module_suspend
Definition: plugin_psi.h:78
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:246
PSI_thread_key key_GR_THD_plugin_session
Definition: plugin_psi.h:186
PSI_mutex_key key_GR_LOCK_plugin_online
Definition: plugin_psi.h:106
PSI_memory_key key_certification_data_gc
Definition: plugin_psi.h:236
PSI_cond_key key_GR_COND_recovery
Definition: plugin_psi.h:161
PSI_stage_info info_GR_STAGE_clone_execute
Definition: plugin_psi.h:232
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:183
PSI_mutex_key key_GR_LOCK_group_part_handler_abort
Definition: plugin_psi.h:98
void register_group_replication_cond_psi_keys(PSI_cond_info conditions[], size_t cond_count)
Definition: plugin_psi.cc:674
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:193
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_prepared_transactions_on_my_applier
Definition: plugin_psi.h:206
PSI_mutex_key key_GR_LOCK_applier_module_run
Definition: plugin_psi.cc:32
PSI_mutex_key key_GR_LOCK_delayed_init_run
Definition: plugin_psi.h:91
PSI_mutex_key key_GR_LOCK_mysql_thread_handler_run
Definition: plugin_psi.h:133
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_pending_transactions
Definition: plugin_psi.h:211
PSI_mutex_key key_GR_LOCK_cert_members
Definition: plugin_psi.h:83
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:248
PSI_thread_key key_GR_THD_group_partition_handler
Definition: plugin_psi.h:189
PSI_stage_info info_GR_STAGE_primary_switch_election
Definition: plugin_psi.h:221
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:224
PSI_cond_key key_GR_COND_message_service_run
Definition: plugin_psi.h:163
PSI_stage_info info_GR_STAGE_module_executing
Definition: plugin_psi.h:227
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:222
PSI_mutex_key key_GR_LOCK_recovery
Definition: plugin_psi.h:113
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:172
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:95
PSI_thread_key key_GR_THD_transaction_monitor
Definition: plugin_psi.h:181
PSI_memory_key key_certification_info
Definition: plugin_psi.h:237
PSI_thread_key key_GR_THD_delayed_init
Definition: plugin_psi.h:184
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:165
PSI_cond_key key_GR_COND_primary_promotion_policy
Definition: plugin_psi.h:171
PSI_rwlock_key key_GR_RWLOCK_plugin_running
Definition: plugin_psi.h:202
PSI_mutex_key key_GR_LOCK_primary_election_action_phase
Definition: plugin_psi.h:107
PSI_thread_key key_GR_THD_message_service_handler
Definition: plugin_psi.h:191
void register_all_group_replication_psi_keys()
Definition: plugin_psi.cc:717
PSI_stage_info info_GR_STAGE_primary_switch_completion
Definition: plugin_psi.h:223
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:101
PSI_mutex_key key_GR_LOCK_cert_broadcast_run
Definition: plugin_psi.h:80
PSI_mutex_key key_GR_LOCK_count_down_latch
Definition: plugin_psi.h:90
PSI_cond_key key_GR_COND_mysql_thread_handler_read_only_mode_run
Definition: plugin_psi.h:176
PSI_stage_info info_GR_STAGE_primary_switch_pending_transactions
Definition: plugin_psi.h:220
PSI_cond_key key_GR_COND_mysql_thread_dispatcher_run
Definition: plugin_psi.h:173
PSI_mutex_key key_GR_LOCK_group_action_coordinator_process
Definition: plugin_psi.h:94
PSI_stage_info info_GR_STAGE_autorejoin
Definition: plugin_psi.cc:185
PSI_cond_key key_GR_COND_wait_ticket
Definition: plugin_psi.h:169
PSI_memory_key key_group_member_info
Definition: plugin_psi.h:243
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:175
PSI_memory_key key_consistent_members_that_must_prepare_transaction
Definition: plugin_psi.h:244
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:215
PSI_mutex_key key_GR_LOCK_pipeline_stats_flow_control
Definition: plugin_psi.h:102
PSI_mutex_key key_GR_LOCK_primary_election_secondary_process_run
Definition: plugin_psi.h:111
PSI_mutex_key key_GR_LOCK_autorejoin_module
Definition: plugin_psi.h:79
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread_end
Definition: plugin_psi.h:96
PSI_rwlock_key key_GR_RWLOCK_channel_observation_list
Definition: plugin_psi.h:197
PSI_memory_key key_consistent_transactions_waiting
Definition: plugin_psi.h:247
PSI_rwlock_key key_GR_RWLOCK_gcs_operations_view_change_observers
Definition: plugin_psi.h:199
PSI_mutex_key key_GR_LOCK_delayed_init_server_ready
Definition: plugin_psi.h:92
PSI_mutex_key key_GR_LOCK_clone_handler_run
Definition: plugin_psi.h:87
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_election
Definition: plugin_psi.h:225
PSI_mutex_key key_GR_LOCK_channel_observation_list
Definition: plugin_psi.h:84
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:182
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:666
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:205
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:81
PSI_memory_key key_message_service_received_message
Definition: plugin_psi.h:242
PSI_memory_key key_certification_data
Definition: plugin_psi.h:235
PSI_mutex_key key_GR_LOCK_primary_election_action_notification
Definition: plugin_psi.h:108
PSI_cond_key key_GR_COND_view_modification_wait
Definition: plugin_psi.h:168
PSI_memory_key key_message_service_queue
Definition: plugin_psi.h:241
void register_group_replication_rwlock_psi_keys(PSI_rwlock_info *keys, size_t count)
Definition: plugin_psi.cc:690
PSI_mutex_key key_GR_LOCK_primary_election_primary_process_run
Definition: plugin_psi.h:109
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:200
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_step_completion
Definition: plugin_psi.h:212
PSI_cond_key key_GR_COND_write_lock_protection
Definition: plugin_psi.h:170
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:99
PSI_mutex_key key_GR_LOCK_plugin_modules_termination
Definition: plugin_psi.h:104
PSI_memory_key key_mysql_thread_queued_task
Definition: plugin_psi.h:240
PSI_mutex_key key_GR_LOCK_certification_info
Definition: plugin_psi.h:82
PSI_thread_key key_GR_THD_applier_module_receiver
Definition: plugin_psi.cc:135
PSI_thread_key key_GR_THD_autorejoin
Definition: plugin_psi.h:180
PSI_mutex_key key_GR_LOCK_group_info_manager
Definition: plugin_psi.h:97
PSI_mutex_key key_GR_LOCK_clone_query
Definition: plugin_psi.h:88
PSI_thread_key key_GR_THD_recovery
Definition: plugin_psi.h:190
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:167
PSI_stage_info info_GR_STAGE_primary_election_group_read_only
Definition: plugin_psi.h:217
PSI_mutex_key key_GR_LOCK_recovery_donor_selection
Definition: plugin_psi.h:114
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:208
PSI_thread_key key_GR_THD_mysql_thread_handler_read_only_mode
Definition: plugin_psi.h:194
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_completion
Definition: plugin_psi.h:214
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:231
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:218
PSI_mutex_key key_GR_LOCK_pipeline_stats_transactions_waiting_apply
Definition: plugin_psi.h:103
PSI_mutex_key key_GR_LOCK_plugin_applier_module_initialize_terminate
Definition: plugin_psi.h:105
PSI_thread_key key_GR_THD_mysql_thread
Definition: plugin_psi.h:192
PSI_mutex_key key_GR_LOCK_multi_primary_action_notification
Definition: plugin_psi.h:100
PSI_rwlock_key key_GR_RWLOCK_plugin_stop
Definition: plugin_psi.h:203
PSI_mutex_key key_GR_LOCK_primary_election_validation_notification
Definition: plugin_psi.h:112
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:226
PSI_cond_key key_GR_COND_plugin_online
Definition: plugin_psi.h:156
PSI_mutex_key key_GR_LOCK_force_members_running
Definition: plugin_psi.h:93
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:152
PSI_memory_key key_write_set_encoded
Definition: plugin_psi.cc:166
PSI_memory_key key_transaction_data
Definition: plugin_psi.h:238
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:682
PSI_mutex_key key_GR_LOCK_clone_donor_list
Definition: plugin_psi.h:86
PSI_stage_info info_GR_STAGE_primary_switch_checks
Definition: plugin_psi.h:219
PSI_rwlock_key key_GR_RWLOCK_transaction_observation_list
Definition: plugin_psi.h:204
PSI_rwlock_key key_GR_RWLOCK_flow_control_module_info
Definition: plugin_psi.h:207
PSI_memory_key key_consistent_transactions
Definition: plugin_psi.h:245
Condition information.
Definition: psi_cond_bits.h:88
Mutex information.
Definition: psi_mutex_bits.h:73
Rwlock information.
Definition: psi_rwlock_bits.h:162
Stage instrument information.
Definition: psi_stage_bits.h:74
Thread instrument information.
Definition: psi_thread_bits.h:117