MySQL 8.2.0
Source Code Documentation
pfs_instr_class.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 2023, 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 also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef PFS_INSTR_CLASS_H
24#define PFS_INSTR_CLASS_H
25
26#include "my_config.h"
27
28#include <assert.h>
29#include <sys/types.h>
30#include <atomic>
31
32#include "lf.h"
33#include "my_compiler.h"
34
35#include "my_inttypes.h"
37#include "mysql_com.h" /* NAME_LEN */
38#include "mysqld_error.h"
39#include "prealloced_array.h"
46
47struct TABLE_SHARE;
48
49/**
50 @file storage/perfschema/pfs_instr_class.h
51 Performance schema instruments metadata (declarations).
52*/
53
54/**
55 Maximum length of an instrument name.
56 For example, 'wait/sync/mutex/sql/LOCK_open' is an instrument name.
57*/
58#define PFS_MAX_INFO_NAME_LENGTH 128
59
60/**
61 Maximum length of the thread os name.
62 Must include a terminating NUL character.
63 Length is 16 because of linux pthread_setname_np(3)
64 @see my_thread_self_setname()
65*/
66#define PFS_MAX_OS_NAME_LENGTH 16
67
68/**
69 Maximum length of the 'full' prefix of an instrument name.
70 For example, for the instrument name 'wait/sync/mutex/sql/LOCK_open',
71 the full prefix is 'wait/sync/mutex/sql/', which in turn derives from
72 a prefix 'wait/sync/mutex' for mutexes, and a category of 'sql' for mutexes
73 of the sql layer in the server.
74*/
75#define PFS_MAX_FULL_PREFIX_NAME_LENGTH 32
76
77struct PFS_global_param;
78struct PFS_table_share;
79class PFS_opaque_container_page;
80
81/**
82 @addtogroup performance_schema_buffers
83 @{
84*/
85
86extern bool pfs_enabled;
87
88/** Global ref count for plugin and component events. */
89extern std::atomic<uint32> pfs_unload_plugin_ref_count;
90
91/** Key, naming a synch instrument (mutex, rwlock, cond). */
92typedef unsigned int PFS_sync_key;
93/** Key, naming a thread instrument. */
94typedef unsigned int PFS_thread_key;
95/** Key, naming a file instrument. */
96typedef unsigned int PFS_file_key;
97/** Key, naming a stage instrument. */
98typedef unsigned int PFS_stage_key;
99/** Key, naming a statement instrument. */
100typedef unsigned int PFS_statement_key;
101/** Key, naming a transaction instrument. */
102typedef unsigned int PFS_transaction_key;
103/** Key, naming a socket instrument. */
104typedef unsigned int PFS_socket_key;
105/** Key, naming a memory instrument. */
106typedef unsigned int PFS_memory_key;
107/** Key, naming a meter instrument. */
108typedef unsigned int PFS_meter_key;
109/** Key, naming a metric instrument. */
110typedef unsigned int PFS_metric_key;
111
135
136/** User-defined instrument configuration. */
138 /* Instrument name. */
139 char *m_name;
140 /* Name length. */
142 /** Enabled flag. */
144 /** Timed flag. */
146};
147
150
151struct PFS_thread;
152
153extern uint mutex_class_start;
154extern uint rwlock_class_start;
155extern uint cond_class_start;
156extern uint file_class_start;
157extern uint socket_class_start;
158extern uint wait_class_max;
159
160/**
161 Encapsulates the name of an instrumented entity.
162*/
164 public:
165 static constexpr uint max_length = PFS_MAX_INFO_NAME_LENGTH - 1;
166 /*
167 DO NOT ACCESS THE DATA MEMBERS DIRECTLY. USE THE GETTERS AND
168 SETTERS INSTEAD.
169
170 The data members should really have been private, but having both
171 private and public members would make the class a non-POD. We
172 need to call memset on PFS_instr_class (in init_instr_class), and
173 the behavior of memset is undefined on non-POD objects. Therefore
174 we keep the data members public, with an underscore prefix, and
175 this warning text.
176 */
177 public /*private*/:
178 /** Instrument name. */
179 char m_private_name[max_length + 1];
180 /** Length in bytes of @c m_name. */
182 /** Old instrument name, if any. */
184 /** Length in bytes of old instrument name len, if any. */
186 /** The oldest version that uses the new name. */
188
189 public:
190 /** Return the name as a string. */
191 const char *str() const;
192 /** Return the length of the string. */
193 uint length() const;
194 /**
195 Copy the specified name to this name.
196
197 @param class_type The class type of this name, i.e., whether it is
198 the name of a mutex, thread, etc.
199
200 @param name The buffer to read from.
201
202 @param max_length_arg If is given, at most that many chars are
203 copied, plus the terminating '\0'. Otherwise, up to buffer_size-1
204 characters are copied, plus the terminating '\0'.
205 */
206 void set(PFS_class_type class_type, const char *name,
207 uint max_length_arg = max_length);
208};
209
210/** Information for all instrumentation. */
212 /** Class type */
214 /** True if this instrument is enabled. */
216 /** True if this instrument is timed. */
218 /** Instrument flags. */
220 /** Instrument enforced flags. */
222 /** Volatility index. */
224 /**
225 Instrument name index.
226 Self index in:
227 - EVENTS_WAITS_SUMMARY_*_BY_EVENT_NAME for waits
228 - EVENTS_STAGES_SUMMARY_*_BY_EVENT_NAME for stages
229 - EVENTS_STATEMENTS_SUMMARY_*_BY_EVENT_NAME for statements
230 - EVENTS_TRANSACTIONS_SUMMARY_*_BY_EVENT_NAME for transactions
231 */
233 /** Instrument name. */
235 /** Documentation. */
237
238 bool is_singleton() const { return m_flags & PSI_FLAG_SINGLETON; }
239
240 bool is_mutable() const { return m_flags & PSI_FLAG_MUTABLE; }
241
242 bool is_progress() const { return m_flags & PSI_FLAG_STAGE_PROGRESS; }
243
245
246 bool is_priority() const { return m_flags & PSI_FLAG_RWLOCK_PR; }
247
248 bool is_transferable() const { return m_flags & PSI_FLAG_TRANSFER; }
249
250 bool is_user() const { return m_flags & PSI_FLAG_USER; }
251
253
254 bool is_global() const { return m_flags & PSI_FLAG_ONLY_GLOBAL_STAT; }
255
256 bool has_seqnum() const {
258 }
259
261
263
266 }
267
269
270 void enforce_valid_flags(uint allowed_flags) {
271 /* Reserved for future use. */
272 allowed_flags |= PSI_FLAG_THREAD | PSI_FLAG_TRANSFER;
273
274 const uint valid_flags = m_flags & allowed_flags;
275 /*
276 This fails when the instrumented code is providing
277 flags that are not supported for this instrument.
278 To fix it, clean up the instrumented code.
279 */
280 assert(valid_flags == m_flags);
281 m_flags = valid_flags;
282 }
283
285 static void set_timed(PFS_instr_class *pfs, bool timed);
286
287 bool is_deferred() const {
288 switch (m_type) {
289 case PFS_CLASS_SOCKET:
290 return true;
291 break;
292 default:
293 return false;
294 break;
295 };
296 }
297
298 bool can_be_timed() const {
299 switch (m_type) {
300 case PFS_CLASS_MEMORY:
301 case PFS_CLASS_ERROR:
302 case PFS_CLASS_THREAD:
303 return false;
304 default:
305 return true;
306 };
307 }
308
309 bool can_be_enforced() const {
310 switch (m_type) {
311 case PFS_CLASS_MEMORY:
312 return true;
313 default:
314 return false;
315 };
316 }
317};
318
319struct PFS_mutex;
320
321#define PFS_MUTEX_PARTITIONS 2
322
323/** Instrumentation metadata for a mutex. */
325 /** Mutex usage statistics. */
327 /** Singleton instance. */
329};
330
331struct PFS_rwlock;
332
333/** Instrumentation metadata for a read write lock. */
335 /** Rwlock usage statistics. */
337 /** Singleton instance. */
339};
340
341struct PFS_cond;
342
343/** Instrumentation metadata for a condition. */
345 /**
346 Condition usage statistics.
347 This statistic is not exposed in user visible tables yet.
348 */
350 /** Singleton instance. */
352};
353
354/** Instrumentation metadata of a thread. */
356 /** Singleton instance. */
358 /** Thread history instrumentation flag. */
359 bool m_history{false};
360 /** Thread os name. */
361 char m_os_name[PFS_MAX_OS_NAME_LENGTH];
362 /** Thread instance sequence number counter. */
363 std::atomic<unsigned int> m_seqnum;
364};
365
366/** Instrumentation metadata for a metric. */
369
370 /** Metric name with length. */
371 const char *m_metric;
373 /** Metric group with length. */
374 const char *m_group;
376 /** Metric unit with length. */
377 const char *m_unit;
379 /** Metric description with length. */
380 const char *m_description;
387};
388
389/** Instrumentation metadata for a meter. */
392
393 /** Meter name with length. */
394 const char *m_meter;
396 /** Meter export frequency in seconds. */
398 /** Meter description with length. */
399 const char *m_description;
402
403 /** Metrics belonging to this meter. */
406};
407
408/** Key identifying a table share. */
410 /** Object type. */
412
413 /** Table schema. */
415
416 /** Table name. */
418};
419
420/** Table index or 'key' */
422 /** Index name */
424 /** Length in bytes of @c m_name. */
426};
427
428/** Index statistics of a table.*/
431 /** The index name */
433 /** The index stat */
435 /** Owner table share. To be used later. */
437 /** Container page. */
438 PFS_opaque_container_page *m_page;
439};
440
441/** Lock statistics of a table.*/
444 /** Lock stats. */
446 /** Owner table share. To be used later. */
448 /** Container page. */
449 PFS_opaque_container_page *m_page;
450};
451
452/** Instrumentation metadata for a table share. */
454 public:
455 uint32 get_version() { return m_lock.get_version(); }
456
457 enum_object_type get_object_type() const { return m_key.m_type; }
458
459 void aggregate_io();
460 void aggregate_lock();
461
462 void sum_io(PFS_single_stat *result, uint key_count);
463 void sum_lock(PFS_single_stat *result);
464 void sum(PFS_single_stat *result, uint key_count);
465
466 inline void aggregate() {
467 aggregate_io();
468 aggregate_lock();
469 }
470
471 inline void init_refcount() { m_refcount.store(1); }
472
473 inline int get_refcount() { return m_refcount.load(); }
474
475 inline void inc_refcount() { ++m_refcount; }
476
477 inline void dec_refcount() { --m_refcount; }
478
479 void refresh_setup_object_flags(PFS_thread *thread);
480
481 /** Internal lock. */
483 /**
484 True if table instrumentation is enabled.
485 This flag is computed from the content of table setup_objects.
486 */
488 /**
489 True if table instrumentation is timed.
490 This flag is computed from the content of table setup_objects.
491 */
493
494 /** Search key. */
496
497 /** Number of indexes. */
499 /** Container page. */
500 PFS_opaque_container_page *m_page;
501
502 PFS_table_share_lock *find_lock_stat() const;
503 PFS_table_share_lock *find_or_create_lock_stat();
504 void destroy_lock_stat();
505
506 PFS_table_share_index *find_index_stat(uint index) const;
507 PFS_table_share_index *find_or_create_index_stat(
508 const TABLE_SHARE *server_share, uint index);
509 void destroy_index_stats();
510
511 private:
512 /** Number of opened table handles. */
513 std::atomic<int> m_refcount;
514 /** Table locks statistics. */
515 std::atomic<PFS_table_share_lock *> m_race_lock_stat;
516 /** Table indexes stats. */
517 std::atomic<PFS_table_share_index *> m_race_index_stat[MAX_INDEXES + 1];
518};
519
520/** Statistics for the IDLE instrument. */
522/** Statistics for dropped table I/O. */
524/** Statistics for dropped table lock. */
526/** Statistics for the METADATA instrument. */
528/** Statistics for the transaction instrument. */
530/** Statistics for the error instrument. */
532
533inline uint sanitize_index_count(uint count) {
534 if (likely(count <= MAX_INDEXES)) {
535 return count;
536 }
537 return 0;
538}
539
540#define GLOBAL_TABLE_IO_EVENT_INDEX 0
541#define GLOBAL_TABLE_LOCK_EVENT_INDEX 1
542#define GLOBAL_IDLE_EVENT_INDEX 2
543#define GLOBAL_METADATA_EVENT_INDEX 3
544/** Number of global wait events. */
545#define COUNT_GLOBAL_EVENT_INDEX 4
546
547/** Transaction events are not wait events .*/
548#define GLOBAL_TRANSACTION_INDEX 0
549
550#define GLOBAL_ERROR_INDEX 0
551
552/**
553 Instrument controlling all table I/O.
554 This instrument is used with table SETUP_OBJECTS.
555*/
557
558/**
559 Instrument controlling all table lock.
560 This instrument is used with table SETUP_OBJECTS.
561*/
563
564/**
565 Instrument controlling all idle waits.
566*/
568
569/**
570 Instrument controlling all metadata locks.
571*/
573
574/** Instrumentation metadata for an error. */
576/**
577 Instrument controlling all server errors.
578*/
580
581struct PFS_file;
582
583/** Instrumentation metadata for a file. */
585 /** File usage statistics. */
587 /** Singleton instance. */
589};
590
591/** Instrumentation metadata for a stage. */
593 /**
594 Length of the @c "stage/<component>/" prefix.
595 This is to extract @c "foo" from @c "stage/sql/foo".
596 */
598 /** Stage usage statistics. */
600};
601
602/** Instrumentation metadata for a statement. */
604
605/** Instrumentation metadata for a transaction. */
607
609
610struct PFS_socket;
611
612/** Instrumentation metadata for a socket. */
614 /** Socket usage statistics. */
616 /** Singleton instance. */
618};
619
620/** Instrumentation metadata for a memory. */
622
624
626
627int init_sync_class(uint mutex_class_sizing, uint rwlock_class_sizing,
628 uint cond_class_sizing);
629
630void cleanup_sync_class();
631int init_thread_class(uint thread_class_sizing);
633int init_table_share(uint table_share_sizing);
635
636int init_table_share_lock_stat(uint table_stat_sizing);
640
641int init_table_share_index_stat(uint index_stat_sizing);
644 uint index);
646
649int init_file_class(uint file_class_sizing);
650void cleanup_file_class();
651int init_stage_class(uint stage_class_sizing);
653int init_statement_class(uint statement_class_sizing);
655int init_socket_class(uint socket_class_sizing);
657int init_memory_class(uint memory_class_sizing);
659int init_metric_class(uint metric_class_sizing);
661int init_meter_class(uint meter_class_sizing);
663
664PFS_sync_key register_mutex_class(const char *name, uint name_length,
666
667PFS_sync_key register_rwlock_class(const char *name, uint name_length,
669
670PFS_sync_key register_cond_class(const char *name, uint name_length,
672
673PFS_thread_key register_thread_class(const char *name, uint name_length,
675
676PFS_file_key register_file_class(const char *name, uint name_length,
678
679PFS_stage_key register_stage_class(const char *name, uint prefix_length,
680 uint name_length, PSI_stage_info *info);
681
682PFS_statement_key register_statement_class(const char *name, uint name_length,
684
685PFS_socket_key register_socket_class(const char *name, uint name_length,
687
688PFS_memory_key register_memory_class(const char *name, uint name_length,
690
691PFS_meter_key register_meter_class(const char *name, uint name_length,
695PFS_metric_key register_metric_class(const char *name, uint name_length,
697 const char *meter);
700
729 PFS_transaction_class *unsafe);
734
736 const TABLE_SHARE *share);
738void drop_table_share(PFS_thread *thread, bool temporary,
739 const char *schema_name, uint schema_name_length,
740 const char *table_name, uint table_name_length);
741
743
744extern ulong mutex_class_max;
745extern ulong mutex_class_lost;
746extern ulong rwlock_class_max;
747extern ulong rwlock_class_lost;
748extern ulong cond_class_max;
749extern ulong cond_class_lost;
750extern ulong thread_class_max;
751extern ulong thread_class_lost;
752extern ulong file_class_max;
753extern ulong file_class_lost;
754extern ulong stage_class_max;
755extern ulong stage_class_lost;
756extern ulong statement_class_max;
757extern ulong statement_class_lost;
758extern ulong transaction_class_max;
759extern ulong socket_class_max;
760extern ulong socket_class_lost;
761extern ulong memory_class_max;
762extern ulong memory_class_lost;
763extern ulong meter_class_max;
764extern ulong meter_class_lost;
765extern ulong metric_class_max;
766extern ulong metric_class_lost;
767extern ulong error_class_max;
768
769/* Exposing the data directly, for iterators. */
770
777
781
782/** Update derived flags for all table shares. */
784
785/** Update derived flags for all stored procedure shares. */
787
789
790/**
791 Get current time for GTID monitoring.
792
793 @return Time in microseconds when PFS monitoring is enabled.
794 @return 0 when PFS monitoring is disabled.
795*/
797
798/** @} */
799#endif
Encapsulates the name of an instrumented entity.
Definition: pfs_instr_class.h:163
const char * m_private_old_name
Old instrument name, if any.
Definition: pfs_instr_class.h:183
terminology_use_previous::enum_compatibility_version m_private_version
The oldest version that uses the new name.
Definition: pfs_instr_class.h:187
uint m_private_old_name_length
Length in bytes of old instrument name len, if any.
Definition: pfs_instr_class.h:185
static constexpr uint max_length
Definition: pfs_instr_class.h:165
uint m_private_name_length
Length in bytes of m_name.
Definition: pfs_instr_class.h:181
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:70
#define PSI_FLAG_SINGLETON
Singleton flag.
Definition: component_common.h:34
void release_table_share(TABLE_SHARE *share)
Mark that we are not using table share anymore.
Definition: sql_base.cc:1003
PFS_instr_class global_metadata_class
Instrument controlling all metadata locks.
Definition: pfs_instr_class.cc:191
LF_HASH table_share_hash
Hash index for instrumented table shares.
Definition: pfs_instr_class.cc:206
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:1339
PFS_thread_class * sanitize_thread_class(PFS_thread_class *unsafe)
Definition: pfs_instr_class.cc:1577
uint socket_class_start
Definition: pfs_instr_class.cc:240
PFS_socket_class * sanitize_socket_class(PFS_socket_class *unsafe)
Definition: pfs_instr_class.cc:1810
unsigned int PFS_transaction_key
Key, naming a transaction instrument.
Definition: pfs_instr_class.h:102
PFS_rwlock_class * find_rwlock_class(PFS_sync_key key)
Find a rwlock instrumentation class by key.
Definition: pfs_instr_class.cc:1453
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:1877
ulong error_class_max
Number of error classes.
Definition: pfs_instr_class.cc:163
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:1766
ulong stage_class_max
Size of the stage class array.
Definition: pfs_instr_class.cc:127
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:1632
unsigned int PFS_file_key
Key, naming a file instrument.
Definition: pfs_instr_class.h:96
void cleanup_memory_class()
Cleanup the memory class buffers.
Definition: pfs_instr_class.cc:1127
unsigned int PFS_sync_key
Key, naming a synch instrument (mutex, rwlock, cond).
Definition: pfs_instr_class.h:92
PFS_rwlock_class * rwlock_class_array
Definition: pfs_instr_class.cc:166
PFS_metric_class * metric_class_array
Definition: pfs_instr_class.cc:169
PFS_meter_class * sanitize_meter_class(PFS_meter_class *unsafe)
Definition: pfs_instr_class.cc:1484
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:493
void cleanup_table_share_index_stat()
Cleanup the table stat buffers.
Definition: pfs_instr_class.cc:929
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:189
uint mutex_class_start
Definition: pfs_instr_class.cc:235
PFS_instr_class global_idle_class
Instrument controlling all idle waits.
Definition: pfs_instr_class.cc:190
ulong thread_class_max
Size of the thread class array.
Definition: pfs_instr_class.cc:119
PFS_meter_class * find_meter_class(PSI_meter_key key)
Find a meter instrumentation class by key.
Definition: pfs_instr_class.cc:1480
ulong socket_class_lost
Number of socket class lost.
Definition: pfs_instr_class.cc:137
void cleanup_table_share_lock_stat()
Cleanup the table stat buffers.
Definition: pfs_instr_class.cc:871
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:143
PFS_instr_class * find_metadata_class(uint index)
Definition: pfs_instr_class.cc:2126
uint sanitize_index_count(uint count)
Definition: pfs_instr_class.h:533
unsigned int PFS_meter_key
Key, naming a meter instrument.
Definition: pfs_instr_class.h:108
ulong socket_class_max
Size of the socket class array.
Definition: pfs_instr_class.cc:135
unsigned int PFS_socket_key
Key, naming a socket instrument.
Definition: pfs_instr_class.h:104
ulong rwlock_class_lost
Number of rwlock class lost.
Definition: pfs_instr_class.cc:113
void unregister_meter_class(PSI_meter_info_v1 *info)
Definition: pfs_instr_class.cc:1962
int init_table_share_lock_stat(uint table_stat_sizing)
Initialize the table lock stat buffer.
Definition: pfs_instr_class.cc:835
PFS_stage_class * sanitize_stage_class(PFS_stage_class *unsafe)
Definition: pfs_instr_class.cc:1740
PFS_cond_class * find_cond_class(PFS_sync_key key)
Find a condition instrumentation class by key.
Definition: pfs_instr_class.cc:1467
Prealloced_array< PFS_instr_config *, 10 > Pfs_instr_config_array
Definition: pfs_instr_class.h:148
int init_file_class(uint file_class_sizing)
Initialize the file class buffer.
Definition: pfs_instr_class.cc:938
uint length() const
Return the length of the string.
Definition: pfs_instr_class.cc:250
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:1589
Pfs_instr_config_array * pfs_instr_config_array
PFS_INSTRUMENT option settings array.
Definition: pfs_instr_class.cc:80
uint32 metric_class_count()
Definition: pfs_instr_class.cc:2092
ulong memory_class_lost
Number of memory class lost.
Definition: pfs_instr_class.cc:141
ulong statement_class_lost
Number of statement class lost.
Definition: pfs_instr_class.cc:133
PFS_stage_class * find_stage_class(PFS_stage_key key)
Find a stage instrumentation class by key.
Definition: pfs_instr_class.cc:1736
uint cond_class_start
Definition: pfs_instr_class.cc:237
PFS_statement_class * find_statement_class(PFS_stage_key key)
Find a statement instrumentation class by key.
Definition: pfs_instr_class.cc:1750
ulong cond_class_max
Size of the condition class array.
Definition: pfs_instr_class.cc:115
ulong mutex_class_lost
Number of mutex class lost.
Definition: pfs_instr_class.cc:109
PFS_statement_class * sanitize_statement_class(PFS_statement_class *unsafe)
Definition: pfs_instr_class.cc:1754
unsigned int PFS_memory_key
Key, naming a memory instrument.
Definition: pfs_instr_class.h:106
PFS_table_lock_stat global_table_lock_stat
Statistics for dropped table lock.
Definition: pfs_instr_class.cc:184
void register_global_classes()
Definition: pfs_instr_class.cc:303
ulong memory_class_max
Size of the memory class array.
Definition: pfs_instr_class.cc:139
void cleanup_metric_class()
Cleanup the metric class buffers.
Definition: pfs_instr_class.cc:575
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:239
PFS_metric_class * sanitize_metric_class(PFS_metric_class *unsafe)
Definition: pfs_instr_class.cc:1498
PFS_table_share_lock * create_table_share_lock_stat()
Create a table share lock instrumentation.
Definition: pfs_instr_class.cc:847
PFS_transaction_class * find_transaction_class(uint index)
Definition: pfs_instr_class.cc:2154
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:1683
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:2074
ulong stage_class_lost
Number of stage class lost.
Definition: pfs_instr_class.cc:129
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:1990
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:1510
void cleanup_stage_class()
Cleanup the stage class buffers.
Definition: pfs_instr_class.cc:1001
PFS_cond_class * sanitize_cond_class(PFS_cond_class *unsafe)
Definition: pfs_instr_class.cc:1471
PFS_instr_class * sanitize_idle_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2119
void cleanup_meter_class()
Cleanup the meter class buffers.
Definition: pfs_instr_class.cc:528
PFS_error_stat global_error_stat
Statistics for the error instrument.
Definition: pfs_instr_class.cc:187
PFS_thread_class * find_thread_class(PFS_sync_key key)
Find a thread instrumentation class by key.
Definition: pfs_instr_class.cc:1573
PFS_table_io_stat global_table_io_stat
Statistics for dropped table I/O.
Definition: pfs_instr_class.cc:183
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:1387
PFS_instr_class * sanitize_metadata_class(PFS_instr_class *unsafe)
Definition: pfs_instr_class.cc:2133
PFS_mutex_class * sanitize_mutex_class(PFS_mutex_class *unsafe)
Definition: pfs_instr_class.cc:1443
PFS_error_class global_error_class
Instrument controlling all server errors.
Definition: pfs_instr_class.cc:192
uint file_class_start
Definition: pfs_instr_class.cc:238
PFS_transaction_stat global_transaction_stat
Statistics for the transaction instrument.
Definition: pfs_instr_class.cc:186
PFS_cond_class * cond_class_array
Definition: pfs_instr_class.cc:167
PFS_rwlock_class * sanitize_rwlock_class(PFS_rwlock_class *unsafe)
Definition: pfs_instr_class.cc:1457
ulong file_class_lost
Number of file class lost.
Definition: pfs_instr_class.cc:125
PFS_error_class * sanitize_error_class(PFS_instr_class *unsafe)
ulong metric_class_lost
Number of metric class lost.
Definition: pfs_instr_class.cc:149
int init_stage_class(uint stage_class_sizing)
Initialize the stage class buffer.
Definition: pfs_instr_class.cc:980
PFS_instr_class * find_idle_class(uint index)
Definition: pfs_instr_class.cc:2112
int init_thread_class(uint thread_class_sizing)
Initialize the thread class buffer.
Definition: pfs_instr_class.cc:450
PFS_metric_class * find_metric_class(PSI_metric_key key)
Find a metric instrumentation class by key.
Definition: pfs_instr_class.cc:1494
void init_event_name_sizing(const PFS_global_param *param)
Definition: pfs_instr_class.cc:293
int init_socket_class(uint socket_class_sizing)
Initialize the socket class buffer.
Definition: pfs_instr_class.cc:1064
PFS_socket_class * find_socket_class(PFS_socket_key key)
Find a socket instrumentation class by key.
Definition: pfs_instr_class.cc:1806
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:1980
PFS_error_class * find_error_class(uint index)
Definition: pfs_instr_class.cc:2140
PFS_file_class * sanitize_file_class(PFS_file_class *unsafe)
Definition: pfs_instr_class.cc:1727
unsigned int PFS_stage_key
Key, naming a stage instrument.
Definition: pfs_instr_class.h:98
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:472
int init_statement_class(uint statement_class_sizing)
Initialize the statement class buffer.
Definition: pfs_instr_class.cc:1022
ulong file_class_max
Size of the file class array.
Definition: pfs_instr_class.cc:123
ulong thread_class_lost
Number of thread class lost.
Definition: pfs_instr_class.cc:121
ulong metric_class_max
Size of the metric class array.
Definition: pfs_instr_class.cc:147
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:1822
PFS_transaction_class global_transaction_class
Definition: pfs_instr_class.cc:193
unsigned int PFS_statement_key
Key, naming a statement instrument.
Definition: pfs_instr_class.h:100
unsigned int PFS_metric_key
Key, naming a metric instrument.
Definition: pfs_instr_class.h:110
PFS_single_stat global_idle_stat
Statistics for the IDLE instrument.
Definition: pfs_instr_class.cc:182
unsigned int PFS_thread_key
Key, naming a thread instrument.
Definition: pfs_instr_class.h:94
int init_table_share_index_stat(uint index_stat_sizing)
Initialize table index stat buffer.
Definition: pfs_instr_class.cc:880
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:1242
PFS_memory_class * sanitize_memory_class(PFS_memory_class *unsafe)
Definition: pfs_instr_class.cc:1865
void cleanup_file_class()
Cleanup the file class buffers.
Definition: pfs_instr_class.cc:959
bool pfs_enabled
Global performance schema flag.
Definition: pfs_instr_class.cc:68
uint rwlock_class_start
Definition: pfs_instr_class.cc:236
PFS_class_type
Definition: pfs_instr_class.h:112
ulong mutex_class_max
Size of the mutex class array.
Definition: pfs_instr_class.cc:107
int init_meter_class(uint meter_class_sizing)
Initialize the meter class buffer.
Definition: pfs_instr_class.cc:506
PFS_single_stat global_metadata_stat
Statistics for the METADATA instrument.
Definition: pfs_instr_class.cc:185
ulong statement_class_max
Size of the statement class array.
Definition: pfs_instr_class.cc:131
void cleanup_table_share_hash()
Cleanup the table share hash table.
Definition: pfs_instr_class.cc:673
ulong meter_class_lost
Number of meter class lost.
Definition: pfs_instr_class.cc:145
const char * str() const
Return the name as a string.
Definition: pfs_instr_class.cc:242
PFS_instr_class global_table_io_class
Instrument controlling all table I/O.
Definition: pfs_instr_class.cc:188
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:2104
int init_table_share_hash(const PFS_global_param *param)
Initialize the table share hash table.
Definition: pfs_instr_class.cc:662
void cleanup_table_share()
Cleanup the table share buffers.
Definition: pfs_instr_class.cc:592
ulong rwlock_class_max
Size of the rwlock class array.
Definition: pfs_instr_class.cc:111
int init_metric_class(uint metric_class_sizing)
Initialize the metric class buffer.
Definition: pfs_instr_class.cc:553
void cleanup_socket_class()
Cleanup the socket class buffers.
Definition: pfs_instr_class.cc:1085
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:275
ulong cond_class_lost
Number of condition class lost.
Definition: pfs_instr_class.cc:117
PFS_memory_class * find_memory_class(PFS_memory_key key)
Find a memory instrumentation class by key.
Definition: pfs_instr_class.cc:1861
PFS_transaction_class * sanitize_transaction_class(PFS_transaction_class *unsafe)
Definition: pfs_instr_class.cc:2161
ulong transaction_class_max
Number of transaction classes.
Definition: pfs_instr_class.cc:156
void cleanup_sync_class()
Cleanup the instrument synch class buffers.
Definition: pfs_instr_class.cc:407
int init_memory_class(uint memory_class_sizing)
Initialize the memory class buffer.
Definition: pfs_instr_class.cc:1106
void release_table_share_lock_stat(PFS_table_share_lock *pfs)
Release a table share lock instrumentation.
Definition: pfs_instr_class.cc:865
PFS_meter_class * meter_class_array
Definition: pfs_instr_class.cc:168
void cleanup_statement_class()
Cleanup the statement class buffers.
Definition: pfs_instr_class.cc:1043
void release_table_share_index_stat(PFS_table_share_index *pfs)
Release a table share index instrumentation.
Definition: pfs_instr_class.cc:923
PFS_mutex_class * mutex_class_array
Definition: pfs_instr_class.cc:165
PFS_instr_class * find_table_class(uint index)
Definition: pfs_instr_class.cc:2094
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:892
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:359
PFS_mutex_class * find_mutex_class(PFS_sync_key key)
Find a mutex instrumentation class by key.
Definition: pfs_instr_class.cc:1439
PFS_file_class * file_class_array
Definition: pfs_instr_class.cc:213
PFS_file_class * find_file_class(PFS_file_key key)
Find a file instrumentation class by key.
Definition: pfs_instr_class.cc:1723
@ PFS_CLASS_MAX
Definition: pfs_instr_class.h:133
@ PFS_CLASS_IDLE
Definition: pfs_instr_class.h:125
@ PFS_CLASS_LAST
Definition: pfs_instr_class.h:132
@ PFS_CLASS_MUTEX
Definition: pfs_instr_class.h:114
@ PFS_CLASS_STAGE
Definition: pfs_instr_class.h:119
@ PFS_CLASS_METER
Definition: pfs_instr_class.h:131
@ PFS_CLASS_NONE
Definition: pfs_instr_class.h:113
@ PFS_CLASS_TABLE
Definition: pfs_instr_class.h:118
@ PFS_CLASS_TABLE_LOCK
Definition: pfs_instr_class.h:124
@ PFS_CLASS_FILE
Definition: pfs_instr_class.h:117
@ PFS_CLASS_TABLE_IO
Definition: pfs_instr_class.h:123
@ PFS_CLASS_METADATA
Definition: pfs_instr_class.h:127
@ PFS_CLASS_RWLOCK
Definition: pfs_instr_class.h:115
@ PFS_CLASS_COND
Definition: pfs_instr_class.h:116
@ PFS_CLASS_MEMORY
Definition: pfs_instr_class.h:126
@ PFS_CLASS_THREAD
Definition: pfs_instr_class.h:129
@ PFS_CLASS_ERROR
Definition: pfs_instr_class.h:128
@ PFS_CLASS_STATEMENT
Definition: pfs_instr_class.h:120
@ PFS_CLASS_SOCKET
Definition: pfs_instr_class.h:122
@ PFS_CLASS_TRANSACTION
Definition: pfs_instr_class.h:121
@ PFS_CLASS_METRIC
Definition: pfs_instr_class.h:130
unsigned int PSI_cond_key
Instrumented cond key.
Definition: psi_cond_bits.h:43
unsigned int PSI_file_key
Instrumented file key.
Definition: psi_file_bits.h:47
unsigned int PSI_memory_key
Instrumented memory key.
Definition: psi_memory_bits.h:48
unsigned int PSI_mutex_key
Instrumented mutex key.
Definition: psi_mutex_bits.h:51
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:43
unsigned int PSI_socket_key
Instrumented socket key.
Definition: psi_socket_bits.h:48
unsigned int PSI_stage_key
Instrumented stage key.
Definition: psi_stage_bits.h:42
unsigned int PSI_statement_key
Instrumented statement key.
Definition: psi_statement_bits.h:48
unsigned int PSI_thread_key
Instrumented thread key.
Definition: psi_thread_bits.h:49
#define PSI_FLAG_USER
User flag.
Definition: psi_bits.h:102
#define PSI_FLAG_TRANSFER
Transferable flag.
Definition: psi_bits.h:94
#define PSI_FLAG_MUTABLE
Mutable flag.
Definition: psi_bits.h:67
#define PSI_FLAG_STAGE_PROGRESS
Stage progress flag.
Definition: psi_bits.h:81
#define PSI_FLAG_RWLOCK_SX
Shared Exclusive flag.
Definition: psi_bits.h:87
#define PSI_FLAG_NO_SEQNUM
No sequence number flag.
Definition: psi_bits.h:135
#define PSI_FLAG_THREAD
Per Thread flag.
Definition: psi_bits.h:74
#define PSI_FLAG_AUTO_SEQNUM
Automatic sequence number flag.
Definition: psi_bits.h:129
#define PSI_FLAG_MEM_COLLECT
Enable collecting the memory consumed by threads.
Definition: psi_bits.h:140
#define PSI_FLAG_THREAD_SYSTEM
System thread flag.
Definition: psi_bits.h:123
#define PSI_FLAG_RWLOCK_PR
Priority lock flag.
Definition: psi_bits.h:117
#define PSI_FLAG_ONLY_GLOBAL_STAT
Global stat only flag.
Definition: psi_bits.h:111
static int flags[50]
Definition: hp_test1.cc:39
#define MAX_INDEXES
Definition: config.h:209
Header for compiler-dependent features.
constexpr bool likely(bool expr)
Definition: my_compiler.h:56
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
uint32_t uint32
Definition: my_inttypes.h:66
static int count
Definition: myisam_ftdump.cc:44
Common definition between mysql server & client.
#define NAME_LEN
Definition: mysql_com.h:66
Log info(cout, "NOTE")
const char * table_name
Definition: rules_table_service.cc:55
enum_compatibility_version
Enumeration holding the possible values for @terminology_use_previous.
Definition: terminology_use_previous_enum.h:47
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:221
Miscellaneous global dependencies (declarations).
#define PFS_ALIGNED
Definition: pfs_global.h:56
#define PFS_MAX_OS_NAME_LENGTH
Maximum length of the thread os name.
Definition: pfs_instr_class.h:66
#define PFS_MAX_INFO_NAME_LENGTH
Maximum length of an instrument name.
Definition: pfs_instr_class.h:58
Performance schema internal locks (declarations).
Object names (declarations).
Statistics (declarations).
MetricOTELType
Definition: psi_metric_bits.h:31
unsigned int PSI_meter_key
Definition: psi_metric_bits.h:100
MetricNumType
Definition: psi_metric_bits.h:37
unsigned int PSI_metric_key
Definition: psi_metric_bits.h:101
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:96
required string key
Definition: replication_asynchronous_connection_failover.proto:59
required bool enabled
Definition: replication_group_member_actions.proto:32
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:65
case opt name
Definition: sslopt-case.h:32
Definition: lf.h:186
Instrumentation metadata for a condition.
Definition: pfs_instr_class.h:344
PFS_cond_stat m_cond_stat
Condition usage statistics.
Definition: pfs_instr_class.h:349
PFS_cond * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:351
Statistics for conditions usage.
Definition: pfs_stat.h:237
Instrumented condition implementation.
Definition: pfs_instr.h:161
Instrumentation metadata for an error.
Definition: pfs_instr_class.h:575
Statistics for all server errors.
Definition: pfs_stat.h:556
Instrumentation metadata for a file.
Definition: pfs_instr_class.h:584
PFS_file * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:588
PFS_file_stat m_file_stat
File usage statistics.
Definition: pfs_instr_class.h:586
Statistics for FILE usage.
Definition: pfs_stat.h:307
Instrumented File and FILE implementation.
Definition: pfs_instr.h:178
Performance schema global sizing parameters.
Definition: pfs_server.h:118
Information for all instrumentation.
Definition: pfs_instr_class.h:211
bool is_deferred() const
Definition: pfs_instr_class.h:287
bool m_enabled
True if this instrument is enabled.
Definition: pfs_instr_class.h:215
static void set_enabled(PFS_instr_class *pfs, bool enabled)
uint m_flags
Instrument flags.
Definition: pfs_instr_class.h:219
bool is_singleton() const
Definition: pfs_instr_class.h:238
PFS_class_type m_type
Class type.
Definition: pfs_instr_class.h:213
bool is_priority() const
Definition: pfs_instr_class.h:246
static void set_timed(PFS_instr_class *pfs, bool timed)
void set_enforced_flags(uint flags)
Definition: pfs_instr_class.h:268
bool is_progress() const
Definition: pfs_instr_class.h:242
bool can_be_timed() const
Definition: pfs_instr_class.h:298
bool is_transferable() const
Definition: pfs_instr_class.h:248
bool has_enforced_memory_cnt() const
Definition: pfs_instr_class.h:264
PFS_instr_name m_name
Instrument name.
Definition: pfs_instr_class.h:234
bool has_default_memory_cnt() const
Definition: pfs_instr_class.h:262
uint m_event_name_index
Instrument name index.
Definition: pfs_instr_class.h:232
bool has_auto_seqnum() const
Definition: pfs_instr_class.h:260
bool m_timed
True if this instrument is timed.
Definition: pfs_instr_class.h:217
bool can_be_enforced() const
Definition: pfs_instr_class.h:309
bool is_global() const
Definition: pfs_instr_class.h:254
char * m_documentation
Documentation.
Definition: pfs_instr_class.h:236
bool is_user() const
Definition: pfs_instr_class.h:250
uint m_enforced_flags
Instrument enforced flags.
Definition: pfs_instr_class.h:221
bool is_mutable() const
Definition: pfs_instr_class.h:240
bool is_shared_exclusive() const
Definition: pfs_instr_class.h:244
int m_volatility
Volatility index.
Definition: pfs_instr_class.h:223
void enforce_valid_flags(uint allowed_flags)
Definition: pfs_instr_class.h:270
bool is_system_thread() const
Definition: pfs_instr_class.h:252
bool has_seqnum() const
Definition: pfs_instr_class.h:256
User-defined instrument configuration.
Definition: pfs_instr_class.h:137
uint m_name_length
Definition: pfs_instr_class.h:141
bool m_enabled
Enabled flag.
Definition: pfs_instr_class.h:143
bool m_timed
Timed flag.
Definition: pfs_instr_class.h:145
char * m_name
Definition: pfs_instr_class.h:139
Instrumentation metadata for a memory.
Definition: pfs_instr_class.h:621
Instrumentation metadata for a meter.
Definition: pfs_instr_class.h:390
uint m_description_length
Definition: pfs_instr_class.h:400
uint m_metrics_size
Definition: pfs_instr_class.h:405
uint m_meter_length
Definition: pfs_instr_class.h:395
const char * m_description
Meter description with length.
Definition: pfs_instr_class.h:399
PSI_metric_key * m_metrics
Metrics belonging to this meter.
Definition: pfs_instr_class.h:404
PSI_meter_key m_key
Definition: pfs_instr_class.h:401
pfs_lock m_lock
Definition: pfs_instr_class.h:391
const char * m_meter
Meter name with length.
Definition: pfs_instr_class.h:394
uint m_frequency
Meter export frequency in seconds.
Definition: pfs_instr_class.h:397
Instrumentation metadata for a metric.
Definition: pfs_instr_class.h:367
const char * m_group
Metric group with length.
Definition: pfs_instr_class.h:374
uint m_description_length
Definition: pfs_instr_class.h:381
uint m_group_length
Definition: pfs_instr_class.h:375
MetricNumType m_num_type
Definition: pfs_instr_class.h:382
PSI_metric_key m_key
Definition: pfs_instr_class.h:384
const char * m_description
Metric description with length.
Definition: pfs_instr_class.h:380
uint m_metric_length
Definition: pfs_instr_class.h:372
measurement_callback_t m_measurement_callback
Definition: pfs_instr_class.h:385
MetricOTELType m_metric_type
Definition: pfs_instr_class.h:383
uint m_unit_length
Definition: pfs_instr_class.h:378
pfs_lock m_lock
Definition: pfs_instr_class.h:368
const char * m_unit
Metric unit with length.
Definition: pfs_instr_class.h:377
void * m_measurement_context
Definition: pfs_instr_class.h:386
const char * m_metric
Metric name with length.
Definition: pfs_instr_class.h:371
Instrumentation metadata for a mutex.
Definition: pfs_instr_class.h:324
PFS_mutex_stat m_mutex_stat
Mutex usage statistics.
Definition: pfs_instr_class.h:326
PFS_mutex * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:328
Statistics for mutex usage.
Definition: pfs_stat.h:176
Instrumented mutex implementation.
Definition: pfs_instr.h:102
Instrumentation metadata for a read write lock.
Definition: pfs_instr_class.h:334
PFS_rwlock * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:338
PFS_rwlock_stat m_rwlock_stat
Rwlock usage statistics.
Definition: pfs_instr_class.h:336
Statistics for rwlock usage.
Definition: pfs_stat.h:203
Instrumented rwlock implementation.
Definition: pfs_instr.h:128
Definition: pfs_name.h:117
Single statistic.
Definition: pfs_stat.h:51
Instrumentation metadata for a socket.
Definition: pfs_instr_class.h:613
PFS_socket_stat m_socket_stat
Socket usage statistics.
Definition: pfs_instr_class.h:615
PFS_socket * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:617
Statistics for SOCKET usage.
Definition: pfs_stat.h:874
Instrumented socket implementation.
Definition: pfs_instr.h:288
Instrumentation metadata for a stage.
Definition: pfs_instr_class.h:592
uint m_prefix_length
Length of the "stage/<component>/" prefix.
Definition: pfs_instr_class.h:597
PFS_stage_stat m_stage_stat
Stage usage statistics.
Definition: pfs_instr_class.h:599
Statistics for stage usage.
Definition: pfs_stat.h:322
Instrumentation metadata for a statement.
Definition: pfs_instr_class.h:603
Single table I/O statistic.
Definition: pfs_stat.h:647
Table index or 'key'.
Definition: pfs_instr_class.h:421
uint m_name_length
Length in bytes of m_name.
Definition: pfs_instr_class.h:425
char m_name[NAME_LEN]
Index name.
Definition: pfs_instr_class.h:423
Statistics for table locks.
Definition: pfs_stat.h:709
Definition: pfs_name.h:138
Index statistics of a table.
Definition: pfs_instr_class.h:429
PFS_table_key m_key
The index name.
Definition: pfs_instr_class.h:432
PFS_table_io_stat m_stat
The index stat.
Definition: pfs_instr_class.h:434
pfs_lock m_lock
Definition: pfs_instr_class.h:430
PFS_table_share * m_owner
Owner table share.
Definition: pfs_instr_class.h:436
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:438
Key identifying a table share.
Definition: pfs_instr_class.h:409
PFS_schema_name m_schema_name
Table schema.
Definition: pfs_instr_class.h:414
PFS_table_name m_table_name
Table name.
Definition: pfs_instr_class.h:417
enum_object_type m_type
Object type.
Definition: pfs_instr_class.h:411
Lock statistics of a table.
Definition: pfs_instr_class.h:442
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:449
pfs_lock m_lock
Definition: pfs_instr_class.h:443
PFS_table_share * m_owner
Owner table share.
Definition: pfs_instr_class.h:447
PFS_table_lock_stat m_stat
Lock stats.
Definition: pfs_instr_class.h:445
Instrumentation metadata for a table share.
Definition: pfs_instr_class.h:453
PFS_table_share_key m_key
Search key.
Definition: pfs_instr_class.h:495
std::atomic< PFS_table_share_lock * > m_race_lock_stat
Table locks statistics.
Definition: pfs_instr_class.h:515
uint32 get_version()
Definition: pfs_instr_class.h:455
enum_object_type get_object_type() const
Definition: pfs_instr_class.h:457
bool m_timed
True if table instrumentation is timed.
Definition: pfs_instr_class.h:492
bool m_enabled
True if table instrumentation is enabled.
Definition: pfs_instr_class.h:487
void inc_refcount()
Definition: pfs_instr_class.h:475
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr_class.h:500
void aggregate()
Definition: pfs_instr_class.h:466
int get_refcount()
Definition: pfs_instr_class.h:473
void init_refcount()
Definition: pfs_instr_class.h:471
std::atomic< int > m_refcount
Number of opened table handles.
Definition: pfs_instr_class.h:513
uint m_key_count
Number of indexes.
Definition: pfs_instr_class.h:498
void dec_refcount()
Definition: pfs_instr_class.h:477
pfs_lock m_lock
Internal lock.
Definition: pfs_instr_class.h:482
Instrumentation metadata of a thread.
Definition: pfs_instr_class.h:355
PFS_thread * m_singleton
Singleton instance.
Definition: pfs_instr_class.h:357
std::atomic< unsigned int > m_seqnum
Thread instance sequence number counter.
Definition: pfs_instr_class.h:363
Instrumented thread implementation.
Definition: pfs_instr.h:374
Instrumentation metadata for a transaction.
Definition: pfs_instr_class.h:606
Statistics for transaction usage.
Definition: pfs_stat.h:458
Condition information.
Definition: psi_cond_bits.h:87
File instrument information.
Definition: psi_file_bits.h:113
Memory instrument information.
Definition: psi_memory_bits.h:57
Define a meter source, storing char pointers requires the original strings to be valid for entire lif...
Definition: psi_metric_bits.h:142
Define a metric source, storing char pointers requires the original strings to be valid for entire li...
Definition: psi_metric_bits.h:123
Mutex information.
Definition: psi_mutex_bits.h:72
Rwlock information.
Definition: psi_rwlock_bits.h:161
Socket instrument information.
Definition: psi_socket_bits.h:127
Stage instrument information.
Definition: psi_stage_bits.h:73
Statement instrument information.
Definition: psi_statement_bits.h:132
Thread instrument information.
Definition: psi_thread_bits.h:116
This structure is shared between different table objects.
Definition: table.h:691
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:153
Definition: result.h:29