MySQL 9.1.0
Source Code Documentation
|
Classes | |
struct | PSI_file_info_v1 |
File instrument information. More... | |
struct | PSI_file_locker_state_v1 |
State data storage for get_thread_file_name_locker_v1_t . More... | |
struct | PSI_file_bootstrap |
Entry point for the performance schema interface. More... | |
struct | PSI_file_service_v2 |
Performance Schema file Interface, version 2. More... | |
Macros | |
#define | PSI_FILE_VERSION_1 1 |
Performance Schema File Interface number for version 1. More... | |
#define | PSI_FILE_VERSION_2 2 |
Performance Schema File Interface number for version 2. More... | |
#define | PSI_CURRENT_FILE_VERSION 2 |
Performance Schema File Interface number for the most recent version. More... | |
Typedefs | |
typedef unsigned int | PSI_file_key |
Instrumented file key. More... | |
typedef struct PSI_file | PSI_file |
typedef struct PSI_file_locker | PSI_file_locker |
typedef enum PSI_file_operation | PSI_file_operation |
typedef struct PSI_file_info_v1 | PSI_file_info_v1 |
typedef struct PSI_file_locker_state_v1 | PSI_file_locker_state_v1 |
typedef void(* | register_file_v1_t) (const char *category, struct PSI_file_info_v1 *info, int count) |
File registration API. More... | |
typedef void(* | create_file_v1_t) (PSI_file_key key, const char *name, File file) |
Create a file instrumentation for a created file. More... | |
typedef struct PSI_file_locker *(* | get_thread_file_name_locker_v1_t) (struct PSI_file_locker_state_v1 *state, PSI_file_key key, enum PSI_file_operation op, const char *name, const void *identity) |
Get a file instrumentation locker, for opening or creating a file. More... | |
typedef struct PSI_file_locker *(* | get_thread_file_stream_locker_v1_t) (struct PSI_file_locker_state_v1 *state, struct PSI_file *file, enum PSI_file_operation op) |
Get a file stream instrumentation locker. More... | |
typedef struct PSI_file_locker *(* | get_thread_file_descriptor_locker_v1_t) (struct PSI_file_locker_state_v1 *state, File file, enum PSI_file_operation op) |
Get a file instrumentation locker. More... | |
typedef void(* | start_file_open_wait_v1_t) (struct PSI_file_locker *locker, const char *src_file, unsigned int src_line) |
Start a file instrumentation open operation. More... | |
typedef struct PSI_file *(* | end_file_open_wait_v1_t) (struct PSI_file_locker *locker, void *result) |
End a file instrumentation open operation, for file streams. More... | |
typedef void(* | end_file_open_wait_and_bind_to_descriptor_v1_t) (struct PSI_file_locker *locker, File file) |
End a file instrumentation open operation, for non stream files. More... | |
typedef void(* | end_temp_file_open_wait_and_bind_to_descriptor_v1_t) (struct PSI_file_locker *locker, File file, const char *filename) |
End a file instrumentation open operation, for non stream temporary files. More... | |
typedef void(* | start_file_wait_v1_t) (struct PSI_file_locker *locker, size_t count, const char *src_file, unsigned int src_line) |
Record a file instrumentation start event. More... | |
typedef void(* | end_file_wait_v1_t) (struct PSI_file_locker *locker, size_t count) |
Record a file instrumentation end event. More... | |
typedef void(* | start_file_close_wait_v1_t) (struct PSI_file_locker *locker, const char *src_file, unsigned int src_line) |
Start a file instrumentation close operation. More... | |
typedef void(* | end_file_close_wait_v1_t) (struct PSI_file_locker *locker, int rc) |
End a file instrumentation close operation. More... | |
typedef void(* | start_file_rename_wait_v1_t) (struct PSI_file_locker *locker, size_t count, const char *old_name, const char *new_name, const char *src_file, unsigned int src_line) |
Record a file instrumentation start event. More... | |
typedef void(* | end_file_rename_wait_v1_t) (struct PSI_file_locker *locker, const char *old_name, const char *new_name, int rc) |
Rename a file instrumentation close operation. More... | |
typedef struct PSI_file_info_v1 | PSI_file_info |
typedef struct PSI_file_locker_state_v1 | PSI_file_locker_state |
typedef struct PSI_file_service_v2 | PSI_file_service_t |
Enumerations | |
enum | PSI_file_operation { PSI_FILE_CREATE = 0 , PSI_FILE_CREATE_TMP = 1 , PSI_FILE_OPEN = 2 , PSI_FILE_STREAM_OPEN = 3 , PSI_FILE_CLOSE = 4 , PSI_FILE_STREAM_CLOSE = 5 , PSI_FILE_READ = 6 , PSI_FILE_WRITE = 7 , PSI_FILE_SEEK = 8 , PSI_FILE_TELL = 9 , PSI_FILE_FLUSH = 10 , PSI_FILE_STAT = 11 , PSI_FILE_FSTAT = 12 , PSI_FILE_CHSIZE = 13 , PSI_FILE_DELETE = 14 , PSI_FILE_RENAME = 15 , PSI_FILE_SYNC = 16 } |
Operation performed on an instrumented file. More... | |
Variables | |
MYSQL_PLUGIN_IMPORT PSI_file_service_t * | psi_file_service |
#define PSI_CURRENT_FILE_VERSION 2 |
Performance Schema File Interface number for the most recent version.
The most current version is PSI_FILE_VERSION_2
#define PSI_FILE_VERSION_1 1 |
Performance Schema File Interface number for version 1.
This version is obsolete.
#define PSI_FILE_VERSION_2 2 |
Performance Schema File Interface number for version 2.
This version is supported.
typedef void(* create_file_v1_t) (PSI_file_key key, const char *name, File file) |
Create a file instrumentation for a created file.
This method does not create the file itself, but is used to notify the instrumentation interface that a file was just created.
key | the file instrumentation key for this file |
name | the file name |
file | the file handle |
typedef void(* end_file_close_wait_v1_t) (struct PSI_file_locker *locker, int rc) |
End a file instrumentation close operation.
locker | the file locker. |
rc | the close operation return code (0 for success). |
typedef void(* end_file_open_wait_and_bind_to_descriptor_v1_t) (struct PSI_file_locker *locker, File file) |
End a file instrumentation open operation, for non stream files.
locker | the file locker. |
file | the file number assigned by open() or create() for this file. |
typedef struct PSI_file *(* end_file_open_wait_v1_t) (struct PSI_file_locker *locker, void *result) |
End a file instrumentation open operation, for file streams.
locker | the file locker. |
result | the opened file (NULL indicates failure, non NULL success). |
typedef void(* end_file_rename_wait_v1_t) (struct PSI_file_locker *locker, const char *old_name, const char *new_name, int rc) |
Rename a file instrumentation close operation.
locker | the file locker. |
old_name | name of the file to be renamed. |
new_name | name of the file after rename. |
rc | the rename operation return code (0 for success). |
typedef void(* end_file_wait_v1_t) (struct PSI_file_locker *locker, size_t count) |
Record a file instrumentation end event.
Note that for file close operations, the instrumented file handle associated with the file (which was provided to obtain a locker) is invalid after this call.
locker | a file locker for the running thread |
count | the number of bytes actually used in the operation, or 0 if not applicable, or -1 if the operation failed |
typedef void(* end_temp_file_open_wait_and_bind_to_descriptor_v1_t) (struct PSI_file_locker *locker, File file, const char *filename) |
End a file instrumentation open operation, for non stream temporary files.
locker | the file locker. |
file | the file number assigned by open() or create() for this file. |
filename | the file name generated during temporary file creation. |
typedef struct PSI_file_locker *(* get_thread_file_descriptor_locker_v1_t) (struct PSI_file_locker_state_v1 *state, File file, enum PSI_file_operation op) |
Get a file instrumentation locker.
state | data storage for the locker |
file | the file descriptor to access |
op | the operation to perform |
typedef struct PSI_file_locker *(* get_thread_file_name_locker_v1_t) (struct PSI_file_locker_state_v1 *state, PSI_file_key key, enum PSI_file_operation op, const char *name, const void *identity) |
Get a file instrumentation locker, for opening or creating a file.
state | data storage for the locker |
key | the file instrumentation key |
op | the operation to perform |
name | the file name |
identity | a pointer representative of this file. |
typedef struct PSI_file_locker *(* get_thread_file_stream_locker_v1_t) (struct PSI_file_locker_state_v1 *state, struct PSI_file *file, enum PSI_file_operation op) |
Get a file stream instrumentation locker.
state | data storage for the locker |
file | the file stream to access |
op | the operation to perform |
typedef struct PSI_file_info_v1 PSI_file_info |
typedef struct PSI_file_info_v1 PSI_file_info_v1 |
typedef unsigned int PSI_file_key |
Instrumented file key.
To instrument a file, a file key must be obtained using register_file
. Using a zero key always disable the instrumentation.
typedef struct PSI_file_locker PSI_file_locker |
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state |
typedef struct PSI_file_locker_state_v1 PSI_file_locker_state_v1 |
typedef enum PSI_file_operation PSI_file_operation |
typedef struct PSI_file_service_v2 PSI_file_service_t |
typedef void(* register_file_v1_t) (const char *category, struct PSI_file_info_v1 *info, int count) |
File registration API.
category | a category name (typically a plugin name) |
info | an array of file info to register |
count | the size of the info array |
typedef void(* start_file_close_wait_v1_t) (struct PSI_file_locker *locker, const char *src_file, unsigned int src_line) |
Start a file instrumentation close operation.
locker | the file locker |
src_file | the source file name |
src_line | the source line number |
typedef void(* start_file_open_wait_v1_t) (struct PSI_file_locker *locker, const char *src_file, unsigned int src_line) |
Start a file instrumentation open operation.
locker | the file locker |
src_file | the source file name |
src_line | the source line number |
typedef void(* start_file_rename_wait_v1_t) (struct PSI_file_locker *locker, size_t count, const char *old_name, const char *new_name, const char *src_file, unsigned int src_line) |
Record a file instrumentation start event.
locker | a file locker for the running thread |
count | the number of bytes requested, or 0 if not applicable |
old_name | name of the file to be renamed. |
new_name | name of the file after rename. |
src_file | the source file name |
src_line | the source line number |
typedef void(* start_file_wait_v1_t) (struct PSI_file_locker *locker, size_t count, const char *src_file, unsigned int src_line) |
Record a file instrumentation start event.
locker | a file locker for the running thread |
count | the number of bytes requested, or 0 if not applicable |
src_file | the source file name |
src_line | the source line number |
enum PSI_file_operation |
Operation performed on an instrumented file.
|
extern |