File: plugin_psi.h

package info (click to toggle)
mysql-8.0 8.0.45-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,048 kB
  • sloc: cpp: 4,685,434; ansic: 412,712; pascal: 108,396; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; python: 21,816; sh: 17,285; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,083; makefile: 1,793; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (251 lines) | stat: -rw-r--r-- 10,042 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/* Copyright (c) 2015, 2025, Oracle and/or its affiliates.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License, version 2.0,
   as published by the Free Software Foundation.

   This program is designed to work with certain software (including
   but not limited to OpenSSL) that is licensed under separate terms,
   as designated in a particular file or component or in included license
   documentation.  The authors of MySQL hereby grant you an additional
   permission to link the program and your derivative works with the
   separately licensed software that they have either included with
   the program or referenced in the documentation.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License, version 2.0, for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */

#ifndef PLUGIN_PSI_INCLUDED
#define PLUGIN_PSI_INCLUDED

#include "plugin/group_replication/include/plugin_server_include.h"

#ifdef HAVE_PSI_INTERFACE

/*
  Register the psi keys for mutexes

  @param[in]  mutexes        PSI mutex info
  @param[in]  mutex_count    The number of elements in mutexes
*/
void register_group_replication_mutex_psi_keys(PSI_mutex_info mutexes[],
                                               size_t mutex_count);

/*
  Register the psi keys for conditions

  @param[in]  conditions     PSI condition info
  @param[in]  cond_count     The number of elements in conditions

*/
void register_group_replication_cond_psi_keys(PSI_cond_info conditions[],
                                              size_t cond_count);

/*
  Register the psi keys for threads

  @param[in]  threads        PSI thread info
  @param[in]  thread_count   The number of elements in threads
*/
void register_group_replication_thread_psi_keys(PSI_thread_info threads[],
                                                size_t thread_count);

/*
  Register the psi keys for rwlocks

  @param[in]  keys           PSI rwlock info
  @param[in]  count          The number of elements in keys
*/
void register_group_replication_rwlock_psi_keys(PSI_rwlock_info *keys,
                                                size_t count);

/*
  Register the psi keys for mutexes, conditions, threads and rwlocks

*/
void register_all_group_replication_psi_keys();
#endif /* HAVE_PSI_INTERFACE */

/* clang-format off */

extern PSI_mutex_key key_GR_LOCK_applier_module_run,
    key_GR_LOCK_applier_module_suspend,
    key_GR_LOCK_autorejoin_module,
    key_GR_LOCK_cert_broadcast_run,
    key_GR_LOCK_cert_broadcast_dispatcher_run,
    key_GR_LOCK_certification_info,
    key_GR_LOCK_cert_members,
    key_GR_LOCK_channel_observation_list,
    key_GR_LOCK_channel_observation_removal,
    key_GR_LOCK_clone_donor_list,
    key_GR_LOCK_clone_handler_run,
    key_GR_LOCK_clone_query,
    key_GR_LOCK_clone_read_mode,
    key_GR_LOCK_count_down_latch,
    key_GR_LOCK_delayed_init_run,
    key_GR_LOCK_delayed_init_server_ready,
    key_GR_LOCK_force_members_running,
    key_GR_LOCK_group_action_coordinator_process,
    key_GR_LOCK_group_action_coordinator_thread,
    key_GR_LOCK_group_action_coordinator_thread_end,
    key_GR_LOCK_group_info_manager,
    key_GR_LOCK_group_part_handler_abort,
    key_GR_LOCK_group_part_handler_run,
    key_GR_LOCK_multi_primary_action_notification,
    key_GR_LOCK_pipeline_continuation,
    key_GR_LOCK_pipeline_stats_flow_control,
    key_GR_LOCK_pipeline_stats_transactions_waiting_apply,
    key_GR_LOCK_plugin_modules_termination,
    key_GR_LOCK_plugin_applier_module_initialize_terminate,
    key_GR_LOCK_plugin_online,
    key_GR_LOCK_primary_election_action_phase,
    key_GR_LOCK_primary_election_action_notification,
    key_GR_LOCK_primary_election_primary_process_run,
    key_GR_LOCK_primary_election_running_flag,
    key_GR_LOCK_primary_election_secondary_process_run,
    key_GR_LOCK_primary_election_validation_notification,
    key_GR_LOCK_recovery,
    key_GR_LOCK_recovery_donor_selection,
    key_GR_LOCK_recovery_module_run,
    key_GR_LOCK_server_ongoing_transaction_handler,
    key_GR_LOCK_message_service_run,
    key_GR_LOCK_session_thread_method_exec,
    key_GR_LOCK_session_thread_run,
    key_GR_LOCK_stage_monitor_handler,
    key_GR_LOCK_synchronized_queue,
    key_GR_LOCK_transaction_monitor_module,
    key_GR_LOCK_trx_unlocking,
    key_GR_LOCK_group_member_info_manager_update_lock,
    key_GR_LOCK_group_member_info_update_lock,
    key_GR_LOCK_view_modification_wait,
    key_GR_LOCK_wait_ticket,
    key_GR_LOCK_write_lock_protection,
    key_GR_LOCK_primary_promotion_policy,
    key_GR_LOCK_mysql_thread_run,
    key_GR_LOCK_mysql_thread_dispatcher_run,
    key_GR_LOCK_connection_map,
    key_GR_LOCK_mysql_thread_handler_run,
    key_GR_LOCK_mysql_thread_handler_dispatcher_run,
    key_GR_LOCK_mysql_thread_handler_read_only_mode_run,
    key_GR_LOCK_mysql_thread_handler_read_only_mode_dispatcher_run;

