MySQL 9.1.0
Source Code Documentation
pfs_visitor.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 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 PFS_VISITOR_H
25#define PFS_VISITOR_H
26
27#include <sys/types.h>
28
29#include "my_compiler.h"
30#include "mysqld_error.h"
32
34
35/**
36 @file storage/perfschema/pfs_visitor.h
37 Visitors (declarations).
38*/
39
40/**
41 @addtogroup performance_schema_buffers
42 @{
43*/
44
45struct PFS_user;
46struct PFS_account;
47struct PFS_host;
48struct PFS_thread;
49struct PFS_instr_class;
50struct PFS_mutex_class;
51struct PFS_rwlock_class;
52struct PFS_cond_class;
53struct PFS_file_class;
54struct PFS_socket_class;
55struct PFS_memory_class;
56struct PFS_table_share;
57struct PFS_mutex;
58struct PFS_rwlock;
59struct PFS_cond;
60struct PFS_file;
61struct PFS_table;
62struct PFS_stage_class;
65struct PFS_error_class;
66struct PFS_socket;
68
69/**
70 Interface class to visit groups of connections.
71 @sa PFS_connection_iterator
72*/
74 public:
76 virtual ~PFS_connection_visitor() = default;
77 /** Visit all connections. */
78 virtual void visit_global() {}
79 /** Visit all connections of a host. */
80 virtual void visit_host(PFS_host *) {}
81 /** Visit all connections of a user+host. */
82 virtual void visit_account(PFS_account *) {}
83 /** Visit all connections of a user. */
84 virtual void visit_user(PFS_user *) {}
85 /** Visit a thread. */
86 virtual void visit_thread(PFS_thread *) {}
87 /** Visit a @c THD associated with a thread. */
88 virtual void visit_THD(THD *) {}
89};
90
91/**
92 Iterator over groups of connections.
93 @sa PFS_connection_visitor
94*/
96 public:
97 /**
98 Visit all connections.
99 @param with_hosts when true, visit also all hosts.
100 @param with_users when true, visit also all users.
101 @param with_accounts when true, visit also all user+host.
102 @param with_threads when true, visit also all threads.
103 @param with_THDs when true, visit also all threads THD.
104 @param visitor the visitor to call
105 */
106 static void visit_global(bool with_hosts, bool with_users, bool with_accounts,
107 bool with_threads, bool with_THDs,
108 PFS_connection_visitor *visitor);
109 /**
110 Visit all connections of a host.
111 @param host the host to visit.
112 @param with_accounts when true, visit also all related user+host.
113 @param with_threads when true, visit also all related threads.
114 @param with_THDs when true, visit also all related threads THD.
115 @param visitor the visitor to call
116 */
117 static void visit_host(PFS_host *host, bool with_accounts, bool with_threads,
118 bool with_THDs, PFS_connection_visitor *visitor);
119 /**
120 Visit all connections of a user.
121 @param user the user to visit.
122 @param with_accounts when true, visit also all related user+host.
123 @param with_threads when true, visit also all related threads.
124 @param with_THDs when true, visit also all related threads THD.
125 @param visitor the visitor to call
126 */
127 static void visit_user(PFS_user *user, bool with_accounts, bool with_threads,
128 bool with_THDs, PFS_connection_visitor *visitor);
129 /**
130 Visit all connections of a user+host.
131 @param account the user+host to visit.
132 @param with_threads when true, visit also all related threads.
133 @param with_THDs when true, visit also all related threads THD.
134 @param visitor the visitor to call
135 */
136 static void visit_account(PFS_account *account, bool with_threads,
137 bool with_THDs, PFS_connection_visitor *visitor);
138 /**
139 Visit a thread or connection.
140 @param thread the thread to visit.
141 @param visitor the visitor to call
142 */
143 static inline void visit_thread(PFS_thread *thread,
144 PFS_connection_visitor *visitor) {
145 visitor->visit_thread(thread);
146 }
147
148 /**
149 Visit @c THD.
150 @param thd the THD to visit.
151 @param visitor the visitor to call.
152 */
153 static inline void visit_THD(THD *thd, PFS_connection_visitor *visitor) {
154 visitor->visit_THD(thd);
155 }
156};
157
158/**
159 Interface class to visit groups of instrumentation point instances.
160 @sa PFS_instance_iterator
161*/
163 public:
165 virtual ~PFS_instance_visitor() = default;
166 /** Visit a mutex class. */
168 /** Visit a rwlock class. */
170 /** Visit a cond class. */
172 /** Visit a file class. */
174 /** Visit a socket class. */
176 /** Visit a mutex instance. */
177 virtual void visit_mutex(PFS_mutex *) {}
178 /** Visit a rwlock instance. */
179 virtual void visit_rwlock(PFS_rwlock *) {}
180 /** Visit a cond instance. */
181 virtual void visit_cond(PFS_cond *) {}
182 /** Visit a file instance. */
183 virtual void visit_file(PFS_file *) {}
184 /** Visit a socket instance. */
185 virtual void visit_socket(PFS_socket *) {}
186};
187
188/**
189 Iterator over groups of instrumentation point instances.
190 @sa PFS_instance_visitor
191*/
193 public:
194 static void visit_all(PFS_instance_visitor *visitor);
195 static void visit_all_mutex(PFS_instance_visitor *visitor);
196 static void visit_all_mutex_classes(PFS_instance_visitor *visitor);
198 static void visit_all_rwlock(PFS_instance_visitor *visitor);
201 static void visit_all_cond(PFS_instance_visitor *visitor);
202 static void visit_all_cond_classes(PFS_instance_visitor *visitor);
204 static void visit_all_file(PFS_instance_visitor *visitor);
205 static void visit_all_file_classes(PFS_instance_visitor *visitor);
207
208 /**
209 Visit a mutex class and related instances.
210 @param klass the klass to visit.
211 @param visitor the visitor to call
212 */
213 static void visit_mutex_instances(PFS_mutex_class *klass,
214 PFS_instance_visitor *visitor);
215 /**
216 Visit a rwlock class and related instances.
217 @param klass the klass to visit.
218 @param visitor the visitor to call
219 */
220 static void visit_rwlock_instances(PFS_rwlock_class *klass,
221 PFS_instance_visitor *visitor);
222 /**
223 Visit a cond class and related instances.
224 @param klass the klass to visit.
225 @param visitor the visitor to call
226 */
227 static void visit_cond_instances(PFS_cond_class *klass,
228 PFS_instance_visitor *visitor);
229 /**
230 Visit a file class and related instances.
231 @param klass the klass to visit.
232 @param visitor the visitor to call
233 */
234 static void visit_file_instances(PFS_file_class *klass,
235 PFS_instance_visitor *visitor);
236 /**
237 Visit a socket class and related instances.
238 @param klass the klass to visit.
239 @param visitor the visitor to call
240 */
241 static void visit_socket_instances(PFS_socket_class *klass,
242 PFS_instance_visitor *visitor);
243 /**
244 Visit a socket class and related instances.
245 @param klass the klass to visit.
246 @param visitor the visitor to call
247 @param thread the owning thread to match
248 @param visit_class if true then visit the socket class
249 */
250 static void visit_socket_instances(PFS_socket_class *klass,
251 PFS_instance_visitor *visitor,
252 PFS_thread *thread,
253 bool visit_class = true);
254 /**
255 Visit an instrument class and related instances.
256 @param klass the klass to visit.
257 @param visitor the visitor to call
258 @param thread comparison criteria
259 @param visit_class if true then visit the class
260 */
261 static void visit_instances(PFS_instr_class *klass,
262 PFS_instance_visitor *visitor, PFS_thread *thread,
263 bool visit_class = true);
264};
265
266/**
267 Interface class to visit groups of SQL objects.
268 @sa PFS_object_iterator
269*/
271 public:
273 virtual ~PFS_object_visitor() = default;
274 /** Visit global data. */
275 virtual void visit_global() {}
276 /** Visit a table share. */
278 /** Visit a table share index. */
280 uint index [[maybe_unused]]) {}
281 /** Visit a table. */
282 virtual void visit_table(PFS_table *) {}
283 /** Visit a table index. */
284 virtual void visit_table_index(PFS_table *, uint index [[maybe_unused]]) {}
285};
286
287/**
288 Iterator over groups of SQL objects.
289 @sa PFS_object_visitor
290*/
292 public:
293 /** Visit all objects. */
294 static void visit_all(PFS_object_visitor *visitor);
295 /** Visit all tables and related handles. */
296 static void visit_all_tables(PFS_object_visitor *visitor);
297 /** Visit a table and related table handles. */
298 static void visit_tables(PFS_table_share *share, PFS_object_visitor *visitor);
299 /** Visit a table index and related table handles indexes. */
300 static void visit_table_indexes(PFS_table_share *share, uint index,
301 PFS_object_visitor *visitor);
302};
303
304/**
305 A concrete connection visitor that aggregates
306 wait statistics for a given event_name.
307*/
309 public:
310 /** Constructor. */
313 void visit_global() override;
314 void visit_host(PFS_host *pfs) override;
315 void visit_account(PFS_account *pfs) override;
316 void visit_user(PFS_user *pfs) override;
317 void visit_thread(PFS_thread *pfs) override;
318
319 /** EVENT_NAME instrument index. */
321 /** Wait statistic collected. */
323};
324
325/**
326 A concrete connection visitor that aggregates
327 wait statistics for all events.
328*/
330 public:
331 /** Constructor. */
334 void visit_global() override;
335 void visit_host(PFS_host *pfs) override;
336 void visit_account(PFS_account *pfs) override;
337 void visit_user(PFS_user *pfs) override;
338 void visit_thread(PFS_thread *pfs) override;
339
340 /** Wait statistic collected. */
342
343 private:
345};
346
347/**
348 A concrete connection visitor that aggregates
349 stage statistics.
350*/
352 public:
353 /** Constructor. */
356 void visit_global() override;
357 void visit_host(PFS_host *pfs) override;
358 void visit_account(PFS_account *pfs) override;
359 void visit_user(PFS_user *pfs) override;
360 void visit_thread(PFS_thread *pfs) override;
361
362 /** EVENT_NAME instrument index. */
364 /** Stage statistic collected. */
366};
367
368/**
369 A concrete connection visitor that aggregates
370 statement statistics for a given event_name.
371*/
373 public:
374 /** Constructor. */
377 void visit_global() override;
378 void visit_host(PFS_host *pfs) override;
379 void visit_account(PFS_account *pfs) override;
380 void visit_user(PFS_user *pfs) override;
381 void visit_thread(PFS_thread *pfs) override;
382
383 /** EVENT_NAME instrument index. */
385 /** Statement statistic collected. */
387};
388
389/**
390 A concrete connection visitor that aggregates
391 statement statistics for all events.
392*/
394 public:
395 /** Constructor. */
398 void visit_global() override;
399 void visit_host(PFS_host *pfs) override;
400 void visit_account(PFS_account *pfs) override;
401 void visit_user(PFS_user *pfs) override;
402 void visit_thread(PFS_thread *pfs) override;
403
404 /** Statement statistic collected. */
406
407 private:
409};
410
411/**
412 A concrete connection visitor that aggregates
413 transaction statistics for a given event_name.
414*/
416 public:
417 /** Constructor. */
420 void visit_global() override;
421 void visit_host(PFS_host *pfs) override;
422 void visit_account(PFS_account *pfs) override;
423 void visit_user(PFS_user *pfs) override;
424 void visit_thread(PFS_thread *pfs) override;
425
426 /** EVENT_NAME instrument index. */
428 /** Transaction statistic collected. */
430};
431
432/**
433 A concrete connection visitor that aggregates
434 Error statistics for a given event_name.
435*/
437 public:
438 /** Constructor. */
441 void visit_global() override;
442 void visit_host(PFS_host *pfs) override;
443 void visit_account(PFS_account *pfs) override;
444 void visit_user(PFS_user *pfs) override;
445 void visit_thread(PFS_thread *pfs) override;
446
447 /** EVENT_NAME instrument index. */
449 /** index of a specific error. */
451 /** Error statistic collected. */
453};
454
455/**
456 A concrete connection visitor that aggregates
457 connection statistics.
458*/
460 public:
461 /** Constructor. */
464 void visit_global() override;
465 void visit_host(PFS_host *pfs) override;
466 void visit_account(PFS_account *pfs) override;
467 void visit_user(PFS_user *pfs) override;
468 void visit_thread(PFS_thread *pfs) override;
469
470 /** Connection statistic collected. */
472};
473
474/**
475 A concrete connection visitor that aggregates
476 memory statistics for a given event_name.
477*/
479 public:
480 /** Constructor. */
483 void visit_global() override;
484 void visit_host(PFS_host *pfs) override;
485 void visit_account(PFS_account *pfs) override;
486 void visit_user(PFS_user *pfs) override;
487 void visit_thread(PFS_thread *pfs) override;
488
489 /** EVENT_NAME instrument index. */
491 /** Statement statistic collected. */
493};
494
495/**
496 A concrete connection visitor that aggregates
497 status variables.
498*/
500 public:
501 /** Constructor. */
504 void visit_global() override;
505 void visit_host(PFS_host *pfs) override;
506 void visit_account(PFS_account *pfs) override;
507 void visit_user(PFS_user *pfs) override;
508 void visit_thread(PFS_thread *pfs) override;
509 void visit_THD(THD *thd) override;
510
511 private:
513};
514
515/**
516 A concrete instance visitor that aggregates
517 wait statistics.
518*/
520 public:
523 void visit_mutex_class(PFS_mutex_class *pfs) override;
525 void visit_cond_class(PFS_cond_class *pfs) override;
526 void visit_file_class(PFS_file_class *pfs) override;
528 void visit_mutex(PFS_mutex *pfs) override;
529 void visit_rwlock(PFS_rwlock *pfs) override;
530 void visit_cond(PFS_cond *pfs) override;
531 void visit_file(PFS_file *pfs) override;
532 void visit_socket(PFS_socket *pfs) override;
533
534 /** Wait statistic collected. */
536};
537
538/**
539 A concrete object visitor that aggregates
540 object wait statistics.
541*/
543 public:
546 void visit_global() override;
547 void visit_table_share(PFS_table_share *pfs) override;
548 void visit_table(PFS_table *pfs) override;
549
550 /** Object wait statistic collected. */
552};
553
554/**
555 A concrete object visitor that aggregates
556 table I/O wait statistics.
557*/
559 public:
562 void visit_global() override;
563 void visit_table_share(PFS_table_share *pfs) override;
564 void visit_table(PFS_table *pfs) override;
565
566 /** Table I/O wait statistic collected. */
568};
569
570/**
571 A concrete object visitor that aggregates
572 table I/O statistics.
573*/
575 public:
578 void visit_table_share(PFS_table_share *pfs) override;
579 void visit_table(PFS_table *pfs) override;
580
581 /** Table I/O statistic collected. */
583};
584
585/**
586 A concrete object visitor that aggregates
587 index I/O statistics.
588*/
590 public:
593 void visit_table_share_index(PFS_table_share *pfs, uint index) override;
594 void visit_table_index(PFS_table *pfs, uint index) override;
595
596 /** Index I/O statistic collected. */
598};
599
600/**
601 A concrete object visitor that aggregates
602 table lock wait statistics.
603*/
605 public:
608 void visit_global() override;
609 void visit_table_share(PFS_table_share *pfs) override;
610 void visit_table(PFS_table *pfs) override;
611
612 /** Table lock wait statistic collected. */
614};
615
616/**
617 A concrete object visitor that aggregates
618 table lock statistics.
619*/
621 public:
624 void visit_table_share(PFS_table_share *pfs) override;
625 void visit_table(PFS_table *pfs) override;
626
627 /** Table lock statistic collected. */
629};
630
631/**
632 A concrete instance visitor that aggregates
633 socket wait and byte count statistics.
634*/
636 public:
640 void visit_socket(PFS_socket *pfs) override;
641
642 /** Wait and byte count statistics collected. */
644};
645
646/**
647 A concrete instance visitor that aggregates
648 file wait and byte count statistics.
649*/
651 public:
654 void visit_file_class(PFS_file_class *pfs) override;
655 void visit_file(PFS_file *pfs) override;
656
657 /** Wait and byte count statistics collected. */
659};
660
661/** @} */
662#endif
A concrete connection visitor that aggregates statement statistics for all events.
Definition: pfs_visitor.h:393
PFS_statement_stat m_stat
Statement statistic collected.
Definition: pfs_visitor.h:405
A concrete connection visitor that aggregates wait statistics for all events.
Definition: pfs_visitor.h:329
PFS_single_stat m_stat
Wait statistic collected.
Definition: pfs_visitor.h:341
A concrete connection visitor that aggregates Error statistics for a given event_name.
Definition: pfs_visitor.h:436
uint m_error_index
index of a specific error.
Definition: pfs_visitor.h:450
PFS_error_single_stat m_stat
Error statistic collected.
Definition: pfs_visitor.h:452
uint m_index
EVENT_NAME instrument index.
Definition: pfs_visitor.h:448
Iterator over groups of connections.
Definition: pfs_visitor.h:95
static void visit_thread(PFS_thread *thread, PFS_connection_visitor *visitor)
Visit a thread or connection.
Definition: pfs_visitor.h:143
static void visit_THD(THD *thd, PFS_connection_visitor *visitor)
Visit THD.
Definition: pfs_visitor.h:153
A concrete connection visitor that aggregates memory statistics for a given event_name.
Definition: pfs_visitor.h:478
uint m_index
EVENT_NAME instrument index.
Definition: pfs_visitor.h:490
PFS_memory_monitoring_stat m_stat
Statement statistic collected.
Definition: pfs_visitor.h:492
A concrete connection visitor that aggregates stage statistics.
Definition: pfs_visitor.h:351
PFS_stage_stat m_stat
Stage statistic collected.
Definition: pfs_visitor.h:365
uint m_index
EVENT_NAME instrument index.
Definition: pfs_visitor.h:363
A concrete connection visitor that aggregates connection statistics.
Definition: pfs_visitor.h:459
PFS_connection_stat m_stat
Connection statistic collected.
Definition: pfs_visitor.h:471
A concrete connection visitor that aggregates statement statistics for a given event_name.
Definition: pfs_visitor.h:372
uint m_index
EVENT_NAME instrument index.
Definition: pfs_visitor.h:384
PFS_statement_stat m_stat
Statement statistic collected.
Definition: pfs_visitor.h:386
A concrete connection visitor that aggregates status variables.
Definition: pfs_visitor.h:499
System_status_var * m_status_vars
Definition: pfs_visitor.h:512
A concrete connection visitor that aggregates transaction statistics for a given event_name.
Definition: pfs_visitor.h:415
uint m_index
EVENT_NAME instrument index.
Definition: pfs_visitor.h:427
PFS_transaction_stat m_stat
Transaction statistic collected.
Definition: pfs_visitor.h:429
Interface class to visit groups of connections.
Definition: pfs_visitor.h:73
virtual void visit_global()
Visit all connections.
Definition: pfs_visitor.h:78
virtual void visit_user(PFS_user *)
Visit all connections of a user.
Definition: pfs_visitor.h:84
virtual void visit_host(PFS_host *)
Visit all connections of a host.
Definition: pfs_visitor.h:80
virtual void visit_account(PFS_account *)
Visit all connections of a user+host.
Definition: pfs_visitor.h:82
virtual void visit_thread(PFS_thread *)
Visit a thread.
Definition: pfs_visitor.h:86
virtual void visit_THD(THD *)
Visit a THD associated with a thread.
Definition: pfs_visitor.h:88
PFS_connection_visitor()=default
virtual ~PFS_connection_visitor()=default
A concrete connection visitor that aggregates wait statistics for a given event_name.
Definition: pfs_visitor.h:308
uint m_index
EVENT_NAME instrument index.
Definition: pfs_visitor.h:320
PFS_single_stat m_stat
Wait statistic collected.
Definition: pfs_visitor.h:322
A concrete object visitor that aggregates index I/O statistics.
Definition: pfs_visitor.h:589
PFS_table_io_stat m_stat
Index I/O statistic collected.
Definition: pfs_visitor.h:597
A concrete instance visitor that aggregates file wait and byte count statistics.
Definition: pfs_visitor.h:650
PFS_file_io_stat m_file_io_stat
Wait and byte count statistics collected.
Definition: pfs_visitor.h:658
Iterator over groups of instrumentation point instances.
Definition: pfs_visitor.h:192
A concrete instance visitor that aggregates socket wait and byte count statistics.
Definition: pfs_visitor.h:635
PFS_socket_io_stat m_socket_io_stat
Wait and byte count statistics collected.
Definition: pfs_visitor.h:643
Interface class to visit groups of instrumentation point instances.
Definition: pfs_visitor.h:162
virtual void visit_rwlock(PFS_rwlock *)
Visit a rwlock instance.
Definition: pfs_visitor.h:179
PFS_instance_visitor()=default
virtual ~PFS_instance_visitor()=default
virtual void visit_mutex(PFS_mutex *)
Visit a mutex instance.
Definition: pfs_visitor.h:177
virtual void visit_mutex_class(PFS_mutex_class *)
Visit a mutex class.
Definition: pfs_visitor.h:167
virtual void visit_file_class(PFS_file_class *)
Visit a file class.
Definition: pfs_visitor.h:173
virtual void visit_cond_class(PFS_cond_class *)
Visit a cond class.
Definition: pfs_visitor.h:171
virtual void visit_rwlock_class(PFS_rwlock_class *)
Visit a rwlock class.
Definition: pfs_visitor.h:169
virtual void visit_cond(PFS_cond *)
Visit a cond instance.
Definition: pfs_visitor.h:181
virtual void visit_socket(PFS_socket *)
Visit a socket instance.
Definition: pfs_visitor.h:185
virtual void visit_socket_class(PFS_socket_class *)
Visit a socket class.
Definition: pfs_visitor.h:175
virtual void visit_file(PFS_file *)
Visit a file instance.
Definition: pfs_visitor.h:183
A concrete instance visitor that aggregates wait statistics.
Definition: pfs_visitor.h:519
PFS_single_stat m_stat
Wait statistic collected.
Definition: pfs_visitor.h:535
Iterator over groups of SQL objects.
Definition: pfs_visitor.h:291
Interface class to visit groups of SQL objects.
Definition: pfs_visitor.h:270
PFS_object_visitor()=default
virtual void visit_table_share_index(PFS_table_share *, uint index)
Visit a table share index.
Definition: pfs_visitor.h:279
virtual ~PFS_object_visitor()=default
virtual void visit_table_index(PFS_table *, uint index)
Visit a table index.
Definition: pfs_visitor.h:284
virtual void visit_global()
Visit global data.
Definition: pfs_visitor.h:275
virtual void visit_table_share(PFS_table_share *)
Visit a table share.
Definition: pfs_visitor.h:277
virtual void visit_table(PFS_table *)
Visit a table.
Definition: pfs_visitor.h:282
A concrete object visitor that aggregates object wait statistics.
Definition: pfs_visitor.h:542
PFS_single_stat m_stat
Object wait statistic collected.
Definition: pfs_visitor.h:551
A concrete object visitor that aggregates table I/O statistics.
Definition: pfs_visitor.h:574
PFS_table_io_stat m_stat
Table I/O statistic collected.
Definition: pfs_visitor.h:582
A concrete object visitor that aggregates table I/O wait statistics.
Definition: pfs_visitor.h:558
PFS_single_stat m_stat
Table I/O wait statistic collected.
Definition: pfs_visitor.h:567
A concrete object visitor that aggregates table lock statistics.
Definition: pfs_visitor.h:620
PFS_table_lock_stat m_stat
Table lock statistic collected.
Definition: pfs_visitor.h:628
A concrete object visitor that aggregates table lock wait statistics.
Definition: pfs_visitor.h:604
PFS_single_stat m_stat
Table lock wait statistic collected.
Definition: pfs_visitor.h:613
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
~PFS_connection_status_visitor() override
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:1070
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:1003
void visit_table_share(PFS_table_share *pfs) override
Visit a table share.
Definition: pfs_visitor.cc:1406
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:1195
static void visit_host(PFS_host *host, bool with_accounts, bool with_threads, bool with_THDs, PFS_connection_visitor *visitor)
Visit all connections of a host.
Definition: pfs_visitor.cc:181
static void visit_all_rwlock_classes(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:386
void visit_THD(THD *thd) override
Visit a THD associated with a thread.
Definition: pfs_visitor.cc:1205
void visit_table_share(PFS_table_share *pfs) override
Visit a table share.
Definition: pfs_visitor.cc:1420
PFS_table_io_stat_visitor()
Table I/O stat visitor.
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:1027
static void visit_all_cond_instances(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:424
static void visit_all_file(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:435
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:979
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:847
static void visit_global(bool with_hosts, bool with_users, bool with_accounts, bool with_threads, bool with_THDs, PFS_connection_visitor *visitor)
Visit all connections.
Definition: pfs_visitor.cc:101
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:1116
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:819
static void visit_all(PFS_object_visitor *visitor)
Visit all objects.
Definition: pfs_visitor.cc:652
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:1096
static void visit_all_file_classes(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:440
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:987
static void visit_all(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:347
void visit_table_share(PFS_table_share *pfs) override
Visit a table share.
Definition: pfs_visitor.cc:1340
static void visit_user(PFS_user *user, bool with_accounts, bool with_threads, bool with_THDs, PFS_connection_visitor *visitor)
Visit all connections of a user.
Definition: pfs_visitor.cc:253
static void visit_instances(PFS_instr_class *klass, PFS_instance_visitor *visitor, PFS_thread *thread, bool visit_class=true)
Visit an instrument class and related instances.
Definition: pfs_visitor.cc:633
void visit_table_share(PFS_table_share *pfs) override
Visit a table share.
Definition: pfs_visitor.cc:1291
PFS_object_wait_visitor()
Table I/O wait visitor.
void visit_mutex(PFS_mutex *pfs) override
Visit a mutex instance.
Definition: pfs_visitor.cc:1233
void visit_connection_slice(PFS_connection_slice *pfs)
Definition: pfs_visitor.cc:836
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:1044
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:1110
~PFS_connection_stat_visitor() override
static void visit_all_mutex(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:354
~PFS_object_wait_visitor() override
void visit_socket_class(PFS_socket_class *pfs) override
Visit a socket class.
Definition: pfs_visitor.cc:1229
PFS_connection_status_visitor(System_status_var *vars)
Constructor.
Definition: pfs_visitor.cc:1176
~PFS_index_io_stat_visitor() override
PFS_connection_error_visitor(PFS_error_class *klass, uint index)
Constructor.
Definition: pfs_visitor.cc:1035
static void visit_all_tables(PFS_object_visitor *visitor)
Visit all tables and related handles.
Definition: pfs_visitor.cc:685
void visit_file(PFS_file *pfs) override
Visit a file instance.
Definition: pfs_visitor.cc:1461
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:1011
static void visit_cond_instances(PFS_cond_class *klass, PFS_instance_visitor *visitor)
Visit a cond class and related instances.
Definition: pfs_visitor.cc:516
void visit_file_class(PFS_file_class *pfs) override
Visit a file class.
Definition: pfs_visitor.cc:1225
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:1019
static void visit_all_mutex_classes(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:359
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:882
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:1156
void visit_table(PFS_table *pfs) override
Visit a table.
Definition: pfs_visitor.cc:1275
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:925
~PFS_connection_stage_visitor() override
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:795
void visit_file(PFS_file *pfs) override
Visit a file instance.
Definition: pfs_visitor.cc:1245
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:811
void visit_rwlock_class(PFS_rwlock_class *pfs) override
Visit a rwlock class.
Definition: pfs_visitor.cc:1217
void visit_global() override
Visit global data.
Definition: pfs_visitor.cc:1402
void visit_global() override
Aggregate from global status.
Definition: pfs_visitor.cc:1185
static void visit_all_cond(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:408
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:898
static void visit_all_cond_classes(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:413
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:870
void visit_mutex_class(PFS_mutex_class *pfs) override
Visit a mutex class.
Definition: pfs_visitor.cc:1213
void visit_socket(PFS_socket *pfs) override
Visit a socket instance.
Definition: pfs_visitor.cc:1445
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:1199
void visit_connection_slice(PFS_connection_slice *pfs)
Definition: pfs_visitor.cc:964
void visit_table_index(PFS_table *pfs, uint index) override
Visit a table index.
Definition: pfs_visitor.cc:1392
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:956
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:890
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:1166
void visit_table_share(PFS_table_share *pfs) override
Visit a table share.
Definition: pfs_visitor.cc:1270
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:1104
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:851
void visit_file_class(PFS_file_class *pfs) override
Visit a file class.
Definition: pfs_visitor.cc:1456
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:803
PFS_connection_stage_visitor(PFS_stage_class *klass)
Constructor.
Definition: pfs_visitor.cc:863
PFS_connection_wait_visitor(PFS_instr_class *klass)
Constructor.
Definition: pfs_visitor.cc:771
static void visit_all_rwlock_instances(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:397
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:941
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:1203
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:831
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:983
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:933
PFS_table_lock_stat_visitor()
Table lock stat visitor.
PFS_connection_statement_visitor(PFS_statement_class *klass)
Constructor.
Definition: pfs_visitor.cc:906
~PFS_table_lock_wait_visitor() override
PFS_connection_transaction_visitor(PFS_transaction_class *klass)
Constructor.
Definition: pfs_visitor.cc:991
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:778
~PFS_table_io_wait_visitor() override
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:1146
~PFS_connection_memory_visitor() override
PFS_index_io_stat_visitor()
Index I/O stat visitor.
~PFS_table_lock_stat_visitor() override
static void visit_file_instances(PFS_file_class *klass, PFS_instance_visitor *visitor)
Visit a file class and related instances.
Definition: pfs_visitor.cc:542
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:913
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:999
void visit_account(PFS_account *pfs) override
Visit all connections of a user+host.
Definition: pfs_visitor.cc:855
void visit_table(PFS_table *pfs) override
Visit a table.
Definition: pfs_visitor.cc:1410
static void visit_table_indexes(PFS_table_share *share, uint index, PFS_object_visitor *visitor)
Visit a table index and related table handles indexes.
Definition: pfs_visitor.cc:751
void visit_socket_class(PFS_socket_class *pfs) override
Visit a socket class.
Definition: pfs_visitor.cc:1439
PFS_connection_memory_visitor(PFS_memory_class *klass)
Constructor.
Definition: pfs_visitor.cc:1122
void visit_user(PFS_user *pfs) override
Visit all connections of a user.
Definition: pfs_visitor.cc:1059
static void visit_all_mutex_instances(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:370
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:874
void visit_global() override
Visit all connections.
Definition: pfs_visitor.cc:1130
PFS_connection_all_wait_visitor()
Constructor.
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:1048
void visit_table(PFS_table *pfs) override
Visit a table.
Definition: pfs_visitor.cc:1429
~PFS_instance_wait_visitor() override
static void visit_mutex_instances(PFS_mutex_class *klass, PFS_instance_visitor *visitor)
Visit a mutex class and related instances.
Definition: pfs_visitor.cc:464
static void visit_socket_instances(PFS_socket_class *klass, PFS_instance_visitor *visitor)
Visit a socket class and related instances.
Definition: pfs_visitor.cc:570
void visit_global() override
Visit global data.
Definition: pfs_visitor.cc:1287
PFS_connection_stat_visitor()
Constructor.
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:859
void visit_socket(PFS_socket *pfs) override
Visit a socket instance.
Definition: pfs_visitor.cc:1252
void visit_cond(PFS_cond *pfs) override
Visit a cond instance.
Definition: pfs_visitor.cc:1241
PFS_table_lock_wait_visitor()
Table lock wait visitor.
static void visit_all_rwlock(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:381
static void visit_tables(PFS_table_share *share, PFS_object_visitor *visitor)
Visit a table and related table handles.
Definition: pfs_visitor.cc:716
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:1136
void visit_cond_class(PFS_cond_class *pfs) override
Visit a cond class.
Definition: pfs_visitor.cc:1221
static void visit_rwlock_instances(PFS_rwlock_class *klass, PFS_instance_visitor *visitor)
Visit a rwlock class and related instances.
Definition: pfs_visitor.cc:490
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:1098
void visit_rwlock(PFS_rwlock *pfs) override
Visit a rwlock instance.
Definition: pfs_visitor.cc:1237
PFS_connection_all_statement_visitor()
Constructor.
void visit_global() override
Visit global data.
Definition: pfs_visitor.cc:1265
void visit_thread(PFS_thread *pfs) override
Visit a thread.
Definition: pfs_visitor.cc:1081
~PFS_connection_wait_visitor() override
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:975
void visit_table(PFS_table *pfs) override
Visit a table.
Definition: pfs_visitor.cc:1314
~PFS_table_io_stat_visitor() override
void visit_table(PFS_table *pfs) override
Visit a table.
Definition: pfs_visitor.cc:1360
static void visit_account(PFS_account *account, bool with_threads, bool with_THDs, PFS_connection_visitor *visitor)
Visit all connections of a user+host.
Definition: pfs_visitor.cc:321
~PFS_connection_error_visitor() override
static void visit_all_file_instances(PFS_instance_visitor *visitor)
Definition: pfs_visitor.cc:451
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:917
void visit_table_share_index(PFS_table_share *pfs, uint index) override
Visit a table share index.
Definition: pfs_visitor.cc:1382
void visit_host(PFS_host *pfs) override
Visit all connections of a host.
Definition: pfs_visitor.cc:1191
Header for compiler-dependent features.
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
Statistics (declarations).
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
Per account statistics.
Definition: pfs_account.h:67
Instrumentation metadata for a condition.
Definition: pfs_instr_class.h:383
Instrumented condition implementation.
Definition: pfs_instr.h:162
A connection slice, an arbitrary grouping of several connections.
Definition: pfs_con_slice.h:54
Connections statistics.
Definition: pfs_stat.h:1227
Instrumentation metadata for an error.
Definition: pfs_instr_class.h:635
Statistics for a server error.
Definition: pfs_stat.h:495
Instrumentation metadata for a file.
Definition: pfs_instr_class.h:644
Statistics for FILE I/O.
Definition: pfs_stat.h:272
Instrumented File and FILE implementation.
Definition: pfs_instr.h:179
Per host statistics.
Definition: pfs_host.h:64
Information for all instrumentation.
Definition: pfs_instr_class.h:248
Instrumentation metadata for a memory.
Definition: pfs_instr_class.h:681
Definition: pfs_stat.h:991
Instrumentation metadata for a mutex.
Definition: pfs_instr_class.h:363
Instrumented mutex implementation.
Definition: pfs_instr.h:103
Instrumentation metadata for a read write lock.
Definition: pfs_instr_class.h:373
Instrumented rwlock implementation.
Definition: pfs_instr.h:129
Single statistic.
Definition: pfs_stat.h:52
Instrumentation metadata for a socket.
Definition: pfs_instr_class.h:673
Statistics for SOCKET I/O.
Definition: pfs_stat.h:839
Instrumented socket implementation.
Definition: pfs_instr.h:289
Instrumentation metadata for a stage.
Definition: pfs_instr_class.h:652
Statistics for stage usage.
Definition: pfs_stat.h:323
Instrumentation metadata for a statement.
Definition: pfs_instr_class.h:663
Statistics for statement usage.
Definition: pfs_stat.h:376
Single table I/O statistic.
Definition: pfs_stat.h:648
Statistics for table locks.
Definition: pfs_stat.h:710
Instrumentation metadata for a table share.
Definition: pfs_instr_class.h:513
Instrumented table implementation.
Definition: pfs_instr.h:195
Instrumented thread implementation.
Definition: pfs_instr.h:375
Instrumentation metadata for a transaction.
Definition: pfs_instr_class.h:666
Statistics for transaction usage.
Definition: pfs_stat.h:459
Per user statistics.
Definition: pfs_user.h:63
Per thread status variables.
Definition: system_variables.h:525