MySQL 9.0.0
Source Code Documentation
pfs_instr_class.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 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_INSTR_CLASS_H
25#define PFS_INSTR_CLASS_H
26
27#include "my_config.h"
28
29#include <assert.h>
30#include <sys/types.h>
31#include <atomic>
32
33#include "lf.h"
34#include "my_compiler.h"
35
36#include "my_inttypes.h"
38#include "mysql_com.h" /* NAME_LEN */
39#include "mysqld_error.h"
40#include "prealloced_array.h"
47
48struct TABLE_SHARE;
49
50/**
51 @file storage/perfschema/pfs_instr_class.h
52 Performance schema instruments metadata (declarations).
53*/
54
55/**
56 Maximum length of an instrument name.
57 For example, 'wait/sync/mutex/sql/LOCK_open' is an instrument name.
58*/
59#define PFS_MAX_INFO_NAME_LENGTH 128
60
61/**
62 Maximum length of the thread os name.
63 Must include a terminating NUL character.
64 Length is 16 because of linux pthread_setname_np(3)
65 @see my_thread_self_setname()
66*/
67#define PFS_MAX_OS_NAME_LENGTH 16
68
69/**
70 Maximum length of the 'full' prefix of an instrument name.
71 For example, for the instrument name 'wait/sync/mutex/sql/LOCK_open',
72 the full prefix is 'wait/sync/mutex/sql/', which in turn derives from
73 a prefix 'wait/sync/mutex' for mutexes, and a category of 'sql' for mutexes
74 of the sql layer in the server.
75*/
76#define PFS_MAX_FULL_PREFIX_NAME_LENGTH 32
77
78struct PFS_global_param;
79struct PFS_table_share;
80class PFS_opaque_container_page;
81
82/**
83 @addtogroup performance_schema_buffers
84 @{
85*/
86
87extern bool pfs_enabled;
88
89/** Global ref count for plugin and component events. */
90extern std::atomic<uint32> pfs_unload_plugin_ref_count;
91
92/** Key, naming a synch instrument (mutex, rwlock, cond). */
93typedef unsigned int PFS_sync_key;
94/** Key, naming a thread instrument. */
95typedef unsigned int PFS_thread_key;
96/** Key, naming a file instrument. */
97typedef unsigned int PFS_file_key;
98/** Key, naming a stage instrument. */
99typedef unsigned int PFS_stage_key;
100/** Key, naming a statement instrument. */
101typedef unsigned int PFS_statement_key;
102/** Key, naming a transaction instrument. */
103typedef unsigned int PFS_transaction_key;
104/** Key, naming a socket instrument. */
105typedef unsigned int PFS_socket_key;
106/** Key, naming a memory instrument. */
107typedef unsigned int PFS_memory_key;
108/** Key, naming a meter instrument. */
109typedef unsigned int PFS_meter_key;
110/** Key, naming a metric instrument. */
111typedef unsigned int PFS_metric_key;
112
136
137/** User-defined instrument configuration. */
139 /* Instrument name. */
140 char *m_name;
141 /* Name length. */
143 /** Enabled flag. */
145 /** Timed flag. */
147};
148
151
152struct PFS_thread;
153
154extern uint mutex_class_start;
155extern uint rwlock_class_start;
156extern uint cond_class_start;
157extern uint file_class_start;
158extern uint socket_class_start;
159extern uint wait_class_max;
160
161/**
162 Encapsulates the name of an instrumented entity.
163*/
165 public:
166 static constexpr uint max_length = PFS_MAX_INFO_NAME_LENGTH - 1;
167 /*
168 DO NOT ACCESS THE DATA MEMBERS DIRECTLY. USE THE GETTERS AND
169 SETTERS INSTEAD.
170
171 The data members should really have been private, but having both
172 private and public members would make the class a non-POD. We
173 need to call memset on PFS_instr_class (in init_instr_class), and
174 the behavior of memset is undefined on non-POD objects. Therefore
175 we keep the data members public, with an underscore prefix, and
176 this warning text.
177 */
178 public /*private*/:
179 /** Instrument name. */
180 char m_private_name[max_length + 1];
181 /** Length in bytes of @c m_name. */
183 /** Old instrument name, if any. */
185 /** Length in bytes of old instrument name len, if any. */
187 /** The oldest version that uses the new name. */
189
190 public:
191 /** Return the name as a string. */
192 const char *str() const;
193 /** Return the length of the string. */
194 uint length() const;
195 /**
196 Copy the specified name to this name.
197
198 @param class_type The class type of this name, i.e., whether it is
199 the name of a mutex, thread, etc.
200
201 @param name The buffer to read from.
202
203 @param max_length_arg If is given, at most that many chars are
204 copied, plus the terminating '\0'. Otherwise, up to buffer_size-1
205 characters are copied, plus the terminating '\0'.
206 */
207 void set(PFS_class_type class_type, const char *name,
208 uint max_length_arg = max_length);
209};
210
211/** Information for all instrumentation. */
213 /** Class type */
215 /** True if this instrument is enabled. */
217 /** True if this instrument is timed. */
219 /** Instrument flags. */
221 /** Instrument enforced flags. */
223 /** Volatility index. */
225 /**
226 Instrument name index.
227 Self index in:
228 - EVENTS_WAITS_SUMMARY_*_BY_EVENT_NAME for waits
229 - EVENTS_STAGES_SUMMARY_*_BY_EVENT_NAME for stages
230 - EVENTS_STATEMENTS_SUMMARY_*_BY_EVENT_NAME for statements
231 - EVENTS_TRANSACTIONS_SUMMARY_*_BY_EVENT_NAME for transactions
232 */
234 /** Instrument name. */
236 /** Documentation. */
238
239 bool is_singleton() const { return m_flags & PSI_FLAG_SINGLETON; }
240
241 bool is_mutable() const { return m_flags & PSI_FLAG_MUTABLE; }
242
243 bool is_progress() const { return m_flags & PSI_FLAG_STAGE_PROGRESS; }
244
246
247 bool is_priority() const { return m_flags & PSI_FLAG_RWLOCK_PR; }
248
249 bool is_transferable() const { return m_flags & PSI_FLAG_TRANSFER; }
250
251 bool is_user() const { return m_flags & PSI_FLAG_USER; }
252
254
255 bool is_global() const { return m_flags & PSI_FLAG_ONLY_GLOBAL_STAT; }
256
257 bool has_seqnum() const {
259 }
260
262
264
267 }
268
269 bool is_disabled() const { return m_flags & PSI_FLAG_DISABLED; }
270
271 bool is_untimed() const { return m_flags & PSI_FLAG_UNTIMED; }
272
274
275 void enforce_valid_flags(uint allowed_flags) {
276 /* Reserved for future use. */
277 allowed_flags |= PSI_FLAG_THREAD | PSI_FLAG_TRANSFER;
278
279 const uint valid_flags = m_flags & allowed_flags;
280 /*
281 This fails when the instrumented code is providing
282 flags that are not supported for this instrument.
283 To fix it, clean up the instrumented code.
284 */
285 assert(valid_flags == m_flags);
286 m_flags = valid_flags;
287 }
288
290 static void set_timed(PFS_instr_class *pfs, bool timed);
291
292 bool is_deferred() const {
293 switch (m_type) {
294 case PFS_CLASS_SOCKET:
295 return true;
296 default:
297 return false;
298 };
299 }
300
301 bool can_be_timed() const {
302 switch (m_type) {
303 case PFS_CLASS_MEMORY:
304 case PFS_CLASS_ERROR:
305 case PFS_CLASS_THREAD:
306 return false;
307 default:
308 return true;
309 };
310 }
311
312 bool can_be_enforced() const {
313 switch (m_type) {
314 case PFS_CLASS_MEMORY:
315 return true;
316 default:
317 return false;
318 };
319 }
320};
321
322struct PFS_mutex;
323
324#define PFS_MUTEX_PARTITIONS 2
325
326/** Instrumentation metadata for a mutex. */
328 /** Mutex usage statistics. */
330 /** Singleton instance. */
332};
333
334struct PFS_rwlock;
335
336/** Instrumentation metadata for a read write lock. */
338 /** Rwlock usage statistics. */
340 /** Singleton instance. */
342};
343
344struct PFS_cond;
345
346/** Instrumentation metadata for a condition. */
348 /**
349 Condition usage statistics.
350 This statistic is not exposed in user visible tables yet.
351 */
353 /** Singleton instance. */
355};
356
357/** Instrumentation metadata of a thread. */
359 /** Singleton instance. */
361 /** Thread history instrumentation flag. */
362 bool m_history{false};
363 /** Thread os name. */
364 char m_os_name[PFS_MAX_OS_NAME_LENGTH];
365 /** Thread instance sequence number counter. */
366 std::atomic<unsigned int> m_seqnum;
367};
368
369/** Instrumentation metadata for a metric. */
372
373 /** Metric name with length. */
374 const char *m_metric{nullptr};
375 uint m_metric_length{0};
376 /** Metric group with length. */
377 const char *m_group{nullptr};
378 uint m_group_length{0};
379 /** Metric unit with length. */
380 const char *m_unit{nullptr};
381 uint m_unit_length{0};
382 /** Metric description with length. */
383 const char *m_description{nullptr};
384 uint m_description_length{0};
389 void *m_measurement_context{nullptr};
390};
391
392/** Instrumentation metadata for a meter. */
395
396 /** Meter name with length. */
397 const char *m_meter{nullptr};
398 uint m_meter_length{0};
399 /** Meter export frequency in seconds. */
400 uint m_frequency{0};
401 /** Meter description with length. */
402 const char *m_description{nullptr};
403 uint m_description_length{0};
405
406 /** Metrics belonging to this meter. */
407 PSI_metric_key *m_metrics{nullptr};
408 uint m_metrics_size{0};
409};
410
411/** Key identifying a table share. */
413 /** Object type. */
415
416 /** Table schema. */
418
419 /** Table name. */
421};
422
423/** Table index or 'key' */
425 /** Index name */
427 /** Length in bytes of @c m_name. */
429};
430
431/** Index statistics of a table.*/
434 /** The index name */
436 /** The index stat */
438 /** Owner table share. To be used later. */
440 /** Container page. */
441 PFS_opaque_container_page *m_page;
442};
443
444/** Lock statistics of a table.*/
447 /** Lock stats. */
449 /** Owner table share. To be used later. */
451 /** Container page. */
452 PFS_opaque_container_page *m_page;
453};
454
455/** Instrumentation metadata for a table share. */
457 public:
458 uint32 get_version() { return m_lock.get_version(); }
459
460 enum_object_type get_object_type() const { return m_key.m_type; }
461
462 void aggregate_io();
463 void aggregate_lock();
464
465 void sum_io(PFS_single_stat *result, uint key_count);
466 void sum_lock(PFS_single_stat *result);
467 void sum(PFS_single_stat *result, uint key_count);
468
469 inline void aggregate() {
470 aggregate_io();
471 aggregate_lock();
472 }
473
474 inline void init_refcount() { m_refcount.store(1); }
475
476 inline int get_refcount() { return m_refcount.load(); }
477
478 inline void inc_refcount() { ++m_refcount; }
479
480 inline void dec_refcount() { --m_refcount; }
481
482 void refresh_setup_object_flags(PFS_thread *thread);
483
484 /** Internal lock. */
486 /**
487 True if table instrumentation is enabled.
488 This flag is computed from the content of table setup_objects.
489 */
491 /**
492 True if table instrumentation is timed.
493 This flag is computed from the content of table setup_objects.
494 */
496
497 /** Search key. */
499
500 /** Number of indexes. */
502 /** Container page. */
503 PFS_opaque_container_page *m_page;
504
505 PFS_table_share_lock *find_lock_stat() const;
506 PFS_table_share_lock *find_or_create_lock_stat();
507 void destroy_lock_stat();
508
509 PFS_table_share_index *find_index_stat(uint index) const;
510 PFS_table_share_index *find_or_create_index_stat(
511 const TABLE_SHARE *server_share, uint index);
512 void destroy_index_stats();
513
514 private:
515 /** Number of opened table handles. */
516 std::atomic<int> m_refcount;
517 /** Table locks statistics. */
518 std::atomic<PFS_table_share_lock *> m_race_lock_stat;
519 /** Table indexes stats. */
520 std::atomic<PFS_table_share_index *> m_race_index_stat[MAX_INDEXES + 1];
521};
522
523/** Statistics for the IDLE instrument. */
525/** Statistics for dropped table I/O. */
527/** Statistics for dropped table lock. */
529/** Statistics for the METADATA instrument. */
531/** Statistics for the transaction instrument. */
533/** Statistics for the error instrument. */
535
536inline uint sanitize_index_count(uint count) {
537 if (likely(count <= MAX_INDEXES)) {
538 return count;
539 }
540 return 0;
541}
542
543#define GLOBAL_TABLE_IO_EVENT_INDEX 0
544#define GLOBAL_TABLE_LOCK_EVENT_INDEX 1
545#define GLOBAL_IDLE_EVENT_INDEX 2
546#define GLOBAL_METADATA_EVENT_INDEX 3
547/** Number of global wait events. */
548#define COUNT_GLOBAL_EVENT_INDEX 4
549
550/** Transaction events are not wait events .*/
551#define GLOBAL_TRANSACTION_INDEX 0
552
553#define GLOBAL_ERROR_INDEX 0
554
555/**
556 Instrument controlling all table I/O.
557 This instrument is used with table SETUP_OBJECTS.
558*/
560
561/**
562 Instrument controlling all table lock.
563 This instrument is used with table SETUP_OBJECTS.
564*/
566
567/**
568 Instrument controlling all idle waits.
569*/
571
572/**
573 Instrument controlling all metadata locks.
574*/
576
577/** Instrumentation metadata for an error. */
579/**
580 Instrument controlling all server errors.
581*/
583
584struct PFS_file;
585
586/** Instrumentation metadata for a file. */
588 /** File usage statistics. */
590 /** Singleton instance. */
592};
593
594/** Instrumentation metadata for a stage. */
596 /**
597 Length of the @c "stage/<component>/" prefix.
598 This is to extract @c "foo" from @c "stage/sql/foo".
599 */
601 /** Stage usage statistics. */
603};
604
605/** Instrumentation metadata for a statement. */
607
608/** Instrumentation metadata for a transaction. */
610
612
613struct PFS_socket;
614
615/** Instrumentation metadata for a socket. */
617 /** Socket usage statistics. */
619 /** Singleton instance. */
621};
622
623/** Instrumentation metadata for a memory. */
625
627
629
630int init_sync_class(uint mutex_class_sizing, uint rwlock_class_sizing,
631 uint cond_class_sizing);
632
633void cleanup_sync_class();
634int init_thread_class(uint thread_class_sizing);
636int init_table_share(uint table_share_sizing);
638
639int init_table_share_lock_stat(uint table_stat_sizing);
643
644int init_table_share_index_stat(uint index_stat_sizing);
647 uint index);
649
652int init_file_class(uint file_class_sizing);
653void cleanup_file_class();
654int init_stage_class(uint stage_class_sizing);
656int init_statement_class(uint statement_class_sizing);
658int init_socket_class(uint socket_class_sizing);
660int init_memory_class(uint memory_class_sizing);
662int init_metric_class(uint metric_class_sizing);
664int init_meter_class(uint meter_class_sizing);
666
667PFS_sync_key register_mutex_class(const char *name, uint name_length,
668 PSI_mutex_info *info);
669
670PFS_sync_key register_rwlock_class(const char *name, uint name_length,
671 PSI_rwlock_info *info);
672
673PFS_sync_key register_cond_class(const char *name, uint name_length,
674 PSI_cond_info *info);
675
676PFS_thread_key register_thread_class(const char *name, uint name_length,
677 PSI_thread_info *info);
678
679PFS_file_key register_file_class(const char *name, uint name_length,
680 PSI_file_info *info);
681
682PFS_stage_key register_stage_class(const char *name, uint prefix_length,
683 uint name_length, PSI_stage_info *info);
684
685PFS_statement_key register_statement_class(const char *name, uint name_length,
686 PSI_statement_info *info);
687
688PFS_socket_key register_socket_class(const char *name, uint name_length,
689 PSI_socket_info *info);
690
691PFS_memory_key register_memory_class(const char *name, uint name_length,
692 PSI_memory_info *info);
693
694PFS_meter_key register_meter_class(const char *name, uint name_length,
695 PSI_meter_info_v1 *info);
698PFS_metric_key register_metric_class(const char *name, uint name_length,
699 PSI_metric_info_v1 *info,
700 const char *meter);
703
732 PFS_transaction_class *unsafe);
737
739 const TABLE_SHARE *share);
741void drop_table_share(PFS_thread *thread, bool temporary,
742 const char *schema_name, uint schema_name_length,
743 const char *table_name, uint table_name_length);
744
746
747extern ulong mutex_class_max;
748extern ulong mutex_class_lost;
749extern ulong rwlock_class_max;
750extern ulong rwlock_class_lost;
751extern ulong cond_class_max;
752extern ulong cond_class_lost;
753extern ulong thread_class_max;
754extern ulong thread_class_lost;
755extern ulong file_class_max;
756extern ulong file_class_lost;
757extern ulong stage_class_max;
758extern ulong stage_class_lost;
759extern ulong statement_class_max;
760extern ulong statement_class_lost;
761extern ulong transaction_class_max;
762extern ulong socket_class_max;
763extern ulong socket_class_lost;
764extern ulong memory_class_max;
765extern ulong memory_class_lost;
766extern ulong meter_class_max;
767extern ulong meter_class_lost;
768extern ulong metric_class_max;
769extern ulong metric_class_lost;
770extern ulong error_class_max;
771
772/* Exposing the data directly, for iterators. */
773
780
784
785/** Update derived flags for all table shares. */
787
788/** Update derived flags for all stored procedure shares. */
790
792
793/**
794 Get current time for GTID monitoring.
795
796 @return Time in microseconds when PFS monitoring is enabled.
797 @return 0 when PFS monitoring is disabled.
798*/
800
801/** @} */
802#endif
Encapsulates the name of an instrumented entity.
Definition: pfs_instr_class.h:164
const char * m_private_old_name
Old instrument name, if any.
Definition: pfs_instr_class.h:184
terminology_use_previous::enum_compatibility_version m_private_version
The oldest version that uses the new name.
Definition: pfs_instr_class.h:188
uint m_private_old_name_length
Length in bytes of old instrument name len, if any.
Definition: pfs_instr_class.h:186
static constexpr uint max_length
Definition: pfs_instr_class.h:166
uint m_private_name_length
Length in bytes of m_name.
Definition: pfs_instr_class.h:182
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:71
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:35
void release_table_share(TABLE_SHARE *share)
Mark that we are not using table share anymore.
Definition: sql_base.cc:1055
PFS_instr_class global_metadata_class
Instrument controlling all metadata locks.
Definition: pfs_instr_class.cc:192
LF_HASH table_share_hash
Hash index for instrumented table shares.
Definition: pfs_instr_class.cc:207
PFS_sync_key register_rwlock_class(const char *name, uint name_length, PSI_rwlock_info *info)
Register a rwlock instrumentation metadata.
Definition: pfs_instr_class.cc:1324
PFS_thread_class * sanitize_thread_class(PFS_thread_class *unsafe)
Definition: pfs_instr_class.cc:1562
uint socket_class_start
Definition: pfs_instr_class.cc:241
PFS_socket_class * sanitize_socket_class(PFS_socket_class *unsafe)
Definition: pfs_instr_class.cc:1812
unsigned int PFS_transaction_key
Key, naming a transaction instrument.
Definition: pfs_instr_class.h:103
PFS_rwlock_class * find_rwlock_class(PFS_sync_key key)
Find a rwlock instrumentation class by key.
Definition: pfs_instr_class.cc:1438
PFS_meter_key register_meter_class(const char *name, uint name_length, PSI_meter_info_v1 *info)
Register a meter instrumentation metadata.
Definition: pfs_instr_class.cc:1879
ulong error_class_max
Number of error classes.
Definition: pfs_instr_class.cc:164
PFS_socket_key register_socket_class(const char *name, uint name_length, PSI_socket_info *info)
Register a socket instrumentation metadata.
Definition: pfs_instr_class.cc:1768
ulong stage_class_max
Size of the stage class array.
Definition: pfs_instr_class.cc:128
PFS_stage_key register_stage_class(const char *name, uint prefix_length, uint name_length, PSI_stage_info *info)
Register a stage instrumentation metadata.
Definition: pfs_instr_class.cc:1617
unsigned int PFS_file_key
Key, naming a file instrument.
Definition: pfs_instr_class.h:97
void cleanup_memory_class()
Cleanup the memory class buffers.
Definition: pfs_instr_class.cc:1114
unsigned int PFS_sync_key
Key, naming a synch instrument (mutex, rwlock, cond).
Definition: pfs_instr_class.h:93
PFS_rwlock_class * rwlock_class_array
Definition: pfs_instr_class.cc:167
PFS_metric_class * metric_class_array
Definition: pfs_instr_class.cc:170
PFS_meter_class * sanitize_meter_class(PFS_meter_class *unsafe)
Definition: pfs_instr_class.cc:1469
void drop_table_share(PFS_thread *thread, bool temporary, const char *schema_name, uint schema_name_length, const char *table_name, uint table_name_length)
Drop the instrumented table share associated with a table.
Definition: pfs_instr_class.cc:2395
int init_table_share(uint table_share_sizing)
Initialize the table share buffer.
Definition: pfs_instr_class.cc:492
void cleanup_table_share_index_stat()
Cleanup the table stat buffers.
Definition: pfs_instr_class.cc:924
ulonglong gtid_monitoring_getsystime()
Get current time for GTID monitoring.
Definition: pfs_instr_class.cc:2497
PFS_instr_class global_table_lock_class
Instrument controlling all table lock.
Definition: pfs_instr_class.cc:190
uint mutex_class_start
Definition: pfs_instr_class.cc:236
PFS_instr_class global_idle_class
Instrument controlling all idle waits.
Definition: pfs_instr_class.cc:191
ulong thread_class_max
Size of the thread class array.
Definition: pfs_instr_class.cc:120
PFS_meter_class * find_meter_class(PSI_meter_key key)
Find a meter instrumentation class by key.
Definition: pfs_instr_class.cc:1465
ulong socket_class_lost
Number of socket class lost.
Definition: pfs_instr_class.cc:138
void cleanup_table_share_lock_stat()
Cleanup the table stat buffers.
Definition: pfs_instr_class.cc:866
PFS_table_share * find_or_create_table_share(PFS_thread *thread, bool temporary, const TABLE_SHARE *share)
Find or create a table share instrumentation.
Definition: pfs_instr_class.cc:2205
ulong meter_class_max
Size of the meter class array.
Definition: pfs_instr_class.cc:144
PFS_instr_class * find_metadata_class(uint index)
Definition: pfs_instr_class.cc:2128
uint sanitize_index_count(uint count)
Definition: pfs_instr_class.h:536
unsigned int PFS_meter_key
Key, naming a meter instrument.
Definition: pfs_instr_class.h:109
ulong socket_class_max
Size of the socket class array.
Definition: pfs_instr_class.cc:136
unsigned int PFS_socket_key
Key, naming a socket instrument.
Definition: pfs_instr_class.h:105
ulong rwlock_class_lost
Number of rwlock class lost.
Definition: pfs_instr_class.cc:114
void unregister_meter_class(PSI_meter_info_v1 *info)
Definition: pfs_instr_class.cc:1964
int init_table_share_lock_stat(uint table_stat_sizing)
Initialize the table lock stat buffer.
Definition: pfs_instr_class.cc:830
PFS_stage_class * sanitize_stage_class(PFS_stage_class *unsafe)
Definition: pfs_instr_class.cc:1742
PFS_cond_class * find_cond_class(PFS_sync_key key)
Find a condition instrumentation class by key.
Definition: pfs_instr_class.cc:1452
Prealloced_array< PFS_instr_config *, 10 > Pfs_instr_config_array
Definition: pfs_instr_class.h:149
int init_file_class(uint file_class_sizing)
Initialize the file class buffer.
Definition: pfs_instr_class.cc:933
uint length() const
Return the length of the string.
Definition: pfs_instr_class.cc:251
PFS_file_key register_file_class(const char *name, uint name_length, PSI_file_info *info)
Register a file instrumentation metadata.
Definition: pfs_instr_class.cc:1574
Pfs_instr_config_array * pfs_instr_config_array
PFS_INSTRUMENT option settings array.
Definition: pfs_instr_class.cc:81
uint32 metric_class_count()
Definition: pfs_instr_class.cc:2094
ulong memory_class_lost
Number of memory class lost.
Definition: pfs_instr_class.cc:142
ulong statement_class_lost
Number of statement class lost.
Definition: pfs_instr_class.cc:134
PFS_stage_class * find_stage_class(PFS_stage_key key)
Find a stage instrumentation class by key.
Definition: pfs_instr_class.cc:1738
uint cond_class_start
Definition: pfs_instr_class.cc:238
PFS_statement_class * find_statement_class(PFS_stage_key key)
Find a statement instrumentation class by key.
Definition: pfs_instr_class.cc:1752
ulong cond_class_max
Size of the condition class array.
Definition: pfs_instr_class.cc:116
ulong mutex_class_lost
Number of mutex class lost.
Definition: pfs_instr_class.cc:110
PFS_statement_class * sanitize_statement_class(PFS_statement_class *unsafe)
Definition: pfs_instr_class.cc:1756
unsigned int PFS_memory_key
Key, naming a memory instrument.
Definition: pfs_instr_class.h:107
PFS_table_lock_stat global_table_lock_stat
Statistics for dropped table lock.
Definition: pfs_instr_class.cc:185
void register_global_classes()
Definition: pfs_instr_class.cc:304
ulong memory_class_max
Size of the memory class array.
Definition: pfs_instr_class.cc:140
void cleanup_metric_class()
Cleanup the metric class buffers.
Definition: pfs_instr_class.cc:572
void reset_file_class_io()
Reset the I/O statistics per file class.
Definition: pfs_instr_class.cc:2440
uint wait_class_max
Definition: pfs_instr_class.cc:240
PFS_metric_class * sanitize_metric_class(PFS_metric_class *unsafe)
Definition: pfs_instr_class.cc:1483
PFS_table_share_lock * create_table_share_lock_stat()
Create a table share lock instrumentation.
Definition: pfs_instr_class.cc:842
PFS_transaction_class * find_transaction_class(uint index)
Definition: pfs_instr_class.cc:2156
PFS_statement_key register_statement_class(const char *name, uint name_length, PSI_statement_info *info)
Register a statement instrumentation metadata.
Definition: pfs_instr_class.cc:1668
void update_table_share_derived_flags(PFS_thread *thread)
Update derived flags for all table shares.
Definition: pfs_instr_class.cc:2473
void unregister_metric_class(PSI_metric_info_v1 *info)
Definition: pfs_instr_class.cc:2076
ulong stage_class_lost
Number of stage class lost.
Definition: pfs_instr_class.cc:130
PFS_metric_key register_metric_class(const char *name, uint name_length, PSI_metric_info_v1 *info, const char *meter)
Register a metric instrumentation metadata.
Definition: pfs_instr_class.cc:1992
PFS_thread_key register_thread_class(const char *name, uint name_length, PSI_thread_info *info)
Register a thread instrumentation metadata.
Definition: pfs_instr_class.cc:1495
void cleanup_stage_class()
Cleanup the stage class buffers.
Definition: pfs_instr_class.cc:994
PFS_cond_class * sanitize_cond_class(PFS_cond_class *unsafe)
Definition: pfs_instr_class.cc:1456
PFS_instr_class * sanitize_idle_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2121
void cleanup_meter_class()
Cleanup the meter class buffers.
Definition: pfs_instr_class.cc:527
PFS_error_stat global_error_stat
Statistics for the error instrument.
Definition: pfs_instr_class.cc:188
PFS_thread_class * find_thread_class(PFS_sync_key key)
Find a thread instrumentation class by key.
Definition: pfs_instr_class.cc:1558
PFS_table_io_stat global_table_io_stat
Statistics for dropped table I/O.
Definition: pfs_instr_class.cc:184
PFS_sync_key register_cond_class(const char *name, uint name_length, PSI_cond_info *info)
Register a condition instrumentation metadata.
Definition: pfs_instr_class.cc:1372
PFS_instr_class * sanitize_metadata_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2135
PFS_mutex_class * sanitize_mutex_class(PFS_mutex_class *unsafe)
Definition: pfs_instr_class.cc:1428
PFS_error_class global_error_class
Instrument controlling all server errors.
Definition: pfs_instr_class.cc:193
uint file_class_start
Definition: pfs_instr_class.cc:239
PFS_transaction_stat global_transaction_stat
Statistics for the transaction instrument.
Definition: pfs_instr_class.cc:187
PFS_cond_class * cond_class_array
Definition: pfs_instr_class.cc:168
PFS_rwlock_class * sanitize_rwlock_class(PFS_rwlock_class *unsafe)
Definition: pfs_instr_class.cc:1442
ulong file_class_lost
Number of file class lost.
Definition: pfs_instr_class.cc:126
PFS_error_class * sanitize_error_class(PFS_instr_class *unsafe)
ulong metric_class_lost
Number of metric class lost.
Definition: pfs_instr_class.cc:150
int init_stage_class(uint stage_class_sizing)
Initialize the stage class buffer.
Definition: pfs_instr_class.cc:973
PFS_instr_class * find_idle_class(uint index)
Definition: pfs_instr_class.cc:2114
int init_thread_class(uint thread_class_sizing)
Initialize the thread class buffer.
Definition: pfs_instr_class.cc:451
PFS_metric_class * find_metric_class(PSI_metric_key key)
Find a metric instrumentation class by key.
Definition: pfs_instr_class.cc:1479
void init_event_name_sizing(const PFS_global_param *param)
Definition: pfs_instr_class.cc:294
int init_socket_class(uint socket_class_sizing)
Initialize the socket class buffer.
Definition: pfs_instr_class.cc:1053
PFS_socket_class * find_socket_class(PFS_socket_key key)
Find a socket instrumentation class by key.
Definition: pfs_instr_class.cc:1808
void update_program_share_derived_flags(PFS_thread *thread)
Update derived flags for all stored procedure shares.
Definition: pfs_instr_class.cc:2492
uint32 meter_class_count()
Definition: pfs_instr_class.cc:1982
PFS_error_class * find_error_class(uint index)
Definition: pfs_instr_class.cc:2142
PFS_file_class * sanitize_file_class(PFS_file_class *unsafe)
Definition: pfs_instr_class.cc:1729
unsigned int PFS_stage_key
Key, naming a stage instrument.
Definition: pfs_instr_class.h:99
std::atomic< uint32 > pfs_unload_plugin_ref_count
Global ref count for plugin and component events.
void cleanup_thread_class()
Cleanup the thread class buffers.
Definition: pfs_instr_class.cc:473
int init_statement_class(uint statement_class_sizing)
Initialize the statement class buffer.
Definition: pfs_instr_class.cc:1013
ulong file_class_max
Size of the file class array.
Definition: pfs_instr_class.cc:124
ulong thread_class_lost
Number of thread class lost.
Definition: pfs_instr_class.cc:122
ulong metric_class_max
Size of the metric class array.
Definition: pfs_instr_class.cc:148
void reset_events_waits_by_class()
Reset the wait statistics per instrument class.
Definition: pfs_instr_class.cc:2430
PFS_table_share * sanitize_table_share(PFS_table_share *unsafe)
Sanitize an unsafe table_share pointer.
Definition: pfs_instr_class.cc:2425
PFS_memory_key register_memory_class(const char *name, uint name_length, PSI_memory_info *info)
Register a memory instrumentation metadata.
Definition: pfs_instr_class.cc:1824
PFS_transaction_class global_transaction_class
Definition: pfs_instr_class.cc:194
unsigned int PFS_statement_key
Key, naming a statement instrument.
Definition: pfs_instr_class.h:101
unsigned int PFS_metric_key
Key, naming a metric instrument.
Definition: pfs_instr_class.h:111
PFS_single_stat global_idle_stat
Statistics for the IDLE instrument.
Definition: pfs_instr_class.cc:183
unsigned int PFS_thread_key
Key, naming a thread instrument.
Definition: pfs_instr_class.h:95
int init_table_share_index_stat(uint index_stat_sizing)
Initialize table index stat buffer.
Definition: pfs_instr_class.cc:875
PFS_sync_key register_mutex_class(const char *name, uint name_length, PSI_mutex_info *info)
Register a mutex instrumentation metadata.
Definition: pfs_instr_class.cc:1227
PFS_memory_class * sanitize_memory_class(PFS_memory_class *unsafe)
Definition: pfs_instr_class.cc:1867
void cleanup_file_class()
Cleanup the file class buffers.
Definition: pfs_instr_class.cc:954
bool pfs_enabled
Global performance schema flag.
Definition: pfs_instr_class.cc:69
uint rwlock_class_start
Definition: pfs_instr_class.cc:237
PFS_class_type
Definition: pfs_instr_class.h:113
ulong mutex_class_max
Size of the mutex class array.
Definition: pfs_instr_class.cc:108
int init_meter_class(uint meter_class_sizing)
Initialize the meter class buffer.
Definition: pfs_instr_class.cc:505
PFS_single_stat global_metadata_stat
Statistics for the METADATA instrument.
Definition: pfs_instr_class.cc:186
ulong statement_class_max
Size of the statement class array.
Definition: pfs_instr_class.cc:132
void cleanup_table_share_hash()
Cleanup the table share hash table.
Definition: pfs_instr_class.cc:668
ulong meter_class_lost
Number of meter class lost.
Definition: pfs_instr_class.cc:146
const char * str() const
Return the name as a string.
Definition: pfs_instr_class.cc:243
PFS_instr_class global_table_io_class
Instrument controlling all table I/O.
Definition: pfs_instr_class.cc:189
void reset_socket_class_io()
Reset the I/O statistics per socket class.
Definition: pfs_instr_class.cc:2450
PFS_instr_class * sanitize_table_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2106
int init_table_share_hash(const PFS_global_param *param)
Initialize the table share hash table.
Definition: pfs_instr_class.cc:657
void cleanup_table_share()
Cleanup the table share buffers.
Definition: pfs_instr_class.cc:587
ulong rwlock_class_max
Size of the rwlock class array.
Definition: pfs_instr_class.cc:112
int init_metric_class(uint metric_class_sizing)
Initialize the metric class buffer.
Definition: pfs_instr_class.cc:550
void cleanup_socket_class()
Cleanup the socket class buffers.
Definition: pfs_instr_class.cc:1074
void set(PFS_class_type class_type, const char *name, uint max_length_arg=max_length)
Copy the specified name to this name.
Definition: pfs_instr_class.cc:276
ulong cond_class_lost
Number of condition class lost.
Definition: pfs_instr_class.cc:118
PFS_memory_class * find_memory_class(PFS_memory_key key)
Find a memory instrumentation class by key.
Definition: pfs_instr_class.cc:1863
PFS_transaction_class * sanitize_transaction_class(PFS_transaction_class *unsafe)
Definition: pfs_instr_class.cc:2163
ulong transaction_class_max
Number of transaction classes.
Definition: pfs_instr_class.cc:157
void cleanup_sync_class()
Cleanup the instrument synch class buffers.
Definition: pfs_instr_class.cc:408
int init_memory_class(uint memory_class_sizing)
Initialize the memory class buffer.
Definition: pfs_instr_class.cc:1093
void release_table_share_lock_stat(PFS_table_share_lock *pfs)
Release a table share lock instrumentation.
Definition: pfs_instr_class.cc:860
PFS_meter_class * meter_class_array
Definition: pfs_instr_class.cc:169
void cleanup_statement_class()
Cleanup the statement class buffers.
Definition: pfs_instr_class.cc:1034
void release_table_share_index_stat(PFS_table_share_index *pfs)
Release a table share index instrumentation.
Definition: pfs_instr_class.cc:918
PFS_mutex_class * mutex_class_array
Definition: pfs_instr_class.cc:166
PFS_instr_class * find_table_class(uint index)
Definition: pfs_instr_class.cc:2096
PFS_table_share_index * create_table_share_index_stat(const TABLE_SHARE *server_share, uint server_index)
Create a table share index instrumentation.
Definition: pfs_instr_class.cc:887
int init_sync_class(uint mutex_class_sizing, uint rwlock_class_sizing, uint cond_class_sizing)
Initialize the instrument synch class buffers.
Definition: pfs_instr_class.cc:360
PFS_mutex_class * find_mutex_class(PFS_sync_key key)
Find a mutex instrumentation class by key.
Definition: pfs_instr_class.cc:1424
PFS_file_class * file_class_array
Definition: pfs_instr_class.cc:214
PFS_file_class * find_file_class(PFS_file_key key)
Find a file instrumentation class by key.
Definition: pfs_instr_class.cc:1725
@ PFS_CLASS_MAX
Definition: pfs_instr_class.h:134
@ PFS_CLASS_IDLE
Definition: pfs_instr_class.h:126
@ PFS_CLASS_LAST
Definition: pfs_instr_class.h:133
@ PFS_CLASS_MUTEX
Definition: pfs_instr_class.h:115
@ PFS_CLASS_STAGE
Definition: pfs_instr_class.h:120
@ PFS_CLASS_METER
Definition: pfs_instr_class.h:132
@ PFS_CLASS_NONE
Definition: pfs_instr_class.h:114
@ PFS_CLASS_TABLE
Definition: pfs_instr_class.h:119
@ PFS_CLASS_TABLE_LOCK
Definition: pfs_instr_class.h:125
@ PFS_CLASS_FILE
Definition: pfs_instr_class.h:118
@ PFS_CLASS_TABLE_IO
Definition: pfs_instr_class.h:124
@ PFS_CLASS_METADATA
Definition: pfs_instr_class.h:128
@ PFS_CLASS_RWLOCK
Definition: pfs_instr_class.h:116
@ PFS_CLASS_COND
Definition: pfs_instr_class.h:117
@ PFS_CLASS_MEMORY
Definition: pfs_instr_class.h:127
@ PFS_CLASS_THREAD
Definition: pfs_instr_class.h:130
@ PFS_CLASS_ERROR
Definition: pfs_instr_class.h:129
@ PFS_CLASS_STATEMENT
Definition: pfs_instr_class.h:121
@ PFS_CLASS_SOCKET
Definition: pfs_instr_class.h:123
@ PFS_CLASS_TRANSACTION
Definition: pfs_instr_class.h:122
@ PFS_CLASS_METRIC
Definition: pfs_instr_class.h:131
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:44
unsigned int PSI_file_key
Instrumented file key.
Definition: psi_file_bits.h:48
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_socket_key
Instrumented socket key.
Definition: psi_socket_bits.h:49
unsigned int PSI_stage_key
Instrumented stage key.
Definition: psi_stage_bits.h:43
unsigned int PSI_statement_key
Instrumented statement key.
Definition: psi_statement_bits.h:49
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:50
#define PSI_FLAG_USER
User flag.
Definition: psi_bits.h:103
#define PSI_FLAG_TRANSFER
Transferable flag.
Definition: psi_bits.h:95
#define PSI_FLAG_DISABLED
Instrument is disabled by default.
Definition: psi_bits.h:146
#define PSI_FLAG_MUTABLE
Mutable flag.
Definition: psi_bits.h:68
#define PSI_FLAG_STAGE_PROGRESS
Stage progress flag.
Definition: psi_bits.h:82
#define PSI_FLAG_RWLOCK_SX
Shared Exclusive flag.
Definition: psi_bits.h:88
#define PSI_FLAG_UNTIMED
Instrument is not timed by default.
Definition: psi_bits.h:151
#define PSI_FLAG_NO_SEQNUM
No sequence number flag.
Definition: psi_bits.h:136
#define PSI_FLAG_THREAD
Per Thread flag.
Definition: psi_bits.h:75
#define PSI_FLAG_AUTO_SEQNUM
Automatic sequence number flag.
Definition: psi_bits.h:130
#define PSI_FLAG_MEM_COLLECT
Enable collecting the memory consumed by threads.
Definition: psi_bits.h:141
#define PSI_FLAG_THREAD_SYSTEM
System thread flag.
Definition: psi_bits.h:124
#define PSI_FLAG_RWLOCK_PR
Priority lock flag.
Definition: psi_bits.h:118
#define PSI_FLAG_ONLY_GLOBAL_STAT
Global stat only flag.
Definition: psi_bits.h:112
static int flags[50]
Definition: hp_test1.cc:40
#define MAX_INDEXES
Definition: config.h:210
Header for compiler-dependent features.
constexpr bool likely(bool expr)
Definition: my_compiler.h:57
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
uint32_t uint32
Definition: my_inttypes.h:67
static int count
Definition: myisam_ftdump.cc:45
Common definition between mysql server & client.
#define NAME_LEN
Definition: mysql_com.h:67
const char * table_name
Definition: rules_table_service.cc:56
enum_compatibility_version
Enumeration holding the possible values for @terminology_use_previous.
Definition: terminology_use_previous_enum.h:48
Data types for columns used in the performance schema tables (declarations)
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:227
Miscellaneous global dependencies (declarations).
#define PFS_ALIGNED
Definition: pfs_global.h:57
#define PFS_MAX_OS_NAME_LENGTH
Maximum length of the thread os name.
Definition: pfs_instr_class.h:67
#define PFS_MAX_INFO_NAME_LENGTH
Maximum length of an instrument name.
Definition: pfs_instr_class.h:59
Performance schema internal locks (declarations).
Object names (declarations).
Statistics (declarations).
MetricOTELType
Definition: psi_metric_bits.h:32
@ ASYNC_COUNTER
Definition: psi_metric_bits.h:33
unsigned int PSI_meter_key
Definition: psi_metric_bits.h:101
MetricNumType
Definition: psi_metric_bits.h:38
@ METRIC_INTEGER
Definition: psi_metric_bits.h:38
unsigned int PSI_metric_key
Definition: psi_metric_bits.h:102
void(* measurement_callback_t)(void *measurement_context, measurement_delivery_callback_t delivery, void *delivery_context)
Single metric measurement callback can return multiple measurement values.
Definition: psi_metric_bits.h:97
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required bool enabled
Definition: replication_group_member_actions.proto:33
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
case opt name
Definition: sslopt-case.h:29
Definition: lf.h:187
Instrumentation metadata for a condition.
Definition: pfs_instr_class.h:347
PFS_cond_stat m_cond_stat
Condition usage statistics.
Definition: pfs_instr_class.h:352
PFS_cond * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:354
Statistics for conditions usage.
Definition: pfs_stat.h:238
Instrumented condition implementation.
Definition: pfs_instr.h:162
Instrumentation metadata for an error.
Definition: pfs_instr_class.h:578
Statistics for all server errors.
Definition: pfs_stat.h:557
Instrumentation metadata for a file.
Definition: pfs_instr_class.h:587
PFS_file * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:591
PFS_file_stat m_file_stat
File usage statistics.
Definition: pfs_instr_class.h:589
Statistics for FILE usage.
Definition: pfs_stat.h:308
Instrumented File and FILE implementation.
Definition: pfs_instr.h:179
Performance schema global sizing parameters.
Definition: pfs_server.h:120
Information for all instrumentation.
Definition: pfs_instr_class.h:212
bool is_deferred() const
Definition: pfs_instr_class.h:292
bool m_enabled
True if this instrument is enabled.
Definition: pfs_instr_class.h:216
static void set_enabled(PFS_instr_class *pfs, bool enabled)
uint m_flags
Instrument flags.
Definition: pfs_instr_class.h:220
bool is_untimed() const
Definition: pfs_instr_class.h:271
bool is_singleton() const
Definition: pfs_instr_class.h:239
PFS_class_type m_type
Class type.
Definition: pfs_instr_class.h:214
bool is_priority() const
Definition: pfs_instr_class.h:247
static void set_timed(PFS_instr_class *pfs, bool timed)
void set_enforced_flags(uint flags)
Definition: pfs_instr_class.h:273
bool is_progress() const
Definition: pfs_instr_class.h:243
bool can_be_timed() const
Definition: pfs_instr_class.h:301
bool is_transferable() const
Definition: pfs_instr_class.h:249
bool has_enforced_memory_cnt() const
Definition: pfs_instr_class.h:265
PFS_instr_name m_name
Instrument name.
Definition: pfs_instr_class.h:235
bool has_default_memory_cnt() const
Definition: pfs_instr_class.h:263
uint m_event_name_index
Instrument name index.
Definition: pfs_instr_class.h:233
bool has_auto_seqnum() const
Definition: pfs_instr_class.h:261
bool is_disabled() const
Definition: pfs_instr_class.h:269
bool m_timed
True if this instrument is timed.
Definition: pfs_instr_class.h:218
bool can_be_enforced() const
Definition: pfs_instr_class.h:312
bool is_global() const
Definition: pfs_instr_class.h:255
char * m_documentation
Documentation.
Definition: pfs_instr_class.h:237
bool is_user() const
Definition: pfs_instr_class.h:251
uint m_enforced_flags
Instrument enforced flags.
Definition: pfs_instr_class.h:222
bool is_mutable() const
Definition: pfs_instr_class.h:241
bool is_shared_exclusive() const
Definition: pfs_instr_class.h:245
int m_volatility
Volatility index.
Definition: pfs_instr_class.h:224
void enforce_valid_flags(uint allowed_flags)
Definition: pfs_instr_class.h:275
bool is_system_thread() const
Definition: pfs_instr_class.h:253
bool has_seqnum() const
Definition: pfs_instr_class.h:257
User-defined instrument configuration.
Definition: pfs_instr_class.h:138
uint m_name_length
Definition: pfs_instr_class.h:142
bool m_enabled
Enabled flag.
Definition: pfs_instr_class.h:144
bool m_timed
Timed flag.
Definition: pfs_instr_class.h:146
char * m_name
Definition: pfs_instr_class.h:140
Instrumentation metadata for a memory.
Definition: pfs_instr_class.h:624
Instrumentation metadata for a meter.
Definition: pfs_instr_class.h:393
pfs_lock m_lock
Definition: pfs_instr_class.h:394
Instrumentation metadata for a metric.
Definition: pfs_instr_class.h:370
measurement_callback_t m_measurement_callback
Definition: pfs_instr_class.h:388
pfs_lock m_lock
Definition: pfs_instr_class.h:371
Instrumentation metadata for a mutex.
Definition: pfs_instr_class.h:327
PFS_mutex_stat m_mutex_stat
Mutex usage statistics.
Definition: pfs_instr_class.h:329
PFS_mutex * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:331
Statistics for mutex usage.
Definition: pfs_stat.h:177
Instrumented mutex implementation.
Definition: pfs_instr.h:103
Instrumentation metadata for a read write lock.
Definition: pfs_instr_class.h:337
PFS_rwlock * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:341
PFS_rwlock_stat m_rwlock_stat
Rwlock usage statistics.
Definition: pfs_instr_class.h:339
Statistics for rwlock usage.
Definition: pfs_stat.h:204
Instrumented rwlock implementation.
Definition: pfs_instr.h:129
Definition: pfs_name.h:194
Single statistic.
Definition: pfs_stat.h:52
Instrumentation metadata for a socket.
Definition: pfs_instr_class.h:616
PFS_socket_stat m_socket_stat
Socket usage statistics.
Definition: pfs_instr_class.h:618
PFS_socket * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:620
Statistics for SOCKET usage.
Definition: pfs_stat.h:875
Instrumented socket implementation.
Definition: pfs_instr.h:289
Instrumentation metadata for a stage.
Definition: pfs_instr_class.h:595
uint m_prefix_length
Length of the "stage/<component>/" prefix.
Definition: pfs_instr_class.h:600
PFS_stage_stat m_stage_stat
Stage usage statistics.
Definition: pfs_instr_class.h:602
Statistics for stage usage.
Definition: pfs_stat.h:323
Instrumentation metadata for a statement.
Definition: pfs_instr_class.h:606
Single table I/O statistic.
Definition: pfs_stat.h:648
Table index or 'key'.
Definition: pfs_instr_class.h:424
uint m_name_length
Length in bytes of m_name.
Definition: pfs_instr_class.h:428
char m_name[NAME_LEN]
Index name.
Definition: pfs_instr_class.h:426
Statistics for table locks.
Definition: pfs_stat.h:710
Definition: pfs_name.h:242
Index statistics of a table.
Definition: pfs_instr_class.h:432
PFS_table_key m_key
The index name.
Definition: pfs_instr_class.h:435
PFS_table_io_stat m_stat
The index stat.
Definition: pfs_instr_class.h:437
pfs_lock m_lock
Definition: pfs_instr_class.h:433
PFS_table_share * m_owner
Owner table share.
Definition: pfs_instr_class.h:439
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:441
Key identifying a table share.
Definition: pfs_instr_class.h:412
PFS_schema_name m_schema_name
Table schema.
Definition: pfs_instr_class.h:417
PFS_table_name m_table_name
Table name.
Definition: pfs_instr_class.h:420
enum_object_type m_type
Object type.
Definition: pfs_instr_class.h:414
Lock statistics of a table.
Definition: pfs_instr_class.h:445
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:452
pfs_lock m_lock
Definition: pfs_instr_class.h:446
PFS_table_share * m_owner
Owner table share.
Definition: pfs_instr_class.h:450
PFS_table_lock_stat m_stat
Lock stats.
Definition: pfs_instr_class.h:448
Instrumentation metadata for a table share.
Definition: pfs_instr_class.h:456
PFS_table_share_key m_key
Search key.
Definition: pfs_instr_class.h:498
std::atomic< PFS_table_share_lock * > m_race_lock_stat
Table locks statistics.
Definition: pfs_instr_class.h:518
uint32 get_version()
Definition: pfs_instr_class.h:458
enum_object_type get_object_type() const
Definition: pfs_instr_class.h:460
bool m_timed
True if table instrumentation is timed.
Definition: pfs_instr_class.h:495
bool m_enabled
True if table instrumentation is enabled.
Definition: pfs_instr_class.h:490
void inc_refcount()
Definition: pfs_instr_class.h:478
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:503
void aggregate()
Definition: pfs_instr_class.h:469
int get_refcount()
Definition: pfs_instr_class.h:476
void init_refcount()
Definition: pfs_instr_class.h:474
std::atomic< int > m_refcount
Number of opened table handles.
Definition: pfs_instr_class.h:516
uint m_key_count
Number of indexes.
Definition: pfs_instr_class.h:501
void dec_refcount()
Definition: pfs_instr_class.h:480
pfs_lock m_lock
Internal lock.
Definition: pfs_instr_class.h:485
Instrumentation metadata of a thread.
Definition: pfs_instr_class.h:358
PFS_thread * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:360
std::atomic< unsigned int > m_seqnum
Thread instance sequence number counter.
Definition: pfs_instr_class.h:366
Instrumented thread implementation.
Definition: pfs_instr.h:375
Instrumentation metadata for a transaction.
Definition: pfs_instr_class.h:609
Statistics for transaction usage.
Definition: pfs_stat.h:459
Condition information.
Definition: psi_cond_bits.h:88
File instrument information.
Definition: psi_file_bits.h:114
Memory instrument information.
Definition: psi_memory_bits.h:58
Define a meter source, storing char pointers requires the original strings to be valid for entire lif...
Definition: psi_metric_bits.h:143
Define a metric source, storing char pointers requires the original strings to be valid for entire li...
Definition: psi_metric_bits.h:124
Mutex information.
Definition: psi_mutex_bits.h:73
Rwlock information.
Definition: psi_rwlock_bits.h:162
Socket instrument information.
Definition: psi_socket_bits.h:128
Stage instrument information.
Definition: psi_stage_bits.h:74
Statement instrument information.
Definition: psi_statement_bits.h:133
Thread instrument information.
Definition: psi_thread_bits.h:117
This structure is shared between different table objects.
Definition: table.h:701
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:154
Definition: result.h:30