extern PSI_cond_key key_GR_COND_applier_module_run,
    key_GR_COND_applier_module_suspend,
    key_GR_COND_applier_module_wait,
    key_GR_COND_autorejoin_module,
    key_GR_COND_cert_broadcast_dispatcher_run,
    key_GR_COND_cert_broadcast_run,
    key_GR_COND_clone_handler_run,
    key_GR_COND_count_down_latch,
    key_GR_COND_delayed_init_run,
    key_GR_COND_delayed_init_server_ready,
    key_GR_COND_group_action_coordinator_process,
    key_GR_COND_group_action_coordinator_thread,
    key_GR_COND_group_action_coordinator_thread_end,
    key_GR_COND_group_part_handler_abort,
    key_GR_COND_group_part_handler_run,
    key_GR_COND_multi_primary_action_notification,
    key_GR_COND_pipeline_continuation,
    key_GR_COND_pipeline_stats_flow_control,
    key_GR_COND_plugin_online,
    key_GR_COND_primary_election_action_notification,
    key_GR_COND_primary_election_primary_process_run,
    key_GR_COND_primary_election_secondary_process_run,
    key_GR_COND_primary_election_validation_notification,
    key_GR_COND_recovery,
    key_GR_COND_recovery_module_run,
    key_GR_COND_message_service_run,
    key_GR_COND_session_thread_method_exec,
    key_GR_COND_session_thread_run,
    key_GR_COND_synchronized_queue,
    key_GR_COND_transaction_monitor_module,
    key_GR_COND_view_modification_wait,
    key_GR_COND_wait_ticket,
    key_GR_COND_write_lock_protection,
    key_GR_COND_primary_promotion_policy,
    key_GR_COND_mysql_thread_run,
    key_GR_COND_mysql_thread_dispatcher_run,
    key_GR_COND_mysql_thread_handler_run,
    key_GR_COND_mysql_thread_handler_dispatcher_run,
    key_GR_COND_mysql_thread_handler_read_only_mode_run,
    key_GR_COND_mysql_thread_handler_read_only_mode_dispatcher_run;

extern PSI_thread_key key_GR_THD_applier_module_receiver,
    key_GR_THD_autorejoin,
    key_GR_THD_transaction_monitor,
    key_GR_THD_cert_broadcast,
    key_GR_THD_clone_thd,
    key_GR_THD_delayed_init,
    key_GR_THD_group_action_coordinator,
    key_GR_THD_plugin_session,
    key_GR_THD_primary_election_primary_process,
    key_GR_THD_primary_election_secondary_process,
    key_GR_THD_group_partition_handler,
    key_GR_THD_recovery,
    key_GR_THD_message_service_handler,
    key_GR_THD_mysql_thread,
    key_GR_THD_mysql_thread_handler,
    key_GR_THD_mysql_thread_handler_read_only_mode;

extern PSI_rwlock_key key_GR_RWLOCK_cert_stable_gtid_set,
    key_GR_RWLOCK_channel_observation_list,
    key_GR_RWLOCK_gcs_operations,
    key_GR_RWLOCK_gcs_operations_view_change_observers,
    key_GR_RWLOCK_group_event_observation_list,
    key_GR_RWLOCK_io_cache_unused_list,
    key_GR_RWLOCK_plugin_running,
    key_GR_RWLOCK_plugin_stop,
    key_GR_RWLOCK_transaction_observation_list,
    key_GR_RWLOCK_transaction_consistency_manager_map,
    key_GR_RWLOCK_transaction_consistency_manager_prepared_transactions_on_my_applier,
    key_GR_RWLOCK_flow_control_module_info,
    key_GR_RWLOCK_transaction_consistency_info_members_that_must_prepare_the_transaction;

extern PSI_stage_info info_GR_STAGE_autorejoin,
    info_GR_STAGE_multi_primary_mode_switch_pending_transactions,
    info_GR_STAGE_multi_primary_mode_switch_step_completion,
    info_GR_STAGE_multi_primary_mode_switch_buffered_transactions,
    info_GR_STAGE_multi_primary_mode_switch_completion,
    info_GR_STAGE_primary_election_buffered_transactions,
    info_GR_STAGE_primary_election_pending_transactions,
    info_GR_STAGE_primary_election_group_read_only,
    info_GR_STAGE_primary_election_old_primary_transactions,
    info_GR_STAGE_primary_switch_checks,
    info_GR_STAGE_primary_switch_pending_transactions,
    info_GR_STAGE_primary_switch_election,
    info_GR_STAGE_primary_switch_step_completion,
    info_GR_STAGE_primary_switch_completion,
    info_GR_STAGE_single_primary_mode_switch_checks,
    info_GR_STAGE_single_primary_mode_switch_election,
    info_GR_STAGE_single_primary_mode_switch_completion,
    info_GR_STAGE_module_executing,
    info_GR_STAGE_module_suspending,
    info_GR_STAGE_recovery_connecting_to_donor,
    info_GR_STAGE_recovery_transferring_state,
    info_GR_STAGE_clone_prepare,
    info_GR_STAGE_clone_execute;

extern PSI_memory_key key_write_set_encoded,
    key_certification_data,
    key_certification_data_gc,
    key_certification_info,
    key_transaction_data,
    key_sql_service_command_data,
    key_mysql_thread_queued_task,
    key_message_service_queue,
    key_message_service_received_message,
    key_group_member_info,
    key_consistent_members_that_must_prepare_transaction,
    key_consistent_transactions,
    key_consistent_transactions_prepared,
    key_consistent_transactions_waiting,
    key_consistent_transactions_delayed_view_change;
/* clang-format on */

#endif /* PLUGIN_PSI_INCLUDED */