MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pfs_instr_class.h File Reference
#include "my_global.h"
#include "mysql_com.h"
#include "lf.h"
#include "pfs_global.h"
#include <my_sys.h>
#include <mysql/psi/psi.h>
#include "pfs_lock.h"
#include "pfs_stat.h"
#include "pfs_column_types.h"
Include dependency graph for pfs_instr_class.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PFS_instr_config
struct  PFS_instr_class
struct  PFS_mutex_class
struct  PFS_rwlock_class
struct  PFS_cond_class
struct  PFS_thread_class
struct  PFS_table_share_key
struct  PFS_table_key
struct  PFS_table_share
struct  PFS_file_class
struct  PFS_stage_class
struct  PFS_statement_class
struct  PFS_socket_class

Macros

#define PFS_MAX_INFO_NAME_LENGTH   128
#define PFS_MAX_FULL_PREFIX_NAME_LENGTH   32
#define GLOBAL_TABLE_IO_EVENT_INDEX   0
#define GLOBAL_TABLE_LOCK_EVENT_INDEX   1
#define GLOBAL_IDLE_EVENT_INDEX   2

Typedefs

typedef unsigned int PFS_sync_key
typedef unsigned int PFS_thread_key
typedef unsigned int PFS_file_key
typedef unsigned int PFS_stage_key
typedef unsigned int PFS_statement_key
typedef unsigned int PFS_socket_key

Enumerations

enum  PFS_class_type {
  PFS_CLASS_NONE = 0, PFS_CLASS_MUTEX = 1, PFS_CLASS_RWLOCK = 2, PFS_CLASS_COND = 3,
  PFS_CLASS_FILE = 4, PFS_CLASS_TABLE = 5, PFS_CLASS_STAGE = 6, PFS_CLASS_STATEMENT = 7,
  PFS_CLASS_SOCKET = 8, PFS_CLASS_TABLE_IO = 9, PFS_CLASS_TABLE_LOCK = 10, PFS_CLASS_IDLE = 11,
  PFS_CLASS_LAST = PFS_CLASS_IDLE, PFS_CLASS_MAX = PFS_CLASS_LAST + 1
}

Functions

uint sanitize_index_count (uint count)
void init_event_name_sizing (const PFS_global_param *param)
void register_global_classes ()
int init_sync_class (uint mutex_class_sizing, uint rwlock_class_sizing, uint cond_class_sizing)
void cleanup_sync_class (void)
int init_thread_class (uint thread_class_sizing)
void cleanup_thread_class (void)
int init_table_share (uint table_share_sizing)
void cleanup_table_share (void)
C_MODE_END int init_table_share_hash (void)
void cleanup_table_share_hash (void)
int init_file_class (uint file_class_sizing)
void cleanup_file_class (void)
int init_stage_class (uint stage_class_sizing)
void cleanup_stage_class (void)
int init_statement_class (uint statement_class_sizing)
void cleanup_statement_class (void)
int init_socket_class (uint socket_class_sizing)
void cleanup_socket_class (void)
PFS_sync_key register_mutex_class (const char *name, uint name_length, int flags)
PFS_sync_key register_rwlock_class (const char *name, uint name_length, int flags)
PFS_sync_key register_cond_class (const char *name, uint name_length, int flags)
PFS_thread_key register_thread_class (const char *name, uint name_length, int flags)
PFS_file_key register_file_class (const char *name, uint name_length, int flags)
PFS_stage_key register_stage_class (const char *name, uint prefix_length, uint name_length, int flags)
PFS_statement_key register_statement_class (const char *name, uint name_length, int flags)
PFS_socket_key register_socket_class (const char *name, uint name_length, int flags)
PFS_mutex_classfind_mutex_class (PSI_mutex_key key)
PFS_mutex_classsanitize_mutex_class (PFS_mutex_class *unsafe)
PFS_rwlock_classfind_rwlock_class (PSI_rwlock_key key)
PFS_rwlock_classsanitize_rwlock_class (PFS_rwlock_class *unsafe)
PFS_cond_classfind_cond_class (PSI_cond_key key)
PFS_cond_classsanitize_cond_class (PFS_cond_class *unsafe)
PFS_thread_classfind_thread_class (PSI_thread_key key)
PFS_thread_classsanitize_thread_class (PFS_thread_class *unsafe)
PFS_file_classfind_file_class (PSI_file_key key)
PFS_file_classsanitize_file_class (PFS_file_class *unsafe)
PFS_stage_classfind_stage_class (PSI_stage_key key)
PFS_stage_classsanitize_stage_class (PFS_stage_class *unsafe)
PFS_statement_classfind_statement_class (PSI_statement_key key)
PFS_statement_classsanitize_statement_class (PFS_statement_class *unsafe)
PFS_instr_classfind_table_class (uint index)
PFS_instr_classsanitize_table_class (PFS_instr_class *unsafe)
PFS_socket_classfind_socket_class (PSI_socket_key key)
PFS_socket_classsanitize_socket_class (PFS_socket_class *unsafe)
PFS_instr_classfind_idle_class (uint index)
PFS_instr_classsanitize_idle_class (PFS_instr_class *unsafe)
PFS_table_sharefind_or_create_table_share (PFS_thread *thread, bool temporary, const TABLE_SHARE *share)
void release_table_share (PFS_table_share *pfs)
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)
PFS_table_sharesanitize_table_share (PFS_table_share *unsafe)
void reset_events_waits_by_class ()
void reset_file_class_io (void)
void reset_socket_class_io (void)
void update_table_share_derived_flags (PFS_thread *thread)

Variables

my_bool pfs_enabled
enum_timer_nameclass_timers []
DYNAMIC_ARRAY pfs_instr_config_array
int pfs_instr_config_state
uint mutex_class_start
uint rwlock_class_start
uint cond_class_start
uint file_class_start
uint socket_class_start
uint wait_class_max
PFS_single_stat global_idle_stat
PFS_table_io_stat global_table_io_stat
PFS_table_lock_stat global_table_lock_stat
PFS_instr_class global_table_io_class
PFS_instr_class global_table_lock_class
PFS_instr_class global_idle_class
ulong mutex_class_max
ulong mutex_class_lost
ulong rwlock_class_max
ulong rwlock_class_lost
ulong cond_class_max
ulong cond_class_lost
ulong thread_class_max
ulong thread_class_lost
ulong file_class_max
ulong file_class_lost
ulong stage_class_max
ulong stage_class_lost
ulong statement_class_max
ulong statement_class_lost
ulong socket_class_max
ulong socket_class_lost
ulong table_share_max
ulong table_share_lost
PFS_mutex_classmutex_class_array
PFS_rwlock_classrwlock_class_array
PFS_cond_classcond_class_array
PFS_file_classfile_class_array
PFS_table_sharetable_share_array
LF_HASH table_share_hash

Detailed Description

Performance schema instruments meta data (declarations).

Definition in file pfs_instr_class.h.

Macro Definition Documentation

#define PFS_MAX_FULL_PREFIX_NAME_LENGTH   32

Maximum length of the 'full' prefix of an instrument name. For example, for the instrument name 'wait/sync/mutex/sql/LOCK_open', the full prefix is 'wait/sync/mutex/sql/', which in turn derives from a prefix 'wait/sync/mutex' for mutexes, and a category of 'sql' for mutexes of the sql layer in the server.

Definition at line 42 of file pfs_instr_class.h.

#define PFS_MAX_INFO_NAME_LENGTH   128

Maximum length of an instrument name. For example, 'wait/sync/mutex/sql/LOCK_open' is an instrument name.

Definition at line 33 of file pfs_instr_class.h.