MySQL 8.0.31
Source Code Documentation
psi_file_service.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2022, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is also distributed with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef COMPONENTS_SERVICES_PSI_FILE_SERVICE_H
24#define COMPONENTS_SERVICES_PSI_FILE_SERVICE_H
25
28
29/*
30 Version 1.
31 Introduced in MySQL 8.0.3
32 Abandoned in MySQL 8.0.19
33 Status: Removed, use version 2 instead.
34*/
35
36/*
37 Version 2.
38 Introduced in MySQL 8.0.19
39 Status: active
40*/
41
43/** @sa register_file_v1_t. */
44register_file_v1_t register_file;
45/** @sa create_file_v1_t. */
47/** @sa get_thread_file_name_locker_v1_t. */
48get_thread_file_name_locker_v1_t get_thread_file_name_locker;
49/** @sa get_thread_file_stream_locker_v1_t. */
50get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
51/** @sa get_thread_file_descriptor_locker_v1_t. */
52get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
53/** @sa start_file_open_wait_v1_t. */
54start_file_open_wait_v1_t start_file_open_wait;
55/** @sa end_file_open_wait_v1_t. */
56end_file_open_wait_v1_t end_file_open_wait;
57/** @sa end_file_open_wait_and_bind_to_descriptor_v1_t. */
59 end_file_open_wait_and_bind_to_descriptor;
60/** @sa end_temp_file_open_wait_and_bind_to_descriptor_v1_t. */
62 end_temp_file_open_wait_and_bind_to_descriptor;
63/** @sa start_file_wait_v1_t. */
64start_file_wait_v1_t start_file_wait;
65/** @sa end_file_wait_v1_t. */
66end_file_wait_v1_t end_file_wait;
67/** @sa start_file_close_wait_v1_t. */
68start_file_close_wait_v1_t start_file_close_wait;
69/** @sa end_file_close_wait_v1_t. */
70end_file_close_wait_v1_t end_file_close_wait;
71/** @sa start_file_rename_wait_v1_t. */
72start_file_rename_wait_v1_t start_file_rename_wait;
73/** @sa rename_file_close_wait_v1_t. */
74end_file_rename_wait_v1_t end_file_rename_wait;
76
77#endif /* COMPONENTS_SERVICES_PSI_FILE_SERVICE_H */
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.
Definition: psi_file_bits.h:312
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.
Definition: psi_file_bits.h:324
void(* end_file_wait_v1_t)(struct PSI_file_locker *locker, size_t count)
Record a file instrumentation end event.
Definition: psi_file_bits.h:282
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.
Definition: psi_file_bits.h:239
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.
Definition: psi_file_bits.h:266
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.
Definition: psi_file_bits.h:219
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.
Definition: psi_file_bits.h:247
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.
Definition: psi_file_bits.h:291
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.
Definition: psi_file_bits.h:208
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.
Definition: psi_file_bits.h:256
void(* create_file_v1_t)(PSI_file_key key, const char *name, File file)
Create a file instrumentation for a created file.
Definition: psi_file_bits.h:186
void(* register_file_v1_t)(const char *category, struct PSI_file_info_v1 *info, int count)
File registration API.
Definition: psi_file_bits.h:175
void(* end_file_close_wait_v1_t)(struct PSI_file_locker *locker, int rc)
End a file instrumentation close operation.
Definition: psi_file_bits.h:300
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.
Definition: psi_file_bits.h:197
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.
Definition: psi_file_bits.h:229
Performance schema instrumentation interface.
static File create_file(THD *thd, char *path, sql_exchange *exchange, IO_CACHE *cache)
Definition: query_result.cc:204
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85