MySQL 9.1.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"
39#include "mysql_com.h" /* NAME_LEN */
40#include "mysqld_error.h"
41#include "prealloced_array.h"
48
49struct TABLE_SHARE;
50
51/**
52 @file storage/perfschema/pfs_instr_class.h
53 Performance schema instruments metadata (declarations).
54*/
55
56/**
57 Maximum length of an instrument name.
58 For example, 'wait/sync/mutex/sql/LOCK_open' is an instrument name.
59*/
60#define PFS_MAX_INFO_NAME_LENGTH 128
61
62/**
63 Maximum length of the thread os name.
64 Must include a terminating NUL character.
65 Length is 16 because of linux pthread_setname_np(3)
66 @see my_thread_self_setname()
67*/
68#define PFS_MAX_OS_NAME_LENGTH 16
69
70/**
71 Maximum length of the 'full' prefix of an instrument name.
72 For example, for the instrument name 'wait/sync/mutex/sql/LOCK_open',
73 the full prefix is 'wait/sync/mutex/sql/', which in turn derives from
74 a prefix 'wait/sync/mutex' for mutexes, and a category of 'sql' for mutexes
75 of the sql layer in the server.
76*/
77#define PFS_MAX_FULL_PREFIX_NAME_LENGTH 32
78
79struct PFS_global_param;
80struct PFS_table_share;
81class PFS_opaque_container_page;
82
83/**
84 @addtogroup performance_schema_buffers
85 @{
86*/
87
88extern bool pfs_enabled;
89
90/** Global ref count for plugin and component events. */
91extern std::atomic<uint32> pfs_unload_plugin_ref_count;
92
93/** Key, naming a synch instrument (mutex, rwlock, cond). */
94typedef unsigned int PFS_sync_key;
95/** Key, naming a thread instrument. */
96typedef unsigned int PFS_thread_key;
97/** Key, naming a file instrument. */
98typedef unsigned int PFS_file_key;
99/** Key, naming a stage instrument. */
100typedef unsigned int PFS_stage_key;
101/** Key, naming a statement instrument. */
102typedef unsigned int PFS_statement_key;
103/** Key, naming a transaction instrument. */
104typedef unsigned int PFS_transaction_key;
105/** Key, naming a socket instrument. */
106typedef unsigned int PFS_socket_key;
107/** Key, naming a memory instrument. */
108typedef unsigned int PFS_memory_key;
109/** Key, naming a meter instrument. */
110typedef unsigned int PFS_meter_key;
111/** Key, naming a metric instrument. */
112typedef unsigned int PFS_metric_key;
113/** Key, naming a logger instrument. */
114typedef unsigned int PFS_logger_key;
115
140
141/** User-defined instrument configuration. */
143 /* Instrument name. */
144 char *m_name;
145 /* Name length. */
147 /** Enabled flag. */
149 /** Timed flag. */
151};
152
155
156/** User-defined meter configuration. */
158 /* Instrument name. */
159 char *m_name;
160 /* Name length. */
162 /** Enabled flag. */
164 /** Was enabled flag modified. */
166 /** Frequency value. */
168 /** Was frequency property modified. */
170};
171
174
175/** User-defined logger configuration. */
177 /* Instrument name. */
178 char *m_name;
179 /* Name length. */
181 /** Log level. */
183};
184
187
188struct PFS_thread;
189
190extern uint mutex_class_start;
191extern uint rwlock_class_start;
192extern uint cond_class_start;
193extern uint file_class_start;
194extern uint socket_class_start;
195extern uint wait_class_max;
196
197/**
198 Encapsulates the name of an instrumented entity.
199*/
201 public:
202 static constexpr uint max_length = PFS_MAX_INFO_NAME_LENGTH - 1;
203 /*
204 DO NOT ACCESS THE DATA MEMBERS DIRECTLY. USE THE GETTERS AND
205 SETTERS INSTEAD.
206
207 The data members should really have been private, but having both
208 private and public members would make the class a non-POD. We
209 need to call memset on PFS_instr_class (in init_instr_class), and
210 the behavior of memset is undefined on non-POD objects. Therefore
211 we keep the data members public, with an underscore prefix, and
212 this warning text.
213 */
214 public /*private*/:
215 /** Instrument name. */
216 char m_private_name[max_length + 1];
217 /** Length in bytes of @c m_name. */
219 /** Old instrument name, if any. */
221 /** Length in bytes of old instrument name len, if any. */
223 /** The oldest version that uses the new name. */
225
226 public:
227 /** Return the name as a string. */
228 const char *str() const;
229 /** Return the length of the string. */
230 uint length() const;
231 /**
232 Copy the specified name to this name.
233
234 @param class_type The class type of this name, i.e., whether it is
235 the name of a mutex, thread, etc.
236
237 @param name The buffer to read from.
238
239 @param max_length_arg If is given, at most that many chars are
240 copied, plus the terminating '\0'. Otherwise, up to buffer_size-1
241 characters are copied, plus the terminating '\0'.
242 */
243 void set(PFS_class_type class_type, const char *name,
244 uint max_length_arg = max_length);
245};
246
247/** Information for all instrumentation. */
249 /** Class type */
251 /** True if this instrument is enabled. */
253 /** True if this instrument is timed. */
255 /** Instrument flags. */
257 /** Instrument enforced flags. */
259 /** Volatility index. */
261 /**
262 Instrument name index.
263 Self index in:
264 - EVENTS_WAITS_SUMMARY_*_BY_EVENT_NAME for waits
265 - EVENTS_STAGES_SUMMARY_*_BY_EVENT_NAME for stages
266 - EVENTS_STATEMENTS_SUMMARY_*_BY_EVENT_NAME for statements
267 - EVENTS_TRANSACTIONS_SUMMARY_*_BY_EVENT_NAME for transactions
268 */
270 /** Instrument name. */
272 /** Documentation. */
274
275 bool is_singleton() const { return m_flags & PSI_FLAG_SINGLETON; }
276
277 bool is_mutable() const { return m_flags & PSI_FLAG_MUTABLE; }
278
279 bool is_progress() const { return m_flags & PSI_FLAG_STAGE_PROGRESS; }
280
282
283 bool is_priority() const { return m_flags & PSI_FLAG_RWLOCK_PR; }
284
285 bool is_transferable() const { return m_flags & PSI_FLAG_TRANSFER; }
286
287 bool is_user() const { return m_flags & PSI_FLAG_USER; }
288
290
291 bool is_global() const { return m_flags & PSI_FLAG_ONLY_GLOBAL_STAT; }
292
293 bool has_seqnum() const {
295 }
296
298
300
303 }
304
305 bool is_disabled() const { return m_flags & PSI_FLAG_DISABLED; }
306
307 bool is_untimed() const { return m_flags & PSI_FLAG_UNTIMED; }
308
310
311 void enforce_valid_flags(uint allowed_flags) {
312 /* Reserved for future use. */
313 allowed_flags |= PSI_FLAG_THREAD | PSI_FLAG_TRANSFER;
314
315 const uint valid_flags = m_flags & allowed_flags;
316 /*
317 This fails when the instrumented code is providing
318 flags that are not supported for this instrument.
319 To fix it, clean up the instrumented code.
320 */
321 assert(valid_flags == m_flags);
322 m_flags = valid_flags;
323 }
324
326 static void set_timed(PFS_instr_class *pfs, bool timed);
327
328 bool is_deferred() const {
329 switch (m_type) {
330 case PFS_CLASS_SOCKET:
331 return true;
332 default:
333 return false;
334 };
335 }
336
337 bool can_be_timed() const {
338 switch (m_type) {
339 case PFS_CLASS_MEMORY:
340 case PFS_CLASS_ERROR:
341 case PFS_CLASS_THREAD:
342 return false;
343 default:
344 return true;
345 };
346 }
347
348 bool can_be_enforced() const {
349 switch (m_type) {
350 case PFS_CLASS_MEMORY:
351 return true;
352 default:
353 return false;
354 };
355 }
356};
357
358struct PFS_mutex;
359
360#define PFS_MUTEX_PARTITIONS 2
361
362/** Instrumentation metadata for a mutex. */
364 /** Mutex usage statistics. */
366 /** Singleton instance. */
368};
369
370struct PFS_rwlock;
371
372/** Instrumentation metadata for a read write lock. */
374 /** Rwlock usage statistics. */
376 /** Singleton instance. */
378};
379
380struct PFS_cond;
381
382/** Instrumentation metadata for a condition. */
384 /**
385 Condition usage statistics.
386 This statistic is not exposed in user visible tables yet.
387 */
389 /** Singleton instance. */
391};
392
393/** Instrumentation metadata of a thread. */
395 /** Singleton instance. */
397 /** Thread history instrumentation flag. */
398 bool m_history{false};
399 /** Thread os name. */
400 char m_os_name[PFS_MAX_OS_NAME_LENGTH];
401 /** Thread instance sequence number counter. */
402 std::atomic<unsigned int> m_seqnum;
403};
404
405/** Instrumentation metadata for a metric. */
408
409 /** Metric name with length. */
410 const char *m_metric{nullptr};
411 uint m_metric_length{0};
412 /** Metric group with length. */
413 const char *m_group{nullptr};
414 uint m_group_length{0};
415 /** Metric unit with length. */
416 const char *m_unit{nullptr};
417 uint m_unit_length{0};
418 /** Metric description with length. */
419 const char *m_description{nullptr};
420 uint m_description_length{0};
425 void *m_measurement_context{nullptr};
426};
427
428/** Instrumentation metadata for a meter. */
431
432 /** Meter name with length. */
433 const char *m_meter{nullptr};
434 uint m_meter_length{0};
435 /** Meter export frequency in seconds. */
436 uint m_frequency{0};
437 /** Meter description with length. */
438 const char *m_description{nullptr};
439 uint m_description_length{0};
441
442 /** Metrics belonging to this meter. */
443 PSI_metric_key *m_metrics{nullptr};
444 uint m_metrics_size{0};
445};
446
447/** Instrumentation metadata for a telemetry logger. */
450
451 /** Logger name with length. */
452 char m_logger_name[64];
453 uint m_logger_name_length{0};
454
455 /** Logger description with length. */
456 char m_description[1024];
457 uint m_description_length{0};
458
459 /** Logging level for this logger */
461
462 /** Logging level for this logger with backend availability accounted for */
463 std::atomic<OTELLogLevel> m_effective_level;
464
466};
467
468/** Key identifying a table share. */
470 /** Object type. */
472
473 /** Table schema. */
475
476 /** Table name. */
478};
479
480/** Table index or 'key' */
482 /** Index name */
484 /** Length in bytes of @c m_name. */
486};
487
488/** Index statistics of a table.*/
491 /** The index name */
493 /** The index stat */
495 /** Owner table share. To be used later. */
497 /** Container page. */
498 PFS_opaque_container_page *m_page;
499};
500
501/** Lock statistics of a table.*/
504 /** Lock stats. */
506 /** Owner table share. To be used later. */
508 /** Container page. */
509 PFS_opaque_container_page *m_page;
510};
511
512/** Instrumentation metadata for a table share. */
514 public:
515 uint32 get_version() { return m_lock.get_version(); }
516
517 enum_object_type get_object_type() const { return m_key.m_type; }
518
519 void aggregate_io();
520 void aggregate_lock();
521
522 void sum_io(PFS_single_stat *result, uint key_count);
523 void sum_lock(PFS_single_stat *result);
524 void sum(PFS_single_stat *result, uint key_count);
525
526 inline void aggregate() {
527 aggregate_io();
528 aggregate_lock();
529 }
530
531 inline void init_refcount() { m_refcount.store(1); }
532
533 inline int get_refcount() { return m_refcount.load(); }
534
535 inline void inc_refcount() { ++m_refcount; }
536
537 inline void dec_refcount() { --m_refcount; }
538
539 void refresh_setup_object_flags(PFS_thread *thread);
540
541 /** Internal lock. */
543 /**
544 True if table instrumentation is enabled.
545 This flag is computed from the content of table setup_objects.
546 */
548 /**
549 True if table instrumentation is timed.
550 This flag is computed from the content of table setup_objects.
551 */
553
554 /** Search key. */
556
557 /** Number of indexes. */
559 /** Container page. */
560 PFS_opaque_container_page *m_page;
561
562 PFS_table_share_lock *find_lock_stat() const;
563 PFS_table_share_lock *find_or_create_lock_stat();
564 void destroy_lock_stat();
565
566 PFS_table_share_index *find_index_stat(uint index) const;
567 PFS_table_share_index *find_or_create_index_stat(
568 const TABLE_SHARE *server_share, uint index);
569 void destroy_index_stats();
570
571 private:
572 /** Number of opened table handles. */
573 std::atomic<int> m_refcount;
574 /** Table locks statistics. */
575 std::atomic<PFS_table_share_lock *> m_race_lock_stat;
576 /** Table indexes stats. */
577 std::atomic<PFS_table_share_index *> m_race_index_stat[MAX_INDEXES + 1];
578};
579
580/** Statistics for the IDLE instrument. */
582/** Statistics for dropped table I/O. */
584/** Statistics for dropped table lock. */
586/** Statistics for the METADATA instrument. */
588/** Statistics for the transaction instrument. */
590/** Statistics for the error instrument. */
592
593inline uint sanitize_index_count(uint count) {
594 if (likely(count <= MAX_INDEXES)) {
595 return count;
596 }
597 return 0;
598}
599
600#define GLOBAL_TABLE_IO_EVENT_INDEX 0
601#define GLOBAL_TABLE_LOCK_EVENT_INDEX 1
602#define GLOBAL_IDLE_EVENT_INDEX 2
603#define GLOBAL_METADATA_EVENT_INDEX 3
604/** Number of global wait events. */
605#define COUNT_GLOBAL_EVENT_INDEX 4
606
607/** Transaction events are not wait events .*/
608#define GLOBAL_TRANSACTION_INDEX 0
609
610#define GLOBAL_ERROR_INDEX 0
611
612/**
613 Instrument controlling all table I/O.
614 This instrument is used with table SETUP_OBJECTS.
615*/
617
618/**
619 Instrument controlling all table lock.
620 This instrument is used with table SETUP_OBJECTS.
621*/
623
624/**
625 Instrument controlling all idle waits.
626*/
628
629/**
630 Instrument controlling all metadata locks.
631*/
633
634/** Instrumentation metadata for an error. */
636/**
637 Instrument controlling all server errors.
638*/
640
641struct PFS_file;
642
643/** Instrumentation metadata for a file. */
645 /** File usage statistics. */
647 /** Singleton instance. */
649};
650
651/** Instrumentation metadata for a stage. */
653 /**
654 Length of the @c "stage/<component>/" prefix.
655 This is to extract @c "foo" from @c "stage/sql/foo".
656 */
658 /** Stage usage statistics. */
660};
661
662/** Instrumentation metadata for a statement. */
664
665/** Instrumentation metadata for a transaction. */
667
669
670struct PFS_socket;
671
672/** Instrumentation metadata for a socket. */
674 /** Socket usage statistics. */
676 /** Singleton instance. */
678};
679
680/** Instrumentation metadata for a memory. */
682
684
686
687int init_sync_class(uint mutex_class_sizing, uint rwlock_class_sizing,
688 uint cond_class_sizing);
689
690void cleanup_sync_class();
691int init_thread_class(uint thread_class_sizing);
693int init_table_share(uint table_share_sizing);
695
696int init_table_share_lock_stat(uint table_stat_sizing);
700
701int init_table_share_index_stat(uint index_stat_sizing);
704 uint index);
706
709int init_file_class(uint file_class_sizing);
710void cleanup_file_class();
711int init_stage_class(uint stage_class_sizing);
713int init_statement_class(uint statement_class_sizing);
715int init_socket_class(uint socket_class_sizing);
717int init_memory_class(uint memory_class_sizing);
719int init_metric_class(uint metric_class_sizing);
721int init_meter_class(uint meter_class_sizing);
723int init_logger_class(uint logger_class_sizing);
725
726PFS_sync_key register_mutex_class(const char *name, uint name_length,
727 PSI_mutex_info *info);
728
729PFS_sync_key register_rwlock_class(const char *name, uint name_length,
730 PSI_rwlock_info *info);
731
732PFS_sync_key register_cond_class(const char *name, uint name_length,
733 PSI_cond_info *info);
734
735PFS_thread_key register_thread_class(const char *name, uint name_length,
736 PSI_thread_info *info);
737
738PFS_file_key register_file_class(const char *name, uint name_length,
739 PSI_file_info *info);
740
741PFS_stage_key register_stage_class(const char *name, uint prefix_length,
742 uint name_length, PSI_stage_info *info);
743
744PFS_statement_key register_statement_class(const char *name, uint name_length,
745 PSI_statement_info *info);
746
747PFS_socket_key register_socket_class(const char *name, uint name_length,
748 PSI_socket_info *info);
749
750PFS_memory_key register_memory_class(const char *name, uint name_length,
751 PSI_memory_info *info);
752
753PFS_meter_key register_meter_class(const char *name, uint name_length,
754 PSI_meter_info_v1 *info);
757PFS_metric_key register_metric_class(const char *name, uint name_length,
758 PSI_metric_info_v1 *info,
759 const char *meter);
762PFS_logger_key register_logger_class(const char *name, uint name_length,
763 PSI_logger_info_v1 *info);
766
795 PFS_transaction_class *unsafe);
801
803 const TABLE_SHARE *share);
805void drop_table_share(PFS_thread *thread, bool temporary,
806 const char *schema_name, uint schema_name_length,
807 const char *table_name, uint table_name_length);
808
810
811extern ulong mutex_class_max;
812extern ulong mutex_class_lost;
813extern ulong rwlock_class_max;
814extern ulong rwlock_class_lost;
815extern ulong cond_class_max;
816extern ulong cond_class_lost;
817extern ulong thread_class_max;
818extern ulong thread_class_lost;
819extern ulong file_class_max;
820extern ulong file_class_lost;
821extern ulong stage_class_max;
822extern ulong stage_class_lost;
823extern ulong statement_class_max;
824extern ulong statement_class_lost;
825extern ulong transaction_class_max;
826extern ulong socket_class_max;
827extern ulong socket_class_lost;
828extern ulong memory_class_max;
829extern ulong memory_class_lost;
830extern ulong meter_class_max;
831extern ulong meter_class_lost;
832extern ulong metric_class_max;
833extern ulong metric_class_lost;
834extern ulong logger_class_max;
835extern ulong logger_class_lost;
836extern ulong error_class_max;
837
838/* Exposing the data directly, for iterators. */
839
847
851
852/** Update derived flags for all table shares. */
854
855/** Update derived flags for all stored procedure shares. */
857
859
860/**
861 Get current time for GTID monitoring.
862
863 @return Time in microseconds when PFS monitoring is enabled.
864 @return 0 when PFS monitoring is disabled.
865*/
867
868/** @} */
869#endif
Encapsulates the name of an instrumented entity.
Definition: pfs_instr_class.h:200
const char * m_private_old_name
Old instrument name, if any.
Definition: pfs_instr_class.h:220
terminology_use_previous::enum_compatibility_version m_private_version
The oldest version that uses the new name.
Definition: pfs_instr_class.h:224
uint m_private_old_name_length
Length in bytes of old instrument name len, if any.
Definition: pfs_instr_class.h:222
static constexpr uint max_length
Definition: pfs_instr_class.h:202
uint m_private_name_length
Length in bytes of m_name.
Definition: pfs_instr_class.h:218
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:1053
PFS_instr_class global_metadata_class
Instrument controlling all metadata locks.
Definition: pfs_instr_class.cc:216
LF_HASH table_share_hash
Hash index for instrumented table shares.
Definition: pfs_instr_class.cc:232
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:1473
PFS_thread_class * sanitize_thread_class(PFS_thread_class *unsafe)
Definition: pfs_instr_class.cc:1720
uint socket_class_start
Definition: pfs_instr_class.cc:266
void cleanup_logger_class()
Cleanup the logger class buffers.
Definition: pfs_instr_class.cc:638
PFS_logger_key register_logger_class(const char *name, uint name_length, PSI_logger_info_v1 *info)
Register a logger instrumentation metadata.
Definition: pfs_instr_class.cc:2261
PFS_socket_class * sanitize_socket_class(PFS_socket_class *unsafe)
Definition: pfs_instr_class.cc:1970
unsigned int PFS_transaction_key
Key, naming a transaction instrument.
Definition: pfs_instr_class.h:104
PFS_rwlock_class * find_rwlock_class(PFS_sync_key key)
Find a rwlock instrumentation class by key.
Definition: pfs_instr_class.cc:1587
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:2037
ulong error_class_max
Number of error classes.
Definition: pfs_instr_class.cc:187
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:1926
ulong stage_class_max
Size of the stage class array.
Definition: pfs_instr_class.cc:147
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:1775
unsigned int PFS_file_key
Key, naming a file instrument.
Definition: pfs_instr_class.h:98
void cleanup_memory_class()
Cleanup the memory class buffers.
Definition: pfs_instr_class.cc:1174
unsigned int PFS_sync_key
Key, naming a synch instrument (mutex, rwlock, cond).
Definition: pfs_instr_class.h:94
PFS_rwlock_class * rwlock_class_array
Definition: pfs_instr_class.cc:190
PFS_metric_class * metric_class_array
Definition: pfs_instr_class.cc:193
PFS_meter_class * sanitize_meter_class(PFS_meter_class *unsafe)
Definition: pfs_instr_class.cc:1618
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:2662
int init_table_share(uint table_share_sizing)
Initialize the table share buffer.
Definition: pfs_instr_class.cc:517
void cleanup_table_share_index_stat()
Cleanup the table stat buffers.
Definition: pfs_instr_class.cc:984
ulonglong gtid_monitoring_getsystime()
Get current time for GTID monitoring.
Definition: pfs_instr_class.cc:2764
PFS_instr_class global_table_lock_class
Instrument controlling all table lock.
Definition: pfs_instr_class.cc:214
ulong logger_class_lost
Number of logger class lost.
Definition: pfs_instr_class.cc:173
uint mutex_class_start
Definition: pfs_instr_class.cc:261
PFS_instr_class global_idle_class
Instrument controlling all idle waits.
Definition: pfs_instr_class.cc:215
ulong thread_class_max
Size of the thread class array.
Definition: pfs_instr_class.cc:139
PFS_meter_class * find_meter_class(PSI_meter_key key)
Find a meter instrumentation class by key.
Definition: pfs_instr_class.cc:1614
ulong socket_class_lost
Number of socket class lost.
Definition: pfs_instr_class.cc:157
void cleanup_table_share_lock_stat()
Cleanup the table stat buffers.
Definition: pfs_instr_class.cc:926
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:2472
ulong meter_class_max
Size of the meter class array.
Definition: pfs_instr_class.cc:163
PFS_instr_class * find_metadata_class(uint index)
Definition: pfs_instr_class.cc:2395
uint sanitize_index_count(uint count)
Definition: pfs_instr_class.h:593
unsigned int PFS_meter_key
Key, naming a meter instrument.
Definition: pfs_instr_class.h:110
ulong socket_class_max
Size of the socket class array.
Definition: pfs_instr_class.cc:155
unsigned int PFS_socket_key
Key, naming a socket instrument.
Definition: pfs_instr_class.h:106
ulong rwlock_class_lost
Number of rwlock class lost.
Definition: pfs_instr_class.cc:133
void unregister_meter_class(PSI_meter_info_v1 *info)
Definition: pfs_instr_class.cc:2122
int init_table_share_lock_stat(uint table_stat_sizing)
Initialize the table lock stat buffer.
Definition: pfs_instr_class.cc:890
PFS_stage_class * sanitize_stage_class(PFS_stage_class *unsafe)
Definition: pfs_instr_class.cc:1900
PFS_cond_class * find_cond_class(PFS_sync_key key)
Find a condition instrumentation class by key.
Definition: pfs_instr_class.cc:1601
Pfs_meter_config_array * pfs_meter_config_array
PFS_METER option settings array.
Definition: pfs_instr_class.cc:96
Prealloced_array< PFS_instr_config *, 10 > Pfs_instr_config_array
Definition: pfs_instr_class.h:153
int init_file_class(uint file_class_sizing)
Initialize the file class buffer.
Definition: pfs_instr_class.cc:993
uint length() const
Return the length of the string.
Definition: pfs_instr_class.cc:276
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:1732
Pfs_instr_config_array * pfs_instr_config_array
PFS_INSTRUMENT option settings array.
Definition: pfs_instr_class.cc:84
uint32 metric_class_count()
Definition: pfs_instr_class.cc:2252
Prealloced_array< PFS_meter_config *, 10 > Pfs_meter_config_array
Definition: pfs_instr_class.h:172
ulong memory_class_lost
Number of memory class lost.
Definition: pfs_instr_class.cc:161
ulong statement_class_lost
Number of statement class lost.
Definition: pfs_instr_class.cc:153
PFS_stage_class * find_stage_class(PFS_stage_key key)
Find a stage instrumentation class by key.
Definition: pfs_instr_class.cc:1896
uint cond_class_start
Definition: pfs_instr_class.cc:263
PFS_statement_class * find_statement_class(PFS_stage_key key)
Find a statement instrumentation class by key.
Definition: pfs_instr_class.cc:1910
ulong cond_class_max
Size of the condition class array.
Definition: pfs_instr_class.cc:135
ulong mutex_class_lost
Number of mutex class lost.
Definition: pfs_instr_class.cc:129
PFS_statement_class * sanitize_statement_class(PFS_statement_class *unsafe)
Definition: pfs_instr_class.cc:1914
unsigned int PFS_memory_key
Key, naming a memory instrument.
Definition: pfs_instr_class.h:108
PFS_table_lock_stat global_table_lock_stat
Statistics for dropped table lock.
Definition: pfs_instr_class.cc:209
void register_global_classes()
Definition: pfs_instr_class.cc:329
ulong memory_class_max
Size of the memory class array.
Definition: pfs_instr_class.cc:159
void cleanup_metric_class()
Cleanup the metric class buffers.
Definition: pfs_instr_class.cc:597
void reset_file_class_io()
Reset the I/O statistics per file class.
Definition: pfs_instr_class.cc:2707
uint wait_class_max
Definition: pfs_instr_class.cc:265
PFS_metric_class * sanitize_metric_class(PFS_metric_class *unsafe)
Definition: pfs_instr_class.cc:1632
PFS_table_share_lock * create_table_share_lock_stat()
Create a table share lock instrumentation.
Definition: pfs_instr_class.cc:902
PFS_transaction_class * find_transaction_class(uint index)
Definition: pfs_instr_class.cc:2423
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:1826
void update_table_share_derived_flags(PFS_thread *thread)
Update derived flags for all table shares.
Definition: pfs_instr_class.cc:2740
void unregister_metric_class(PSI_metric_info_v1 *info)
Definition: pfs_instr_class.cc:2234
ulong stage_class_lost
Number of stage class lost.
Definition: pfs_instr_class.cc:149
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:2150
PFS_logger_class * logger_class_array
Definition: pfs_instr_class.cc:194
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:1653
void cleanup_stage_class()
Cleanup the stage class buffers.
Definition: pfs_instr_class.cc:1054
PFS_cond_class * sanitize_cond_class(PFS_cond_class *unsafe)
Definition: pfs_instr_class.cc:1605
void unregister_logger_class(PSI_logger_info_v1 *info)
Definition: pfs_instr_class.cc:2343
PFS_instr_class * sanitize_idle_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2388
void cleanup_meter_class()
Cleanup the meter class buffers.
Definition: pfs_instr_class.cc:552
PFS_error_stat global_error_stat
Statistics for the error instrument.
Definition: pfs_instr_class.cc:212
Pfs_logger_config_array * pfs_logger_config_array
PFS_LOGGER option settings array.
Definition: pfs_instr_class.cc:103
PFS_thread_class * find_thread_class(PFS_sync_key key)
Find a thread instrumentation class by key.
Definition: pfs_instr_class.cc:1716
PFS_table_io_stat global_table_io_stat
Statistics for dropped table I/O.
Definition: pfs_instr_class.cc:208
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:1521
PFS_instr_class * sanitize_metadata_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2402
unsigned int PFS_logger_key
Key, naming a logger instrument.
Definition: pfs_instr_class.h:114
PFS_mutex_class * sanitize_mutex_class(PFS_mutex_class *unsafe)
Definition: pfs_instr_class.cc:1577
PFS_error_class global_error_class
Instrument controlling all server errors.
Definition: pfs_instr_class.cc:217
ulong logger_class_max
Size of the logger class array.
Definition: pfs_instr_class.cc:171
uint file_class_start
Definition: pfs_instr_class.cc:264
int init_logger_class(uint logger_class_sizing)
Initialize the logger class buffer.
Definition: pfs_instr_class.cc:616
PFS_transaction_stat global_transaction_stat
Statistics for the transaction instrument.
Definition: pfs_instr_class.cc:211
PFS_cond_class * cond_class_array
Definition: pfs_instr_class.cc:191
PFS_rwlock_class * sanitize_rwlock_class(PFS_rwlock_class *unsafe)
Definition: pfs_instr_class.cc:1591
ulong file_class_lost
Number of file class lost.
Definition: pfs_instr_class.cc:145
PFS_error_class * sanitize_error_class(PFS_instr_class *unsafe)
ulong metric_class_lost
Number of metric class lost.
Definition: pfs_instr_class.cc:169
int init_stage_class(uint stage_class_sizing)
Initialize the stage class buffer.
Definition: pfs_instr_class.cc:1033
PFS_instr_class * find_idle_class(uint index)
Definition: pfs_instr_class.cc:2381
int init_thread_class(uint thread_class_sizing)
Initialize the thread class buffer.
Definition: pfs_instr_class.cc:476
PFS_metric_class * find_metric_class(PSI_metric_key key)
Find a metric instrumentation class by key.
Definition: pfs_instr_class.cc:1628
void init_event_name_sizing(const PFS_global_param *param)
Definition: pfs_instr_class.cc:319
int init_socket_class(uint socket_class_sizing)
Initialize the socket class buffer.
Definition: pfs_instr_class.cc:1113
PFS_socket_class * find_socket_class(PFS_socket_key key)
Find a socket instrumentation class by key.
Definition: pfs_instr_class.cc:1966
void update_program_share_derived_flags(PFS_thread *thread)
Update derived flags for all stored procedure shares.
Definition: pfs_instr_class.cc:2759
uint32 meter_class_count()
Definition: pfs_instr_class.cc:2140
PFS_error_class * find_error_class(uint index)
Definition: pfs_instr_class.cc:2409
PFS_logger_class * find_logger_class(PSI_logger_key key)
Find a logger instrumentation class by key.
Definition: pfs_instr_class.cc:1642
PFS_file_class * sanitize_file_class(PFS_file_class *unsafe)
Definition: pfs_instr_class.cc:1887
unsigned int PFS_stage_key
Key, naming a stage instrument.
Definition: pfs_instr_class.h:100
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:498
int init_statement_class(uint statement_class_sizing)
Initialize the statement class buffer.
Definition: pfs_instr_class.cc:1073
ulong file_class_max
Size of the file class array.
Definition: pfs_instr_class.cc:143
ulong thread_class_lost
Number of thread class lost.
Definition: pfs_instr_class.cc:141
ulong metric_class_max
Size of the metric class array.
Definition: pfs_instr_class.cc:167
void reset_events_waits_by_class()
Reset the wait statistics per instrument class.
Definition: pfs_instr_class.cc:2697
PFS_table_share * sanitize_table_share(PFS_table_share *unsafe)
Sanitize an unsafe table_share pointer.
Definition: pfs_instr_class.cc:2692
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:1982
PFS_transaction_class global_transaction_class
Definition: pfs_instr_class.cc:218
unsigned int PFS_statement_key
Key, naming a statement instrument.
Definition: pfs_instr_class.h:102
unsigned int PFS_metric_key
Key, naming a metric instrument.
Definition: pfs_instr_class.h:112
PFS_single_stat global_idle_stat
Statistics for the IDLE instrument.
Definition: pfs_instr_class.cc:207
unsigned int PFS_thread_key
Key, naming a thread instrument.
Definition: pfs_instr_class.h:96
int init_table_share_index_stat(uint index_stat_sizing)
Initialize table index stat buffer.
Definition: pfs_instr_class.cc:935
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:1376
PFS_memory_class * sanitize_memory_class(PFS_memory_class *unsafe)
Definition: pfs_instr_class.cc:2025
void cleanup_file_class()
Cleanup the file class buffers.
Definition: pfs_instr_class.cc:1014
bool pfs_enabled
Global performance schema flag.
Definition: pfs_instr_class.cc:72
uint rwlock_class_start
Definition: pfs_instr_class.cc:262
PFS_class_type
Definition: pfs_instr_class.h:116
ulong mutex_class_max
Size of the mutex class array.
Definition: pfs_instr_class.cc:127
int init_meter_class(uint meter_class_sizing)
Initialize the meter class buffer.
Definition: pfs_instr_class.cc:530
PFS_single_stat global_metadata_stat
Statistics for the METADATA instrument.
Definition: pfs_instr_class.cc:210
ulong statement_class_max
Size of the statement class array.
Definition: pfs_instr_class.cc:151
void cleanup_table_share_hash()
Cleanup the table share hash table.
Definition: pfs_instr_class.cc:728
ulong meter_class_lost
Number of meter class lost.
Definition: pfs_instr_class.cc:165
const char * str() const
Return the name as a string.
Definition: pfs_instr_class.cc:268
PFS_instr_class global_table_io_class
Instrument controlling all table I/O.
Definition: pfs_instr_class.cc:213
void reset_socket_class_io()
Reset the I/O statistics per socket class.
Definition: pfs_instr_class.cc:2717
PFS_instr_class * sanitize_table_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2373
int init_table_share_hash(const PFS_global_param *param)
Initialize the table share hash table.
Definition: pfs_instr_class.cc:717
void cleanup_table_share()
Cleanup the table share buffers.
Definition: pfs_instr_class.cc:647
ulong rwlock_class_max
Size of the rwlock class array.
Definition: pfs_instr_class.cc:131
int init_metric_class(uint metric_class_sizing)
Initialize the metric class buffer.
Definition: pfs_instr_class.cc:575
void cleanup_socket_class()
Cleanup the socket class buffers.
Definition: pfs_instr_class.cc:1134
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:301
ulong cond_class_lost
Number of condition class lost.
Definition: pfs_instr_class.cc:137
PFS_memory_class * find_memory_class(PFS_memory_key key)
Find a memory instrumentation class by key.
Definition: pfs_instr_class.cc:2021
PFS_transaction_class * sanitize_transaction_class(PFS_transaction_class *unsafe)
Definition: pfs_instr_class.cc:2430
ulong transaction_class_max
Number of transaction classes.
Definition: pfs_instr_class.cc:180
void cleanup_sync_class()
Cleanup the instrument synch class buffers.
Definition: pfs_instr_class.cc:433
int init_memory_class(uint memory_class_sizing)
Initialize the memory class buffer.
Definition: pfs_instr_class.cc:1153
Prealloced_array< PFS_logger_config *, 10 > Pfs_logger_config_array
Definition: pfs_instr_class.h:185
void release_table_share_lock_stat(PFS_table_share_lock *pfs)
Release a table share lock instrumentation.
Definition: pfs_instr_class.cc:920
PFS_meter_class * meter_class_array
Definition: pfs_instr_class.cc:192
void cleanup_statement_class()
Cleanup the statement class buffers.
Definition: pfs_instr_class.cc:1094
void release_table_share_index_stat(PFS_table_share_index *pfs)
Release a table share index instrumentation.
Definition: pfs_instr_class.cc:978
PFS_mutex_class * mutex_class_array
Definition: pfs_instr_class.cc:189
PFS_instr_class * find_table_class(uint index)
Definition: pfs_instr_class.cc:2363
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:947
uint32 logger_class_count()
Definition: pfs_instr_class.cc:2361
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:385
PFS_mutex_class * find_mutex_class(PFS_sync_key key)
Find a mutex instrumentation class by key.
Definition: pfs_instr_class.cc:1573
PFS_file_class * file_class_array
Definition: pfs_instr_class.cc:239
PFS_file_class * find_file_class(PFS_file_key key)
Find a file instrumentation class by key.
Definition: pfs_instr_class.cc:1883
@ PFS_CLASS_MAX
Definition: pfs_instr_class.h:138
@ PFS_CLASS_IDLE
Definition: pfs_instr_class.h:129
@ PFS_CLASS_LAST
Definition: pfs_instr_class.h:137
@ PFS_CLASS_MUTEX
Definition: pfs_instr_class.h:118
@ PFS_CLASS_STAGE
Definition: pfs_instr_class.h:123
@ PFS_CLASS_METER
Definition: pfs_instr_class.h:135
@ PFS_CLASS_NONE
Definition: pfs_instr_class.h:117
@ PFS_CLASS_TABLE
Definition: pfs_instr_class.h:122
@ PFS_CLASS_TABLE_LOCK
Definition: pfs_instr_class.h:128
@ PFS_CLASS_FILE
Definition: pfs_instr_class.h:121
@ PFS_CLASS_TABLE_IO
Definition: pfs_instr_class.h:127
@ PFS_CLASS_METADATA
Definition: pfs_instr_class.h:131
@ PFS_CLASS_RWLOCK
Definition: pfs_instr_class.h:119
@ PFS_CLASS_COND
Definition: pfs_instr_class.h:120
@ PFS_CLASS_MEMORY
Definition: pfs_instr_class.h:130
@ PFS_CLASS_THREAD
Definition: pfs_instr_class.h:133
@ PFS_CLASS_ERROR
Definition: pfs_instr_class.h:132
@ PFS_CLASS_STATEMENT
Definition: pfs_instr_class.h:124
@ PFS_CLASS_SOCKET
Definition: pfs_instr_class.h:126
@ PFS_CLASS_TRANSACTION
Definition: pfs_instr_class.h:125
@ PFS_CLASS_METRIC
Definition: pfs_instr_class.h:134
@ PFS_CLASS_LOGGER
Definition: pfs_instr_class.h:136
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
Header for compiler-dependent features.
constexpr bool likely(bool expr)
Definition: my_compiler.h:57
#define MAX_INDEXES
Definition: my_config.h:210
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
static PSI_meter_info_v1 meter[]
Definition: plugin.cc:96
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:68
#define PFS_MAX_INFO_NAME_LENGTH
Maximum length of an instrument name.
Definition: pfs_instr_class.h:60
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
OTELLogLevel
Log levels as supported by opentelemetry-cpp (+ "none"), see: api/include/opentelemetry/logs/severity...
Definition: server_telemetry_logs_client_bits.h:43
unsigned int PSI_logger_key
Definition: server_telemetry_logs_client_bits.h:45
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:383
PFS_cond_stat m_cond_stat
Condition usage statistics.
Definition: pfs_instr_class.h:388
PFS_cond * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:390
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:635
Statistics for all server errors.
Definition: pfs_stat.h:557
Instrumentation metadata for a file.
Definition: pfs_instr_class.h:644
PFS_file * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:648
PFS_file_stat m_file_stat
File usage statistics.
Definition: pfs_instr_class.h:646
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:124
Information for all instrumentation.
Definition: pfs_instr_class.h:248
bool is_deferred() const
Definition: pfs_instr_class.h:328
bool m_enabled
True if this instrument is enabled.
Definition: pfs_instr_class.h:252
static void set_enabled(PFS_instr_class *pfs, bool enabled)
uint m_flags
Instrument flags.
Definition: pfs_instr_class.h:256
bool is_untimed() const
Definition: pfs_instr_class.h:307
bool is_singleton() const
Definition: pfs_instr_class.h:275
PFS_class_type m_type
Class type.
Definition: pfs_instr_class.h:250
bool is_priority() const
Definition: pfs_instr_class.h:283
static void set_timed(PFS_instr_class *pfs, bool timed)
void set_enforced_flags(uint flags)
Definition: pfs_instr_class.h:309
bool is_progress() const
Definition: pfs_instr_class.h:279
bool can_be_timed() const
Definition: pfs_instr_class.h:337
bool is_transferable() const
Definition: pfs_instr_class.h:285
bool has_enforced_memory_cnt() const
Definition: pfs_instr_class.h:301
PFS_instr_name m_name
Instrument name.
Definition: pfs_instr_class.h:271
bool has_default_memory_cnt() const
Definition: pfs_instr_class.h:299
uint m_event_name_index
Instrument name index.
Definition: pfs_instr_class.h:269
bool has_auto_seqnum() const
Definition: pfs_instr_class.h:297
bool is_disabled() const
Definition: pfs_instr_class.h:305
bool m_timed
True if this instrument is timed.
Definition: pfs_instr_class.h:254
bool can_be_enforced() const
Definition: pfs_instr_class.h:348
bool is_global() const
Definition: pfs_instr_class.h:291
char * m_documentation
Documentation.
Definition: pfs_instr_class.h:273
bool is_user() const
Definition: pfs_instr_class.h:287
uint m_enforced_flags
Instrument enforced flags.
Definition: pfs_instr_class.h:258
bool is_mutable() const
Definition: pfs_instr_class.h:277
bool is_shared_exclusive() const
Definition: pfs_instr_class.h:281
int m_volatility
Volatility index.
Definition: pfs_instr_class.h:260
void enforce_valid_flags(uint allowed_flags)
Definition: pfs_instr_class.h:311
bool is_system_thread() const
Definition: pfs_instr_class.h:289
bool has_seqnum() const
Definition: pfs_instr_class.h:293
User-defined instrument configuration.
Definition: pfs_instr_class.h:142
uint m_name_length
Definition: pfs_instr_class.h:146
bool m_enabled
Enabled flag.
Definition: pfs_instr_class.h:148
bool m_timed
Timed flag.
Definition: pfs_instr_class.h:150
char * m_name
Definition: pfs_instr_class.h:144
Instrumentation metadata for a telemetry logger.
Definition: pfs_instr_class.h:448
OTELLogLevel m_level
Logging level for this logger.
Definition: pfs_instr_class.h:460
pfs_lock m_lock
Definition: pfs_instr_class.h:449
std::atomic< OTELLogLevel > m_effective_level
Logging level for this logger with backend availability accounted for.
Definition: pfs_instr_class.h:463
User-defined logger configuration.
Definition: pfs_instr_class.h:176
OTELLogLevel m_level
Log level.
Definition: pfs_instr_class.h:182
char * m_name
Definition: pfs_instr_class.h:178
uint m_name_length
Definition: pfs_instr_class.h:180
Instrumentation metadata for a memory.
Definition: pfs_instr_class.h:681
Instrumentation metadata for a meter.
Definition: pfs_instr_class.h:429
pfs_lock m_lock
Definition: pfs_instr_class.h:430
User-defined meter configuration.
Definition: pfs_instr_class.h:157
bool m_enabled_set
Was enabled flag modified.
Definition: pfs_instr_class.h:165
bool m_enabled
Enabled flag.
Definition: pfs_instr_class.h:163
uint m_frequency
Frequency value.
Definition: pfs_instr_class.h:167
char * m_name
Definition: pfs_instr_class.h:159
bool m_frequency_set
Was frequency property modified.
Definition: pfs_instr_class.h:169
uint m_name_length
Definition: pfs_instr_class.h:161
Instrumentation metadata for a metric.
Definition: pfs_instr_class.h:406
measurement_callback_t m_measurement_callback
Definition: pfs_instr_class.h:424
pfs_lock m_lock
Definition: pfs_instr_class.h:407
Instrumentation metadata for a mutex.
Definition: pfs_instr_class.h:363
PFS_mutex_stat m_mutex_stat
Mutex usage statistics.
Definition: pfs_instr_class.h:365
PFS_mutex * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:367
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:373
PFS_rwlock * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:377
PFS_rwlock_stat m_rwlock_stat
Rwlock usage statistics.
Definition: pfs_instr_class.h:375
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:673
PFS_socket_stat m_socket_stat
Socket usage statistics.
Definition: pfs_instr_class.h:675
PFS_socket * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:677
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:652
uint m_prefix_length
Length of the "stage/<component>/" prefix.
Definition: pfs_instr_class.h:657
PFS_stage_stat m_stage_stat
Stage usage statistics.
Definition: pfs_instr_class.h:659
Statistics for stage usage.
Definition: pfs_stat.h:323
Instrumentation metadata for a statement.
Definition: pfs_instr_class.h:663
Single table I/O statistic.
Definition: pfs_stat.h:648
Table index or 'key'.
Definition: pfs_instr_class.h:481
uint m_name_length
Length in bytes of m_name.
Definition: pfs_instr_class.h:485
char m_name[NAME_LEN]
Index name.
Definition: pfs_instr_class.h:483
Statistics for table locks.
Definition: pfs_stat.h:710
Definition: pfs_name.h:242
Index statistics of a table.
Definition: pfs_instr_class.h:489
PFS_table_key m_key
The index name.
Definition: pfs_instr_class.h:492
PFS_table_io_stat m_stat
The index stat.
Definition: pfs_instr_class.h:494
pfs_lock m_lock
Definition: pfs_instr_class.h:490
PFS_table_share * m_owner
Owner table share.
Definition: pfs_instr_class.h:496
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:498
Key identifying a table share.
Definition: pfs_instr_class.h:469
PFS_schema_name m_schema_name
Table schema.
Definition: pfs_instr_class.h:474
PFS_table_name m_table_name
Table name.
Definition: pfs_instr_class.h:477
enum_object_type m_type
Object type.
Definition: pfs_instr_class.h:471
Lock statistics of a table.
Definition: pfs_instr_class.h:502
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:509
pfs_lock m_lock
Definition: pfs_instr_class.h:503
PFS_table_share * m_owner
Owner table share.
Definition: pfs_instr_class.h:507
PFS_table_lock_stat m_stat
Lock stats.
Definition: pfs_instr_class.h:505
Instrumentation metadata for a table share.
Definition: pfs_instr_class.h:513
PFS_table_share_key m_key
Search key.
Definition: pfs_instr_class.h:555
std::atomic< PFS_table_share_lock * > m_race_lock_stat
Table locks statistics.
Definition: pfs_instr_class.h:575
uint32 get_version()
Definition: pfs_instr_class.h:515
enum_object_type get_object_type() const
Definition: pfs_instr_class.h:517
bool m_timed
True if table instrumentation is timed.
Definition: pfs_instr_class.h:552
bool m_enabled
True if table instrumentation is enabled.
Definition: pfs_instr_class.h:547
void inc_refcount()
Definition: pfs_instr_class.h:535
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:560
void aggregate()
Definition: pfs_instr_class.h:526
int get_refcount()
Definition: pfs_instr_class.h:533
void init_refcount()
Definition: pfs_instr_class.h:531
std::atomic< int > m_refcount
Number of opened table handles.
Definition: pfs_instr_class.h:573
uint m_key_count
Number of indexes.
Definition: pfs_instr_class.h:558
void dec_refcount()
Definition: pfs_instr_class.h:537
pfs_lock m_lock
Internal lock.
Definition: pfs_instr_class.h:542
Instrumentation metadata of a thread.
Definition: pfs_instr_class.h:394
PFS_thread * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:396
std::atomic< unsigned int > m_seqnum
Thread instance sequence number counter.
Definition: pfs_instr_class.h:402
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
Condition information.
Definition: psi_cond_bits.h:88
File instrument information.
Definition: psi_file_bits.h:114
Defines a logger from the side of instrumented code (log API client).
Definition: server_telemetry_logs_client_bits.h:57
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:704
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:154
Definition: result.h:30