MySQL  8.0.20
Source Code Documentation
plugin_psi.h
Go to the documentation of this file.
1 /* Copyright (c) 2015, 2020, 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 
188 
212 
213 /* clang-format on */
214 
215 #endif /* PLUGIN_PSI_INCLUDED */
PSI_mutex_key key_GR_LOCK_plugin_running
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_view_modification_wait
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_session_thread_run
Definition: plugin_psi.cc:30
PSI_rwlock_key key_GR_RWLOCK_io_cache_unused_list
Definition: plugin_psi.cc:129
void register_group_replication_thread_psi_keys(PSI_thread_info threads[], size_t thread_count)
Definition: plugin_psi.cc:519
PSI_thread_key key_GR_THD_primary_election_primary_process
Definition: plugin_psi.cc:116
PSI_mutex_key key_GR_LOCK_wait_ticket
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_channel_observation_removal
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_cert_broadcast_run
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_stage_monitor_handler
Definition: plugin_psi.cc:30
PSI_thread_key key_GR_THD_plugin_session
Definition: plugin_psi.cc:116
PSI_mutex_key key_GR_LOCK_delayed_init_server_ready
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_trx_unlocking
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_primary_election_validation_notification
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_session_thread_method_exec
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_clone_read_mode
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_group_part_handler_abort
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_recovery_donor_selection
Definition: plugin_psi.cc:30
ssize_t count
Definition: memcached.c:386
PSI_cond_key key_GR_COND_group_part_handler_run
Definition: plugin_psi.cc:82
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_pending_transactions
Definition: plugin_psi.cc:148
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_step_completion
Definition: plugin_psi.cc:151
PSI_stage_info info_GR_STAGE_module_executing
Definition: plugin_psi.cc:198
PSI_mutex_key key_GR_LOCK_session_thread_method_exec
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_autorejoin_module
Definition: plugin_psi.cc:82
PSI_thread_key key_GR_THD_delayed_init
Definition: plugin_psi.cc:116
PSI_mutex_key key_GR_LOCK_count_down_latch
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_pipeline_stats_flow_control
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_group_member_info_manager_update_lock
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_primary_promotion_policy
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_server_ongoing_transaction_handler
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_clone_query
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_applier_module_wait
Definition: plugin_psi.cc:82
PSI_cond_key key_GR_COND_recovery_module_run
Definition: plugin_psi.cc:82
PSI_stage_info info_GR_STAGE_clone_prepare
Definition: plugin_psi.cc:208
void register_all_group_replication_psi_keys()
Definition: plugin_psi.cc:542
PSI_thread_key key_GR_THD_autorejoin
Definition: plugin_psi.cc:116
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_checks
Definition: plugin_psi.cc:187
PSI_rwlock_key key_GR_RWLOCK_flow_control_module_info
Definition: plugin_psi.cc:129
Condition information.
Definition: psi_cond_bits.h:85
PSI_mutex_key key_GR_LOCK_force_members_running
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_plugin_modules_termination
Definition: plugin_psi.cc:30
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:49
PSI_cond_key key_GR_COND_group_part_handler_abort
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_primary_election_action_phase
Definition: plugin_psi.cc:30
PSI_stage_info info_GR_STAGE_primary_election_old_primary_transactions
Definition: plugin_psi.cc:169
PSI_rwlock_key key_GR_RWLOCK_transaction_observation_list
Definition: plugin_psi.cc:129
PSI_stage_info info_GR_STAGE_primary_switch_checks
Definition: plugin_psi.cc:172
PSI_stage_info info_GR_STAGE_recovery_connecting_to_donor
Definition: plugin_psi.cc:202
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:41
PSI_rwlock_key key_GR_RWLOCK_gcs_operations_view_change_observers
Definition: plugin_psi.cc:129
PSI_cond_key key_GR_COND_plugin_online
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_session_thread_run
Definition: plugin_psi.cc:82
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_prepared_transactions_on_my_applier
Definition: plugin_psi.cc:129
PSI_mutex_key key_GR_LOCK_cert_broadcast_run
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_group_action_coordinator_thread_end
Definition: plugin_psi.cc:82
Stage instrument information.
Definition: psi_stage_bits.h:71
PSI_rwlock_key key_GR_RWLOCK_transaction_consistency_manager_map
Definition: plugin_psi.cc:129
void register_group_replication_rwlock_psi_keys(PSI_rwlock_info *keys, size_t count)
Definition: plugin_psi.cc:527
PSI_cond_key key_GR_COND_primary_election_secondary_process_run
Definition: plugin_psi.cc:82
PSI_cond_key key_GR_COND_delayed_init_run
Definition: plugin_psi.cc:82
PSI_rwlock_key key_GR_RWLOCK_group_event_observation_list
Definition: plugin_psi.cc:129
PSI_thread_key key_GR_THD_primary_election_secondary_process
Definition: plugin_psi.cc:116
PSI_thread_key key_GR_THD_group_partition_handler
Definition: plugin_psi.cc:116
PSI_stage_info info_GR_STAGE_primary_switch_step_completion
Definition: plugin_psi.cc:181
PSI_stage_info info_GR_STAGE_primary_election_buffered_transactions
Definition: plugin_psi.cc:160
PSI_mutex_key key_GR_LOCK_autorejoin_module
Definition: plugin_psi.cc:30
PSI_thread_key key_GR_THD_recovery
Definition: plugin_psi.cc:116
PSI_stage_info info_GR_STAGE_primary_switch_pending_transactions
Definition: plugin_psi.cc:175
static uint keys
Definition: hp_test2.cc:45
PSI_cond_key key_GR_COND_delayed_init_server_ready
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_primary_election_running_flag
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_cert_broadcast_dispatcher_run
Definition: plugin_psi.cc:82
PSI_cond_key key_GR_COND_write_lock_protection
Definition: plugin_psi.cc:82
PSI_cond_key key_GR_COND_recovery
Definition: plugin_psi.cc:82
PSI_thread_key key_GR_THD_message_service_handler
Definition: plugin_psi.cc:116
PSI_rwlock_key key_GR_RWLOCK_gcs_operations
Definition: plugin_psi.cc:129
PSI_mutex_key key_GR_LOCK_recovery_module_run
Definition: plugin_psi.cc:30
PSI_thread_key key_GR_THD_group_action_coordinator
Definition: plugin_psi.cc:116
Rwlock information.
Definition: psi_rwlock_bits.h:159
PSI_mutex_key key_GR_LOCK_write_lock_protection
Definition: plugin_psi.cc:30
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_completion
Definition: plugin_psi.cc:157
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:41
PSI_thread_key key_GR_THD_cert_broadcast
Definition: plugin_psi.cc:116
PSI_cond_key key_GR_COND_clone_handler_run
Definition: plugin_psi.cc:82
static LIBEVENT_THREAD * threads
Definition: thread.c:65
PSI_cond_key key_GR_COND_pipeline_stats_flow_control
Definition: plugin_psi.cc:82
PSI_rwlock_key key_GR_RWLOCK_channel_observation_list
Definition: plugin_psi.cc:129
PSI_mutex_key key_GR_LOCK_applier_module_run
Definition: plugin_psi.cc:30
Mutex information.
Definition: psi_mutex_bits.h:70
PSI_mutex_key key_GR_LOCK_group_action_coordinator_thread_end
Definition: plugin_psi.cc:30
PSI_stage_info info_GR_STAGE_multi_primary_mode_switch_buffered_transactions
Definition: plugin_psi.cc:154
PSI_mutex_key key_GR_LOCK_certification_info
Definition: plugin_psi.cc:30
PSI_stage_info info_GR_STAGE_module_suspending
Definition: plugin_psi.cc:200
void register_group_replication_mutex_psi_keys(PSI_mutex_info mutexes[], size_t mutex_count)
Definition: plugin_psi.cc:503
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_completion
Definition: plugin_psi.cc:193
Thread instrument information.
Definition: psi_thread_bits.h:78
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:48
PSI_mutex_key key_GR_LOCK_delayed_init_run
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_group_action_coordinator_process
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_applier_module_suspend
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_group_action_coordinator_process
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_primary_election_action_notification
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_clone_handler_run
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_primary_election_primary_process_run
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_cert_members
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_message_service_run
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_clone_donor_list
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_applier_module_run
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_group_info_manager
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_count_down_latch
Definition: plugin_psi.cc:82
PSI_stage_info info_GR_STAGE_recovery_transferring_state
Definition: plugin_psi.cc:204
PSI_rwlock_key key_GR_RWLOCK_gcs_operations_finalize_ongoing
Definition: plugin_psi.cc:129
PSI_cond_key key_GR_COND_primary_election_action_notification
Definition: plugin_psi.cc:82
PSI_stage_info info_GR_STAGE_autorejoin
Definition: plugin_psi.cc:145
PSI_mutex_key key_GR_LOCK_group_part_handler_run
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_group_action_coordinator_thread
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_recovery
Definition: plugin_psi.cc:30
PSI_rwlock_key key_GR_RWLOCK_cert_stable_gtid_set
Definition: plugin_psi.cc:129
PSI_mutex_key key_GR_LOCK_view_modification_wait
Definition: plugin_psi.cc:30
PSI_stage_info info_GR_STAGE_clone_execute
Definition: plugin_psi.cc:211
PSI_stage_info info_GR_STAGE_primary_election_group_read_only
Definition: plugin_psi.cc:166
PSI_mutex_key key_GR_LOCK_synchronized_queue
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_pipeline_continuation
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_primary_election_secondary_process_run
Definition: plugin_psi.cc:30
PSI_thread_key key_GR_THD_applier_module_receiver
Definition: plugin_psi.cc:116
PSI_mutex_key key_GR_LOCK_plugin_online
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_primary_promotion_policy
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_cert_broadcast_dispatcher_run
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_multi_primary_action_notification
Definition: plugin_psi.cc:30
PSI_rwlock_key key_GR_RWLOCK_plugin_stop
Definition: plugin_psi.cc:129
PSI_cond_key key_GR_COND_applier_module_suspend
Definition: plugin_psi.cc:82
PSI_stage_info info_GR_STAGE_primary_election_pending_transactions
Definition: plugin_psi.cc:163
PSI_stage_info info_GR_STAGE_single_primary_mode_switch_election
Definition: plugin_psi.cc:190
PSI_stage_info info_GR_STAGE_primary_switch_completion
Definition: plugin_psi.cc:184
PSI_cond_key key_GR_COND_synchronized_queue
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_message_service_run
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_pipeline_stats_transactions_waiting_apply
Definition: plugin_psi.cc:30
PSI_mutex_key key_GR_LOCK_channel_observation_list
Definition: plugin_psi.cc:30
PSI_stage_info info_GR_STAGE_primary_switch_election
Definition: plugin_psi.cc:178
void register_group_replication_cond_psi_keys(PSI_cond_info conditions[], size_t cond_count)
Definition: plugin_psi.cc:511
PSI_cond_key key_GR_COND_wait_ticket
Definition: plugin_psi.cc:82
PSI_cond_key key_GR_COND_pipeline_continuation
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_primary_election_primary_process_run
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_primary_election_validation_notification
Definition: plugin_psi.cc:82
PSI_mutex_key key_GR_LOCK_group_member_info_update_lock
Definition: plugin_psi.cc:30
PSI_cond_key key_GR_COND_multi_primary_action_notification
Definition: plugin_psi.cc:82
PSI_thread_key key_GR_THD_clone_thd
Definition: plugin_psi.cc:116