MySQL  8.0.19
Source Code Documentation
plugin_psi.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
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 
128 
162 
175 
187 
211 
212 /* clang-format on */
213 
214 #endif /* PLUGIN_PSI_INCLUDED */
key_GR_LOCK_group_action_coordinator_thread_end
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread_end
Definition: plugin_psi.h:95
info_GR_STAGE_primary_switch_completion
PSI_stage_info info_GR_STAGE_primary_switch_completion
Definition: plugin_psi.h:201
PSI_mutex_key
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:49
key_GR_LOCK_clone_read_mode
PSI_mutex_key key_GR_LOCK_clone_read_mode
Definition: plugin_psi.h:88
info_GR_STAGE_primary_election_group_read_only
PSI_stage_info info_GR_STAGE_primary_election_group_read_only
Definition: plugin_psi.h:195
key_GR_LOCK_pipeline_stats_transactions_waiting_apply
PSI_mutex_key key_GR_LOCK_pipeline_stats_transactions_waiting_apply
Definition: plugin_psi.h:102
key_GR_LOCK_recovery_donor_selection
PSI_mutex_key key_GR_LOCK_recovery_donor_selection
Definition: plugin_psi.h:113
key_GR_THD_delayed_init
PSI_thread_key key_GR_THD_delayed_init
Definition: plugin_psi.h:167
info_GR_STAGE_clone_execute
PSI_stage_info info_GR_STAGE_clone_execute
Definition: plugin_psi.h:210
register_group_replication_cond_psi_keys
void register_group_replication_cond_psi_keys(PSI_cond_info conditions[], size_t cond_count)
Definition: plugin_psi.cc:506
key_GR_LOCK_group_part_handler_abort
PSI_mutex_key key_GR_LOCK_group_part_handler_abort
Definition: plugin_psi.h:97
key_GR_THD_group_action_coordinator
PSI_thread_key key_GR_THD_group_action_coordinator
Definition: plugin_psi.h:168
info_GR_STAGE_primary_election_pending_transactions
PSI_stage_info info_GR_STAGE_primary_election_pending_transactions
Definition: plugin_psi.h:194
key_GR_THD_plugin_session
PSI_thread_key key_GR_THD_plugin_session
Definition: plugin_psi.h:169
info_GR_STAGE_recovery_connecting_to_donor
PSI_stage_info info_GR_STAGE_recovery_connecting_to_donor
Definition: plugin_psi.h:207
key_GR_RWLOCK_transaction_consistency_manager_map
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_map
Definition: plugin_psi.h:185
key_GR_LOCK_recovery
PSI_mutex_key key_GR_LOCK_recovery
Definition: plugin_psi.h:112
key_GR_COND_delayed_init_run
PSI_cond_key key_GR_COND_delayed_init_run
Definition: plugin_psi.h:137
key_GR_RWLOCK_io_cache_unused_list
PSI_rwlock_key key_GR_RWLOCK_io_cache_unused_list
Definition: plugin_psi.h:182
info_GR_STAGE_primary_switch_pending_transactions
PSI_stage_info info_GR_STAGE_primary_switch_pending_transactions
Definition: plugin_psi.h:198
key_GR_COND_plugin_online
PSI_cond_key key_GR_COND_plugin_online
Definition: plugin_psi.h:147
key_GR_COND_group_part_handler_run
PSI_cond_key key_GR_COND_group_part_handler_run
Definition: plugin_psi.h:143
key_GR_COND_primary_election_action_notification
PSI_cond_key key_GR_COND_primary_election_action_notification
Definition: plugin_psi.h:148
key_GR_THD_recovery
PSI_thread_key key_GR_THD_recovery
Definition: plugin_psi.h:173
PSI_mutex_info_v1
Mutex information.
Definition: psi_mutex_bits.h:70
PSI_thread_info_v1
Thread instrument information.
Definition: psi_thread_bits.h:78
key_GR_LOCK_primary_election_running_flag
PSI_mutex_key key_GR_LOCK_primary_election_running_flag
Definition: plugin_psi.h:109
key_GR_COND_wait_ticket
PSI_cond_key key_GR_COND_wait_ticket
Definition: plugin_psi.h:159
key_GR_COND_cert_broadcast_run
PSI_cond_key key_GR_COND_cert_broadcast_run
Definition: plugin_psi.h:134
key_GR_RWLOCK_gcs_operations_finalize_ongoing
PSI_rwlock_key key_GR_RWLOCK_gcs_operations_finalize_ongoing
Definition: plugin_psi.h:179
key_GR_RWLOCK_cert_stable_gtid_set
PSI_rwlock_key key_GR_RWLOCK_cert_stable_gtid_set
Definition: plugin_psi.cc:129
key_GR_THD_group_partition_handler
PSI_thread_key key_GR_THD_group_partition_handler
Definition: plugin_psi.h:172
key_GR_LOCK_clone_query
PSI_mutex_key key_GR_LOCK_clone_query
Definition: plugin_psi.h:87
key_GR_COND_primary_election_primary_process_run
PSI_cond_key key_GR_COND_primary_election_primary_process_run
Definition: plugin_psi.h:149
key_GR_LOCK_view_modification_wait
PSI_mutex_key key_GR_LOCK_view_modification_wait
Definition: plugin_psi.h:124
key_GR_LOCK_plugin_running
PSI_mutex_key key_GR_LOCK_plugin_running
Definition: plugin_psi.h:105
key_GR_COND_group_action_coordinator_thread_end
PSI_cond_key key_GR_COND_group_action_coordinator_thread_end
Definition: plugin_psi.h:141
key_GR_COND_session_thread_method_exec
PSI_cond_key key_GR_COND_session_thread_method_exec
Definition: plugin_psi.h:155
info_GR_STAGE_primary_election_buffered_transactions
PSI_stage_info info_GR_STAGE_primary_election_buffered_transactions
Definition: plugin_psi.h:193
key_GR_RWLOCK_gcs_operations_view_change_observers
PSI_rwlock_key key_GR_RWLOCK_gcs_operations_view_change_observers
Definition: plugin_psi.h:180
info_GR_STAGE_primary_switch_step_completion
PSI_stage_info info_GR_STAGE_primary_switch_step_completion
Definition: plugin_psi.h:200
key_GR_THD_primary_election_primary_process
PSI_thread_key key_GR_THD_primary_election_primary_process
Definition: plugin_psi.h:170
info_GR_STAGE_multi_primary_mode_switch_completion
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_completion
Definition: plugin_psi.h:192
key_GR_COND_count_down_latch
PSI_cond_key key_GR_COND_count_down_latch
Definition: plugin_psi.h:136
info_GR_STAGE_primary_switch_election
PSI_stage_info info_GR_STAGE_primary_switch_election
Definition: plugin_psi.h:199
key_GR_COND_delayed_init_server_ready
PSI_cond_key key_GR_COND_delayed_init_server_ready
Definition: plugin_psi.h:138
key_GR_LOCK_group_member_info_update_lock
PSI_mutex_key key_GR_LOCK_group_member_info_update_lock
Definition: plugin_psi.h:123
key_GR_COND_group_action_coordinator_process
PSI_cond_key key_GR_COND_group_action_coordinator_process
Definition: plugin_psi.h:139
key_GR_LOCK_recovery_module_run
PSI_mutex_key key_GR_LOCK_recovery_module_run
Definition: plugin_psi.h:114
key_GR_COND_write_lock_protection
PSI_cond_key key_GR_COND_write_lock_protection
Definition: plugin_psi.h:160
key_GR_LOCK_count_down_latch
PSI_mutex_key key_GR_LOCK_count_down_latch
Definition: plugin_psi.h:89
key_GR_LOCK_session_thread_run
PSI_mutex_key key_GR_LOCK_session_thread_run
Definition: plugin_psi.h:118
key_GR_COND_primary_promotion_policy
PSI_cond_key key_GR_COND_primary_promotion_policy
Definition: plugin_psi.h:161
key_GR_COND_recovery_module_run
PSI_cond_key key_GR_COND_recovery_module_run
Definition: plugin_psi.h:153
key_GR_COND_clone_handler_run
PSI_cond_key key_GR_COND_clone_handler_run
Definition: plugin_psi.h:135
PSI_cond_info_v1
Condition information.
Definition: psi_cond_bits.h:85
key_GR_LOCK_synchronized_queue
PSI_mutex_key key_GR_LOCK_synchronized_queue
Definition: plugin_psi.h:120
PSI_cond_key
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:41
PSI_rwlock_info_v1
Rwlock information.
Definition: psi_rwlock_bits.h:159
key_GR_COND_multi_primary_action_notification
PSI_cond_key key_GR_COND_multi_primary_action_notification
Definition: plugin_psi.h:144
key_GR_COND_autorejoin_module
PSI_cond_key key_GR_COND_autorejoin_module
Definition: plugin_psi.h:132
key_GR_LOCK_stage_monitor_handler
PSI_mutex_key key_GR_LOCK_stage_monitor_handler
Definition: plugin_psi.h:119
key_GR_LOCK_applier_module_suspend
PSI_mutex_key key_GR_LOCK_applier_module_suspend
Definition: plugin_psi.h:77
key_GR_LOCK_delayed_init_run
PSI_mutex_key key_GR_LOCK_delayed_init_run
Definition: plugin_psi.h:90
PSI_stage_info_v1
Stage instrument information.
Definition: psi_stage_bits.h:71
info_GR_STAGE_primary_switch_checks
PSI_stage_info info_GR_STAGE_primary_switch_checks
Definition: plugin_psi.h:197
key_GR_LOCK_multi_primary_action_notification
PSI_mutex_key key_GR_LOCK_multi_primary_action_notification
Definition: plugin_psi.h:99
key_GR_COND_message_service_run
PSI_cond_key key_GR_COND_message_service_run
Definition: plugin_psi.h:154
info_GR_STAGE_multi_primary_mode_switch_step_completion
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_step_completion
Definition: plugin_psi.h:190
key_GR_LOCK_primary_election_secondary_process_run
PSI_mutex_key key_GR_LOCK_primary_election_secondary_process_run
Definition: plugin_psi.h:110
register_group_replication_rwlock_psi_keys
void register_group_replication_rwlock_psi_keys(PSI_rwlock_info *keys, size_t count)
Definition: plugin_psi.cc:522
info_GR_STAGE_single_primary_mode_switch_election
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_election
Definition: plugin_psi.h:203
key_GR_LOCK_primary_election_action_phase
PSI_mutex_key key_GR_LOCK_primary_election_action_phase
Definition: plugin_psi.h:106
key_GR_LOCK_channel_observation_removal
PSI_mutex_key key_GR_LOCK_channel_observation_removal
Definition: plugin_psi.h:84
key_GR_LOCK_group_info_manager
PSI_mutex_key key_GR_LOCK_group_info_manager
Definition: plugin_psi.h:96
key_GR_COND_applier_module_suspend
PSI_cond_key key_GR_COND_applier_module_suspend
Definition: plugin_psi.h:130
info_GR_STAGE_primary_election_old_primary_transactions
PSI_stage_info info_GR_STAGE_primary_election_old_primary_transactions
Definition: plugin_psi.h:196
key_GR_LOCK_clone_handler_run
PSI_mutex_key key_GR_LOCK_clone_handler_run
Definition: plugin_psi.h:86
info_GR_STAGE_autorejoin
PSI_stage_info info_GR_STAGE_autorejoin
Definition: plugin_psi.cc:144
key_GR_LOCK_server_ongoing_transaction_handler
PSI_mutex_key key_GR_LOCK_server_ongoing_transaction_handler
Definition: plugin_psi.h:115
key_GR_LOCK_group_part_handler_run
PSI_mutex_key key_GR_LOCK_group_part_handler_run
Definition: plugin_psi.h:98
key_GR_LOCK_cert_broadcast_run
PSI_mutex_key key_GR_LOCK_cert_broadcast_run
Definition: plugin_psi.h:79
info_GR_STAGE_clone_prepare
PSI_stage_info info_GR_STAGE_clone_prepare
Definition: plugin_psi.h:209
key_GR_COND_synchronized_queue
PSI_cond_key key_GR_COND_synchronized_queue
Definition: plugin_psi.h:157
key_GR_LOCK_primary_election_validation_notification
PSI_mutex_key key_GR_LOCK_primary_election_validation_notification
Definition: plugin_psi.h:111
key_GR_COND_pipeline_stats_flow_control
PSI_cond_key key_GR_COND_pipeline_stats_flow_control
Definition: plugin_psi.h:146
key_GR_COND_applier_module_wait
PSI_cond_key key_GR_COND_applier_module_wait
Definition: plugin_psi.h:131
key_GR_RWLOCK_transaction_consistency_manager_prepared_transactions_on_my_applier
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_prepared_transactions_on_my_applier
Definition: plugin_psi.h:186
key_GR_LOCK_autorejoin_module
PSI_mutex_key key_GR_LOCK_autorejoin_module
Definition: plugin_psi.h:78
key_GR_THD_clone_thd
PSI_thread_key key_GR_THD_clone_thd
Definition: plugin_psi.h:166
key_GR_LOCK_applier_module_run
PSI_mutex_key key_GR_LOCK_applier_module_run
Definition: plugin_psi.cc:30
key_GR_LOCK_primary_election_primary_process_run
PSI_mutex_key key_GR_LOCK_primary_election_primary_process_run
Definition: plugin_psi.h:108
key_GR_LOCK_group_action_coordinator_thread
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread
Definition: plugin_psi.h:94
key_GR_THD_autorejoin
PSI_thread_key key_GR_THD_autorejoin
Definition: plugin_psi.h:164
key_GR_LOCK_pipeline_stats_flow_control
PSI_mutex_key key_GR_LOCK_pipeline_stats_flow_control
Definition: plugin_psi.h:101
register_group_replication_thread_psi_keys
void register_group_replication_thread_psi_keys(PSI_thread_info threads[], size_t thread_count)
Definition: plugin_psi.cc:514
key_GR_LOCK_channel_observation_list
PSI_mutex_key key_GR_LOCK_channel_observation_list
Definition: plugin_psi.h:83
key_GR_COND_group_action_coordinator_thread
PSI_cond_key key_GR_COND_group_action_coordinator_thread
Definition: plugin_psi.h:140
key_GR_LOCK_session_thread_method_exec
PSI_mutex_key key_GR_LOCK_session_thread_method_exec
Definition: plugin_psi.h:117
key_GR_COND_primary_election_secondary_process_run
PSI_cond_key key_GR_COND_primary_election_secondary_process_run
Definition: plugin_psi.h:150
key_GR_COND_view_modification_wait
PSI_cond_key key_GR_COND_view_modification_wait
Definition: plugin_psi.h:158
key_GR_RWLOCK_group_event_observation_list
PSI_rwlock_key key_GR_RWLOCK_group_event_observation_list
Definition: plugin_psi.h:181
key_GR_THD_cert_broadcast
PSI_thread_key key_GR_THD_cert_broadcast
Definition: plugin_psi.h:165
threads
static LIBEVENT_THREAD * threads
Definition: thread.c:65
key_GR_LOCK_plugin_modules_termination
PSI_mutex_key key_GR_LOCK_plugin_modules_termination
Definition: plugin_psi.h:103
key_GR_LOCK_cert_broadcast_dispatcher_run
PSI_mutex_key key_GR_LOCK_cert_broadcast_dispatcher_run
Definition: plugin_psi.h:80
key_GR_THD_message_service_handler
PSI_thread_key key_GR_THD_message_service_handler
Definition: plugin_psi.h:174
info_GR_STAGE_multi_primary_mode_switch_buffered_transactions
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_buffered_transactions
Definition: plugin_psi.h:191
key_GR_LOCK_clone_donor_list
PSI_mutex_key key_GR_LOCK_clone_donor_list
Definition: plugin_psi.h:85
key_GR_LOCK_cert_members
PSI_mutex_key key_GR_LOCK_cert_members
Definition: plugin_psi.h:82
key_GR_LOCK_group_action_coordinator_process
PSI_mutex_key key_GR_LOCK_group_action_coordinator_process
Definition: plugin_psi.h:93
key_GR_LOCK_wait_ticket
PSI_mutex_key key_GR_LOCK_wait_ticket
Definition: plugin_psi.h:125
info_GR_STAGE_multi_primary_mode_switch_pending_transactions
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_pending_transactions
Definition: plugin_psi.h:189
register_group_replication_mutex_psi_keys
void register_group_replication_mutex_psi_keys(PSI_mutex_info mutexes[], size_t mutex_count)
Definition: plugin_psi.cc:498
PSI_thread_key
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:48
key_GR_LOCK_group_member_info_manager_update_lock
PSI_mutex_key key_GR_LOCK_group_member_info_manager_update_lock
Definition: plugin_psi.h:122
count
ssize_t count
Definition: memcached.c:386
key_GR_THD_applier_module_receiver
PSI_thread_key key_GR_THD_applier_module_receiver
Definition: plugin_psi.cc:116
key_GR_RWLOCK_gcs_operations
PSI_rwlock_key key_GR_RWLOCK_gcs_operations
Definition: plugin_psi.h:178
key_GR_COND_applier_module_run
PSI_cond_key key_GR_COND_applier_module_run
Definition: plugin_psi.cc:82
key_GR_LOCK_primary_promotion_policy
PSI_mutex_key key_GR_LOCK_primary_promotion_policy
Definition: plugin_psi.h:127
key_GR_LOCK_write_lock_protection
PSI_mutex_key key_GR_LOCK_write_lock_protection
Definition: plugin_psi.h:126
key_GR_RWLOCK_plugin_stop
PSI_rwlock_key key_GR_RWLOCK_plugin_stop
Definition: plugin_psi.h:183
key_GR_LOCK_pipeline_continuation
PSI_mutex_key key_GR_LOCK_pipeline_continuation
Definition: plugin_psi.h:100
key_GR_LOCK_delayed_init_server_ready
PSI_mutex_key key_GR_LOCK_delayed_init_server_ready
Definition: plugin_psi.h:91
key_GR_COND_pipeline_continuation
PSI_cond_key key_GR_COND_pipeline_continuation
Definition: plugin_psi.h:145
key_GR_COND_session_thread_run
PSI_cond_key key_GR_COND_session_thread_run
Definition: plugin_psi.h:156
key_GR_LOCK_primary_election_action_notification
PSI_mutex_key key_GR_LOCK_primary_election_action_notification
Definition: plugin_psi.h:107
key_GR_RWLOCK_channel_observation_list
PSI_rwlock_key key_GR_RWLOCK_channel_observation_list
Definition: plugin_psi.h:177
key_GR_COND_recovery
PSI_cond_key key_GR_COND_recovery
Definition: plugin_psi.h:152
key_GR_LOCK_trx_unlocking
PSI_mutex_key key_GR_LOCK_trx_unlocking
Definition: plugin_psi.h:121
info_GR_STAGE_module_suspending
PSI_stage_info info_GR_STAGE_module_suspending
Definition: plugin_psi.h:206
PSI_rwlock_key
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:41
key_GR_LOCK_certification_info
PSI_mutex_key key_GR_LOCK_certification_info
Definition: plugin_psi.h:81
key_GR_COND_cert_broadcast_dispatcher_run
PSI_cond_key key_GR_COND_cert_broadcast_dispatcher_run
Definition: plugin_psi.h:133
keys
static uint keys
Definition: hp_test2.cc:43
key_GR_THD_primary_election_secondary_process
PSI_thread_key key_GR_THD_primary_election_secondary_process
Definition: plugin_psi.h:171
info_GR_STAGE_single_primary_mode_switch_completion
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_completion
Definition: plugin_psi.h:204
info_GR_STAGE_module_executing
PSI_stage_info info_GR_STAGE_module_executing
Definition: plugin_psi.h:205
key_GR_LOCK_message_service_run
PSI_mutex_key key_GR_LOCK_message_service_run
Definition: plugin_psi.h:116
key_GR_RWLOCK_transaction_observation_list
PSI_rwlock_key key_GR_RWLOCK_transaction_observation_list
Definition: plugin_psi.h:184
info_GR_STAGE_single_primary_mode_switch_checks
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_checks
Definition: plugin_psi.h:202
key_GR_LOCK_plugin_online
PSI_mutex_key key_GR_LOCK_plugin_online
Definition: plugin_psi.h:104
info_GR_STAGE_recovery_transferring_state
PSI_stage_info info_GR_STAGE_recovery_transferring_state
Definition: plugin_psi.h:208
key_GR_COND_primary_election_validation_notification
PSI_cond_key key_GR_COND_primary_election_validation_notification
Definition: plugin_psi.h:151
register_all_group_replication_psi_keys
void register_all_group_replication_psi_keys()
Definition: plugin_psi.cc:537
key_GR_LOCK_force_members_running
PSI_mutex_key key_GR_LOCK_force_members_running
Definition: plugin_psi.h:92
plugin_server_include.h
key_GR_COND_group_part_handler_abort
PSI_cond_key key_GR_COND_group_part_handler_abort
Definition: plugin_psi.h:142