MySQL 9.1.0
Source Code Documentation
|
Private interface for the server (declarations). More...
#include <sys/types.h>
#include "my_psi_config.h"
#include "mysql/psi/psi_cond.h"
#include "mysql/psi/psi_data_lock.h"
#include "mysql/psi/psi_error.h"
#include "mysql/psi/psi_file.h"
#include "mysql/psi/psi_idle.h"
#include "mysql/psi/psi_logger_client.h"
#include "mysql/psi/psi_mdl.h"
#include "mysql/psi/psi_memory.h"
#include "mysql/psi/psi_metric.h"
#include "mysql/psi/psi_mutex.h"
#include "mysql/psi/psi_rwlock.h"
#include "mysql/psi/psi_socket.h"
#include "mysql/psi/psi_stage.h"
#include "mysql/psi/psi_statement.h"
#include "mysql/psi/psi_system.h"
#include "mysql/psi/psi_table.h"
#include "mysql/psi/psi_thread.h"
#include "mysql/psi/psi_tls_channel.h"
#include "mysql/psi/psi_transaction.h"
Go to the source code of this file.
Classes | |
struct | PFS_sizing_hints |
Sizing hints, from the server configuration. More... | |
struct | PFS_global_param |
Performance schema global sizing parameters. More... | |
Macros | |
#define | PFS_AUTOSCALE_VALUE (-1) |
#define | PFS_AUTOSIZE_VALUE (-1) |
#define | PFS_MAX_MUTEX_CLASS 350 |
#define | PFS_MAX_RWLOCK_CLASS 100 |
#define | PFS_MAX_COND_CLASS 150 |
#define | PFS_MAX_THREAD_CLASS 100 |
#define | PFS_MAX_FILE_CLASS 80 |
#define | PFS_MAX_FILE_HANDLE 32768 |
#define | PFS_MAX_SOCKET_CLASS 10 |
#define | PFS_MAX_STAGE_CLASS 175 |
#define | PFS_STATEMENTS_STACK_SIZE 10 |
#define | PFS_MAX_MEMORY_CLASS 470 |
#define | PFS_MAX_METER_CLASS 30 |
#define | PFS_MAX_METRIC_CLASS 600 |
#define | PFS_MAX_LOGGER_CLASS 80 |
#define | PFS_MAX_GLOBAL_SERVER_ERRORS (1 + pfs_session_error_stat_count + pfs_global_error_stat_count) |
#define | PFS_MAX_SESSION_SERVER_ERRORS (1 + pfs_session_error_stat_count) |
Functions | |
void | pre_initialize_performance_schema () |
Null initialization. More... | |
int | initialize_performance_schema (PFS_global_param *param, PSI_thread_bootstrap **thread_bootstrap, PSI_mutex_bootstrap **mutex_bootstrap, PSI_rwlock_bootstrap **rwlock_bootstrap, PSI_cond_bootstrap **cond_bootstrap, PSI_file_bootstrap **file_bootstrap, PSI_socket_bootstrap **socket_bootstrap, PSI_table_bootstrap **table_bootstrap, PSI_mdl_bootstrap **mdl_bootstrap, PSI_idle_bootstrap **idle_bootstrap, PSI_stage_bootstrap **stage_bootstrap, PSI_statement_bootstrap **statement_bootstrap, PSI_transaction_bootstrap **transaction_bootstrap, PSI_memory_bootstrap **memory_bootstrap, PSI_error_bootstrap **error_bootstrap, PSI_data_lock_bootstrap **data_lock_bootstrap, PSI_system_bootstrap **system_bootstrap, PSI_tls_channel_bootstrap **tls_channel_bootstrap, PSI_metric_bootstrap **metric_bootstrap, PSI_logs_client_bootstrap **logs_client_bootstrap) |
Initialize the performance schema. More... | |
void | pfs_automated_sizing (PFS_global_param *param) |
void | initialize_performance_schema_acl (bool bootstrap) |
Initialize the performance schema ACL. More... | |
void | reset_pfs_status_stats () |
Reset the aggregated status counter stats. More... | |
void | init_pfs_instrument_array () |
Initialize the dynamic array holding individual instrument settings collected from the server configuration options. More... | |
int | add_pfs_instr_to_array (const char *name, const char *value) |
Process one PFS_INSTRUMENT configuration string. More... | |
void | init_pfs_meter_array () |
Initialize the dynamic array holding individual meter instrument settings collected from the server configuration options. More... | |
int | add_pfs_meter_to_array (const char *name, const char *value) |
Process one PFS_METER configuration string. More... | |
void | init_pfs_logger_array () |
Initialize the dynamic array holding individual logger instrument settings collected from the server configuration options. More... | |
int | add_pfs_logger_to_array (const char *name, const char *value) |
Process one PFS_LOGGER configuration string. More... | |
void | shutdown_performance_schema () |
Shutdown the performance schema. More... | |
Variables | |
PFS_global_param | pfs_param |
Performance schema sizing values for the server. More... | |
Private interface for the server (declarations).
#define PFS_AUTOSCALE_VALUE (-1) |
#define PFS_AUTOSIZE_VALUE (-1) |
#define PFS_MAX_COND_CLASS 150 |
#define PFS_MAX_FILE_CLASS 80 |
#define PFS_MAX_FILE_HANDLE 32768 |
#define PFS_MAX_GLOBAL_SERVER_ERRORS (1 + pfs_session_error_stat_count + pfs_global_error_stat_count) |
#define PFS_MAX_LOGGER_CLASS 80 |
#define PFS_MAX_MEMORY_CLASS 470 |
#define PFS_MAX_METER_CLASS 30 |
#define PFS_MAX_METRIC_CLASS 600 |
#define PFS_MAX_MUTEX_CLASS 350 |
#define PFS_MAX_RWLOCK_CLASS 100 |
#define PFS_MAX_SESSION_SERVER_ERRORS (1 + pfs_session_error_stat_count) |
#define PFS_MAX_SOCKET_CLASS 10 |
#define PFS_MAX_STAGE_CLASS 175 |
#define PFS_MAX_THREAD_CLASS 100 |
#define PFS_STATEMENTS_STACK_SIZE 10 |
int add_pfs_instr_to_array | ( | const char * | name, |
const char * | value | ||
) |
Process one PFS_INSTRUMENT configuration string.
Process one PFS_INSTRUMENT configuration string.
Isolate the instrument name, evaluate the option value, and store them in a dynamic array. Return 'false' for success, 'true' for error.
name | Instrument name |
value | Configuration option: 'on', 'off', etc. |
int add_pfs_logger_to_array | ( | const char * | name, |
const char * | value | ||
) |
Process one PFS_LOGGER configuration string.
Process one PFS_LOGGER configuration string.
Isolate the instrument name, evaluate the option values, and store them in a dynamic array. Return 'false' for success, 'true' for error.
name | Instrument name |
value | Configuration option: 'level:INFO', 'level:NONE', etc. |
int add_pfs_meter_to_array | ( | const char * | name, |
const char * | value | ||
) |
Process one PFS_METER configuration string.
Process one PFS_METER configuration string.
Isolate the instrument name, evaluate the option values, and store them in a dynamic array. Return 'false' for success, 'true' for error.
name | Instrument name |
value | Configuration option: 'enabled:ON,frequency:30', 'enabled:OFF', etc. |
void init_pfs_instrument_array | ( | ) |
Initialize the dynamic array holding individual instrument settings collected from the server configuration options.
Initialize the dynamic array holding individual instrument settings collected from the server configuration options.
void init_pfs_logger_array | ( | ) |
Initialize the dynamic array holding individual logger instrument settings collected from the server configuration options.
Initialize the dynamic array holding individual logger instrument settings collected from the server configuration options.
void init_pfs_meter_array | ( | ) |
Initialize the dynamic array holding individual meter instrument settings collected from the server configuration options.
Initialize the dynamic array holding individual meter instrument settings collected from the server configuration options.
int initialize_performance_schema | ( | PFS_global_param * | param, |
PSI_thread_bootstrap ** | thread_bootstrap, | ||
PSI_mutex_bootstrap ** | mutex_bootstrap, | ||
PSI_rwlock_bootstrap ** | rwlock_bootstrap, | ||
PSI_cond_bootstrap ** | cond_bootstrap, | ||
PSI_file_bootstrap ** | file_bootstrap, | ||
PSI_socket_bootstrap ** | socket_bootstrap, | ||
PSI_table_bootstrap ** | table_bootstrap, | ||
PSI_mdl_bootstrap ** | mdl_bootstrap, | ||
PSI_idle_bootstrap ** | idle_bootstrap, | ||
PSI_stage_bootstrap ** | stage_bootstrap, | ||
PSI_statement_bootstrap ** | statement_bootstrap, | ||
PSI_transaction_bootstrap ** | transaction_bootstrap, | ||
PSI_memory_bootstrap ** | memory_bootstrap, | ||
PSI_error_bootstrap ** | error_bootstrap, | ||
PSI_data_lock_bootstrap ** | data_lock_bootstrap, | ||
PSI_system_bootstrap ** | system_bootstrap, | ||
PSI_tls_channel_bootstrap ** | tls_channel_bootstrap, | ||
PSI_metric_bootstrap ** | metric_bootstrap, | ||
PSI_logs_client_bootstrap ** | logs_client_bootstrap | ||
) |
Initialize the performance schema.
The performance schema implement several instrumentation services. Each instrumentation service is versioned, and accessible through a bootstrap structure, returned as output parameter.
param | Size parameters to use. | |
[out] | thread_bootstrap | Thread instrumentation service bootstrap |
[out] | mutex_bootstrap | Mutex instrumentation service bootstrap |
[out] | rwlock_bootstrap | Rwlock instrumentation service bootstrap |
[out] | cond_bootstrap | Condition instrumentation service bootstrap |
[out] | file_bootstrap | File instrumentation service bootstrap |
[out] | socket_bootstrap | Socket instrumentation service bootstrap |
[out] | table_bootstrap | Table instrumentation service bootstrap |
[out] | mdl_bootstrap | Metadata Lock instrumentation service bootstrap |
[out] | idle_bootstrap | Idle instrumentation service bootstrap |
[out] | stage_bootstrap | Stage instrumentation service bootstrap |
[out] | statement_bootstrap | Statement instrumentation service bootstrap |
[out] | transaction_bootstrap | Transaction instrumentation service bootstrap |
[out] | memory_bootstrap | Memory instrumentation service bootstrap |
[out] | error_bootstrap | Error instrumentation service bootstrap |
[out] | data_lock_bootstrap | Data Lock instrumentation service bootstrap |
[out] | system_bootstrap | System instrumentation service bootstrap |
[out] | tls_channel_bootstrap | TLS channel instrumentation service bootstrap |
[out] | metric_bootstrap | Telemetry metrics instrumentation service bootstrap |
[out] | logs_client_bootstrap | Telemetry logs client instrumentation service bootstrap |
0 | success |
Default values for SETUP_CONSUMERS
void pfs_automated_sizing | ( | PFS_global_param * | param | ) |
void pre_initialize_performance_schema | ( | ) |
Null initialization.
Disable all instrumentation, size all internal buffers to 0. This pre initialization step is needed to ensure that events can be collected and discarded, until such time initialize_performance_schema()
is called.
void reset_pfs_status_stats | ( | ) |
Reset the aggregated status counter stats.
Reset the aggregated status counter stats.
NOTE: Assumes LOCK_status is held.
void shutdown_performance_schema | ( | ) |
Shutdown the performance schema.
|
extern |
Performance schema sizing values for the server.
This global variable is set when parsing server startup options.