39class PFS_opaque_container_page;
 
   55#ifdef HAVE_ARPA_INET_H 
  228    if (m_has_io_stats) {
 
  229      safe_aggregate_io(server_share, &m_table_stat, m_share);
 
  230      m_has_io_stats = 
false;
 
  232    if (m_has_lock_stats) {
 
  233      safe_aggregate_lock(&m_table_stat, m_share);
 
  234      m_has_lock_stats = 
false;
 
  245  void sanitized_aggregate();
 
  251  void sanitized_aggregate_io();
 
  257  void sanitized_aggregate_lock();
 
  279  static void safe_aggregate_io(
const TABLE_SHARE *optional_server_share,
 
  351#define WAIT_STACK_LOGICAL_SIZE 5 
  358#define WAIT_STACK_BOTTOM 1 
  363#define WAIT_STACK_SIZE (WAIT_STACK_BOTTOM + WAIT_STACK_LOGICAL_SIZE) 
  653  struct sockaddr_storage m_sock_addr;
 
  658  void reset_session_connect_attrs();
 
  677  void rebase_memory_stats();
 
  688    set_history_derived_flags();
 
  691  void set_history_derived_flags();
 
  702    m_has_memory_stats = 
false;
 
  703    m_instr_class_memory_stats = array;
 
  707    if (!m_has_memory_stats) {
 
  710    return m_instr_class_memory_stats;
 
  714    if (!m_has_memory_stats) {
 
  715      rebase_memory_stats();
 
  716      m_has_memory_stats = 
true;
 
  718    return m_instr_class_memory_stats;
 
  720  void mem_cnt_alloc(
size_t size);
 
  721  void mem_cnt_free(
size_t size);
 
  763                          const void *identity, 
ulonglong processlist_id);
 
  783                        const void *identity);
 
  787                          const struct sockaddr *addr, socklen_t addr_len);
 
  794                                        const char *src_file, 
uint src_line);
 
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
 
int opaque_mdl_duration
Definition: psi_mdl_bits.h:42
 
int opaque_mdl_status
Definition: psi_mdl_bits.h:45
 
int opaque_mdl_type
Definition: psi_mdl_bits.h:36
 
unsigned int PSI_thread_seqnum
Instrumented thread sequence number.
Definition: psi_thread_bits.h:59
 
Header for compiler-dependent features.
 
Common definition used by mysys, performance schema and server & client.
 
Some integer typedefs for easier portability.
 
unsigned long long int ulonglong
Definition: my_inttypes.h:56
 
uint32_t uint32
Definition: my_inttypes.h:67
 
Common #defines and includes for file and socket I/O.
 
static my_thread_id thread_id
Definition: my_thr_init.cc:63
 
Portable wrapper for gettid().
 
unsigned long long my_thread_os_id_t
Definition: my_thread_os_id.h:48
 
int my_socket
Definition: mysql.h:65
 
#define NAME_LEN
Definition: mysql_com.h:67
 
static mysql_service_status_t create(const char *service_names[], reference_caching_channel *out_channel) noexcept
Definition: component.cc:36
 
Data types for columns used in the performance schema tables (declarations)
 
#define COL_INFO_SIZE
Size of INFO columns, in bytes.
Definition: pfs_column_types.h:71
 
Performance schema connection slice (declarations).
 
Events waits data structures (declarations).
 
Events statements data structures (declarations).
 
Events transactions data structures (declarations).
 
Events waits data structures (declarations).
 
const char * filename
Definition: pfs_example_component_population.cc:67
 
#define PFS_ALIGNED
Definition: pfs_global.h:57
 
PFS_single_stat * thread_instr_class_waits_array_end
 
PFS_single_stat * thread_instr_class_waits_array_start
 
Performance schema instruments metadata (declarations).
 
#define PFS_MAX_OS_NAME_LENGTH
Maximum length of the thread os name.
Definition: pfs_instr_class.h:66
 
Performance schema internal locks (declarations).
 
Object names (declarations).
 
Private interface for the server (declarations).
 
Statistics (declarations).
 
required bool enabled
Definition: replication_group_member_actions.proto:33
 
struct sockaddr sockaddr
Definition: sock_probe_win32.h:63
 
static const LEX_CSTRING pfs
Definition: sql_show_processlist.cc:66
 
Metadata lock object key.
Definition: mdl.h:365
 
Per account statistics.
Definition: pfs_account.h:67
 
Instrumentation metadata for a condition.
Definition: pfs_instr_class.h:342
 
Statistics for conditions usage.
Definition: pfs_stat.h:238
 
Instrumented condition implementation.
Definition: pfs_instr.h:160
 
const void * m_identity
Condition identity, typically a pthread_cond_t.
Definition: pfs_instr.h:169
 
PFS_cond_class * m_class
Condition class.
Definition: pfs_instr.h:171
 
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr.h:166
 
PFS_cond_stat m_cond_stat
Condition instance usage statistics.
Definition: pfs_instr.h:173
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:162
 
bool m_timed
Timed flag.
Definition: pfs_instr.h:164
 
A connection slice, an arbitrary grouping of several connections.
Definition: pfs_con_slice.h:54
 
Statistics for all server errors.
Definition: pfs_stat.h:557
 
A stage record.
Definition: pfs_events_stages.h:45
 
A statement record.
Definition: pfs_events_statements.h:47
 
A transaction record.
Definition: pfs_events_transactions.h:85
 
A wait event record.
Definition: pfs_events_waits.h:69
 
Instrumentation metadata for a file.
Definition: pfs_instr_class.h:540
 
Definition: pfs_name.h:602
 
Statistics for FILE usage.
Definition: pfs_stat.h:308
 
Instrumented File and FILE implementation.
Definition: pfs_instr.h:177
 
uint32 get_version()
Definition: pfs_instr.h:178
 
PFS_file_class * m_class
File class.
Definition: pfs_instr.h:185
 
PFS_file_stat m_file_stat
File usage statistics.
Definition: pfs_instr.h:187
 
bool m_temporary
True if a temporary file.
Definition: pfs_instr.h:189
 
const void * m_identity
File identity.
Definition: pfs_instr.h:181
 
PFS_file_name m_file_name
File name.
Definition: pfs_instr.h:183
 
Performance schema global sizing parameters.
Definition: pfs_server.h:113
 
Definition: pfs_histogram.h:38
 
Definition: pfs_name.h:514
 
Per host statistics.
Definition: pfs_host.h:64
 
Base structure for wait instruments.
Definition: pfs_instr.h:89
 
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr.h:97
 
bool m_enabled
Enabled flag.
Definition: pfs_instr.h:93
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:91
 
bool m_timed
Timed flag.
Definition: pfs_instr.h:95
 
Memory statistics.
Definition: pfs_stat.h:913
 
Definition: pfs_stat.h:937
 
Definition: pfs_stat.h:883
 
Definition: pfs_stat.h:888
 
Instrumentation metadata for a mutex.
Definition: pfs_instr_class.h:322
 
Statistics for mutex usage.
Definition: pfs_stat.h:177
 
Instrumented mutex implementation.
Definition: pfs_instr.h:101
 
const void * m_identity
Mutex identity, typically a pthread_mutex_t.
Definition: pfs_instr.h:110
 
PFS_mutex_class * m_class
Mutex class.
Definition: pfs_instr.h:112
 
bool m_timed
Timed flag.
Definition: pfs_instr.h:105
 
PFS_thread * m_owner
Current owner.
Definition: pfs_instr.h:116
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:103
 
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr.h:107
 
PFS_mutex_stat m_mutex_stat
Instrument statistics.
Definition: pfs_instr.h:114
 
Instrumentation metadata for a read write lock.
Definition: pfs_instr_class.h:332
 
Statistics for rwlock usage.
Definition: pfs_stat.h:204
 
Instrumented rwlock implementation.
Definition: pfs_instr.h:127
 
uint m_readers
Current count of readers.
Definition: pfs_instr.h:144
 
PFS_thread * m_writer
Current writer thread.
Definition: pfs_instr.h:142
 
PFS_rwlock_class * m_class
RWLock class.
Definition: pfs_instr.h:138
 
PFS_rwlock_stat m_rwlock_stat
Instrument statistics.
Definition: pfs_instr.h:140
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:129
 
const void * m_identity
RWLock identity, typically a pthread_rwlock_t.
Definition: pfs_instr.h:136
 
bool m_timed
Timed flag.
Definition: pfs_instr.h:131
 
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr.h:133
 
Definition: pfs_name.h:186
 
Definition: pfs_stat.h:1136
 
Single statistic.
Definition: pfs_stat.h:52
 
Instrumentation metadata for a socket.
Definition: pfs_instr_class.h:569
 
Statistics for SOCKET usage.
Definition: pfs_stat.h:875
 
Instrumented socket implementation.
Definition: pfs_instr.h:287
 
const void * m_identity
Socket identity, typically int.
Definition: pfs_instr.h:298
 
bool m_idle
Idle flag.
Definition: pfs_instr.h:308
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:289
 
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr.h:293
 
bool m_timed
Timed flag.
Definition: pfs_instr.h:291
 
uint32 get_version()
Definition: pfs_instr.h:295
 
socklen_t m_addr_len
Length of address.
Definition: pfs_instr.h:306
 
PFS_thread * m_thread_owner
Owning thread, if applicable.
Definition: pfs_instr.h:300
 
my_socket m_fd
Socket file descriptor.
Definition: pfs_instr.h:302
 
struct sockaddr_storage m_sock_addr
Raw socket address.
Definition: pfs_instr.h:304
 
PFS_socket_stat m_socket_stat
Socket usage statistics.
Definition: pfs_instr.h:312
 
PFS_socket_class * m_class
Socket class.
Definition: pfs_instr.h:310
 
Statistics for stage usage.
Definition: pfs_stat.h:323
 
Statistics for statement usage.
Definition: pfs_stat.h:376
 
Instrumentation metadata for a table share.
Definition: pfs_instr_class.h:409
 
Statistics for TABLE usage.
Definition: pfs_stat.h:740
 
Instrumented table implementation.
Definition: pfs_instr.h:193
 
PFS_table_stat m_table_stat
Table statistics.
Definition: pfs_instr.h:270
 
ulonglong m_owner_event_id
Event Owner.
Definition: pfs_instr.h:264
 
const void * m_identity
Table identity, typically a handler.
Definition: pfs_instr.h:268
 
bool m_lock_timed
True if table lock instrumentation is timed.
Definition: pfs_instr.h:213
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:260
 
bool m_has_io_stats
True if table I/O statistics have been collected.
Definition: pfs_instr.h:216
 
PFS_thread * m_thread_owner
Thread Owner.
Definition: pfs_instr.h:262
 
bool m_lock_enabled
True if table lock instrumentation is enabled.
Definition: pfs_instr.h:203
 
PFS_TL_LOCK_TYPE m_external_lock
Current external lock.
Definition: pfs_instr.h:274
 
bool m_io_enabled
True if table I/O instrumentation is enabled.
Definition: pfs_instr.h:198
 
PFS_TL_LOCK_TYPE m_internal_lock
Current internal lock.
Definition: pfs_instr.h:272
 
bool m_io_timed
True if table I/O instrumentation is timed.
Definition: pfs_instr.h:208
 
void aggregate(const TABLE_SHARE *server_share)
Aggregate this table handle statistics to the parents.
Definition: pfs_instr.h:227
 
bool m_has_lock_stats
True if table lock statistics have been collected.
Definition: pfs_instr.h:219
 
PFS_table_share * m_share
Table share.
Definition: pfs_instr.h:266
 
PFS_opaque_container_page * m_page
Container page.
Definition: pfs_instr.h:276
 
Instrumentation metadata of a thread.
Definition: pfs_instr_class.h:353
 
Instrumented thread implementation.
Definition: pfs_instr.h:373
 
bool m_secondary
Executed on secondary engine.
Definition: pfs_instr.h:634
 
bool m_flag_events_statements_history_long
Derived flag flag_events_statements_history_long, per thread.
Definition: pfs_instr.h:428
 
uint m_session_connect_attrs_cs_number
Character set in which m_connect_attrs are encoded.
Definition: pfs_instr.h:674
 
uint m_events_statements_count
Size of m_events_statements_stack.
Definition: pfs_instr.h:639
 
THD * m_cnt_thd
Definition: pfs_instr.h:645
 
PFS_user * m_user
Definition: pfs_instr.h:647
 
LF_PINS * m_user_hash_pins
Pins for user_hash.
Definition: pfs_instr.h:469
 
PFS_events_transactions m_transaction_current
Definition: pfs_instr.h:642
 
PFS_events_waits * m_events_waits_current
Current wait event in the event stack.
Definition: pfs_instr.h:447
 
PFS_events_statements * m_statement_stack
Definition: pfs_instr.h:640
 
bool m_system_thread
True if a system thread.
Definition: pfs_instr.h:488
 
LF_PINS * m_account_hash_pins
Pins for account_hash.
Definition: pfs_instr.h:471
 
uint m_session_connect_attrs_length
Length used by m_connect_attrs.
Definition: pfs_instr.h:669
 
bool m_flag_events_stages_history_long
Derived flag flag_events_stages_history_long, per thread.
Definition: pfs_instr.h:412
 
telemetry_session_t * m_telemetry_session
Definition: pfs_instr.h:730
 
bool m_statements_history_full
True if the circular buffer m_statements_history is full.
Definition: pfs_instr.h:544
 
PSI_stage_progress * m_stage_progress
Current stage progress.
Definition: pfs_instr.h:621
 
bool m_flag_events_transactions_history
Derived flag flag_events_transactions_history, per thread.
Definition: pfs_instr.h:436
 
bool m_waits_history_full
True if the circular buffer m_waits_history is full.
Definition: pfs_instr.h:522
 
LF_PINS * m_filename_hash_pins
Pins for filename_hash.
Definition: pfs_instr.h:459
 
PFS_host_name m_host_name
Host name.
Definition: pfs_instr.h:582
 
void set_enabled(bool enabled)
Definition: pfs_instr.h:684
 
PFS_events_stages * m_stages_history
Stages history circular buffer.
Definition: pfs_instr.h:541
 
LF_PINS * m_digest_hash_pins
Pins for digest_hash.
Definition: pfs_instr.h:473
 
bool m_history
Thread history instrumentation flag.
Definition: pfs_instr.h:379
 
int m_command
Current command.
Definition: pfs_instr.h:607
 
pfs_lock m_session_lock
Internal lock, for session attributes.
Definition: pfs_instr.h:570
 
void set_history(bool history)
Definition: pfs_instr.h:686
 
socklen_t m_sock_addr_len
Length of address.
Definition: pfs_instr.h:655
 
PFS_thread_class * m_class
Thread class.
Definition: pfs_instr.h:486
 
const char * current_key_name
Definition: pfs_instr.h:723
 
ulonglong m_thread_internal_id
Internal thread identifier, unique.
Definition: pfs_instr.h:477
 
void set_instr_class_memory_stats(PFS_memory_safe_stat *array)
Definition: pfs_instr.h:701
 
PFS_schema_name m_db_name
Database name.
Definition: pfs_instr.h:588
 
bool m_flag_events_stages_history
Derived flag flag_events_stages_history, per thread.
Definition: pfs_instr.h:404
 
uint m_peer_port
Remote (peer) port.
Definition: pfs_instr.h:651
 
ulonglong m_parent_thread_internal_id
Parent internal thread identifier.
Definition: pfs_instr.h:479
 
uint m_processlist_info_length
Length of m_processlist_info_length.
Definition: pfs_instr.h:631
 
LF_PINS * m_setup_actor_hash_pins
Pins for setup_actor_hash.
Definition: pfs_instr.h:463
 
PFS_memory_safe_stat * m_instr_class_memory_stats
Per thread memory aggregated statistics.
Definition: pfs_instr.h:699
 
LF_PINS * m_setup_object_hash_pins
Pins for setup_object_hash.
Definition: pfs_instr.h:465
 
my_thread_os_id_t m_thread_os_id
External (Operating system) thread identifier, if any.
Definition: pfs_instr.h:484
 
pfs_lock m_lock
Internal lock.
Definition: pfs_instr.h:457
 
enum_vio_type m_connection_type
Connection type.
Definition: pfs_instr.h:609
 
bool m_flag_events_waits_history_long
Derived flag flag_events_waits_history_long, per thread.
Definition: pfs_instr.h:396
 
bool m_stages_history_full
True if the circular buffer m_stages_history is full.
Definition: pfs_instr.h:533
 
LF_PINS * m_program_hash_pins
Pins for routine_hash.
Definition: pfs_instr.h:475
 
PFS_account * m_account
Definition: pfs_instr.h:648
 
uint m_statements_history_index
Current index in the circular buffer m_statements_history.
Definition: pfs_instr.h:546
 
bool m_flag_events_statements_history
Derived flag flag_events_statements_history, per thread.
Definition: pfs_instr.h:420
 
THD * m_thd
Definition: pfs_instr.h:644
 
uint m_transactions_history_index
Current index in the circular buffer m_transactions_history.
Definition: pfs_instr.h:557
 
bool m_flag_events_waits_history
Derived flag flag_events_waits_history, per thread.
Definition: pfs_instr.h:388
 
ulonglong m_event_id
Event ID counter.
Definition: pfs_instr.h:449
 
void * m_user_data
User-defined data.
Definition: pfs_instr.h:605
 
bool m_enabled
Thread instrumentation flag.
Definition: pfs_instr.h:377
 
PFS_session_all_memory_stat m_session_all_memory_stat
Definition: pfs_instr.h:726
 
PFS_events_waits * m_waits_history
Waits history circular buffer.
Definition: pfs_instr.h:530
 
pfs_lock m_stmt_lock
Internal lock, for statement attributes.
Definition: pfs_instr.h:617
 
PFS_memory_safe_stat * write_instr_class_memory_stats()
Definition: pfs_instr.h:713
 
PFS_events_statements * m_statements_history
Statements history circular buffer.
Definition: pfs_instr.h:552
 
PFS_events_stages m_stage_current
Definition: pfs_instr.h:636
 
uint m_groupname_length
Length of m_groupname.
Definition: pfs_instr.h:599
 
const PFS_memory_safe_stat * read_instr_class_memory_stats() const
Definition: pfs_instr.h:706
 
telemetry_t * m_telemetry
Copy of g_telemetry.
Definition: pfs_instr.h:729
 
time_t m_start_time
Start time.
Definition: pfs_instr.h:611
 
uint m_stages_history_index
Current index in the circular buffer m_stages_history.
Definition: pfs_instr.h:535
 
bool m_flag_events_transactions_history_long
Derived flag flag_events_transactions_history_long, per thread.
Definition: pfs_instr.h:444
 
PFS_user_name m_user_name
User name.
Definition: pfs_instr.h:576
 
ulong m_processlist_id
External (.
Definition: pfs_instr.h:482
 
uint m_waits_history_index
Current index in the circular buffer m_waits_history.
Definition: pfs_instr.h:524
 
bool m_transactions_history_full
True if the circular buffer m_transactions_history is full.
Definition: pfs_instr.h:555
 
PFS_events_transactions * m_transactions_history
Statements history circular buffer.
Definition: pfs_instr.h:563
 
LF_PINS * m_host_hash_pins
Pins for host_hash.
Definition: pfs_instr.h:467
 
PFS_stage_key m_stage
Processlist state (derived from stage).
Definition: pfs_instr.h:619
 
PFS_host * m_host
Definition: pfs_instr.h:646
 
char * m_session_connect_attrs
Buffer for the connection attributes.
Definition: pfs_instr.h:664
 
LF_PINS * m_table_share_hash_pins
Pins for table_share_hash.
Definition: pfs_instr.h:461
 
Statistics for transaction usage.
Definition: pfs_stat.h:459
 
Definition: pfs_name.h:470
 
Per user statistics.
Definition: pfs_user.h:63
 
Interface for an instrumented condition.
Definition: psi_cond_bits.h:64
 
Interface for an instrumented mutex.
Definition: psi_mutex_bits.h:97
 
Interface for an instrumented rwlock.
Definition: psi_rwlock_bits.h:71
 
Interface for an instrumented socket descriptor.
Definition: psi_socket_bits.h:69
 
Interface for an instrumented stage progress.
Definition: psi_stage_bits.h:63
 
This structure is shared between different table objects.
Definition: table.h:691
 
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:154
 
uint32 get_version()
Definition: pfs_lock.h:342
 
Definition: server_telemetry_traces_bits.h:137
 
Include file for Sun RPC to compile out of the box.
 
unsigned int uint
Definition: uca9-dump.cc:75
 
enum_vio_type
Definition: violite.h:79
 
static void alive(server *s)
Definition: xcom_transport.cc:161