MySQL  8.0.16
Source Code Documentation
psi_file.h
Go to the documentation of this file.
1 /* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef MYSQL_PSI_FILE_H
24 #define MYSQL_PSI_FILE_H
25 
26 /**
27  @file include/mysql/psi/psi_file.h
28  Performance schema instrumentation interface.
29 
30  @defgroup psi_abi_file File Instrumentation (ABI)
31  @ingroup psi_abi
32  @{
33 */
34 
35 #include "my_macros.h"
36 #include "my_psi_config.h" // IWYU pragma: keep
37 #include "my_sharedlib.h"
39 
40 /**
41  @def PSI_FILE_VERSION_1
42  Performance Schema File Interface number for version 1.
43  This version is supported.
44 */
45 #define PSI_FILE_VERSION_1 1
46 
47 /**
48  @def PSI_CURRENT_FILE_VERSION
49  Performance Schema File Interface number for the most recent version.
50  The most current version is @c PSI_FILE_VERSION_1
51 */
52 #define PSI_CURRENT_FILE_VERSION 1
53 
54 /** Entry point for the performance schema interface. */
56  /**
57  ABI interface finder.
58  Calling this method with an interface version number returns either
59  an instance of the ABI for this version, or NULL.
60  @sa PSI_FILE_VERSION_1
61  @sa PSI_FILE_VERSION_2
62  @sa PSI_CURRENT_FILE_VERSION
63  */
64  void *(*get_interface)(int version);
65 };
66 
67 #ifdef HAVE_PSI_FILE_INTERFACE
68 
69 /**
70  Performance Schema file Interface, version 1.
71  @since PSI_FILE_VERSION_1
72 */
74  /** @sa register_file_v1_t. */
76  /** @sa create_file_v1_t. */
78  /** @sa get_thread_file_name_locker_v1_t. */
80  /** @sa get_thread_file_stream_locker_v1_t. */
82  /** @sa get_thread_file_descriptor_locker_v1_t. */
84  /** @sa start_file_open_wait_v1_t. */
86  /** @sa end_file_open_wait_v1_t. */
88  /** @sa end_file_open_wait_and_bind_to_descriptor_v1_t. */
91  /** @sa end_temp_file_open_wait_and_bind_to_descriptor_v1_t. */
94  /** @sa start_file_wait_v1_t. */
96  /** @sa end_file_wait_v1_t. */
98  /** @sa start_file_close_wait_v1_t. */
100  /** @sa end_file_close_wait_v1_t. */
102  /** @sa rename_file_close_wait_v1_t. */
104 };
105 
107 
109 
110 #endif /* HAVE_PSI_FILE_INTERFACE */
111 
112 /** @} (end of group psi_abi_file) */
113 
114 #endif /* MYSQL_PSI_FILE_H */
Some common macros.
end_file_close_wait_v1_t end_file_close_wait
Definition: psi_file.h:101
end_temp_file_open_wait_and_bind_to_descriptor_v1_t end_temp_file_open_wait_and_bind_to_descriptor
Definition: psi_file.h:93
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:290
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:255
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:265
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:281
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:70
start_file_wait_v1_t start_file_wait
Definition: psi_file.h:95
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:299
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:207
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:196
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:228
Functions related to handling of plugins and other dynamically loaded libraries.
get_thread_file_name_locker_v1_t get_thread_file_name_locker
Definition: psi_file.h:79
Performance schema instrumentation interface.
end_file_open_wait_v1_t end_file_open_wait
Definition: psi_file.h:87
start_file_close_wait_v1_t start_file_close_wait
Definition: psi_file.h:99
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:246
create_file_v1_t create_file
Definition: psi_file.h:77
end_file_wait_v1_t end_file_wait
Definition: psi_file.h:97
end_file_rename_wait_v1_t end_file_rename_wait
Definition: psi_file.h:103
get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker
Definition: psi_file.h:83
start_file_open_wait_v1_t start_file_open_wait
Definition: psi_file.h:85
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
register_file_v1_t register_file
Definition: psi_file.h:75
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:309
end_file_open_wait_and_bind_to_descriptor_v1_t end_file_open_wait_and_bind_to_descriptor
Definition: psi_file.h:90
const string version("\ersion\)
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:218
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:185
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:238
get_thread_file_stream_locker_v1_t get_thread_file_stream_locker
Definition: psi_file.h:81
void(* register_file_v1_t)(const char *category, struct PSI_file_info_v1 *info, int count)
File registration API.
Definition: psi_file_bits.h:174
Performance Schema file Interface, version 1.
Definition: psi_file.h:73
Entry point for the performance schema interface.
Definition: psi_file.h:55
MYSQL_PLUGIN_IMPORT PSI_file_service_t * psi_file_service
Definition: psi_noop.cc:408