MySQL  8.0.26
Source Code Documentation
my_psi_config.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2001, 2021, Oracle and/or its affiliates.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License, version 2.0,
6  as published by the Free Software Foundation.
7 
8  This program is also distributed with certain software (including
9  but not limited to OpenSSL) that is licensed under separate terms,
10  as designated in a particular file or component or in included license
11  documentation. The authors of MySQL hereby grant you an additional
12  permission to link the program and your derivative works with the
13  separately licensed software that they have included with MySQL.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License, version 2.0, for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23 
24 #ifndef MY_PSI_CONFIG_INCLUDED
25 #define MY_PSI_CONFIG_INCLUDED
26 
27 /**
28  @file include/my_psi_config.h
29  Defines various enable/disable and HAVE_ macros related to the
30  performance schema instrumentation system, without pulling in
31  any system \#include files (which breaks the ABI checker).
32 
33 */
34 
35 #include "my_config.h"
36 
37 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
38 #define HAVE_PSI_INTERFACE
39 #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
40 
41 #ifdef HAVE_PSI_INTERFACE
42 
43 /**
44  @def DISABLE_PSI_MUTEX
45  Compiling option to disable the mutex instrumentation.
46  This option is mostly intended to be used during development,
47  when doing special builds with only a subset of the performance schema
48  instrumentation, for code analysis / profiling / performance tuning of a
49  specific instrumentation alone.
50  @sa DISABLE_PSI_COND
51  @sa DISABLE_PSI_DATA_LOCK
52  @sa DISABLE_PSI_ERROR
53  @sa DISABLE_PSI_FILE
54  @sa DISABLE_PSI_IDLE
55  @sa DISABLE_PSI_MEMORY
56  @sa DISABLE_PSI_METADATA
57  @sa DISABLE_PSI_PS
58  @sa DISABLE_PSI_RWLOCK
59  @sa DISABLE_PSI_SOCKET
60  @sa DISABLE_PSI_SP
61  @sa DISABLE_PSI_STAGE
62  @sa DISABLE_PSI_STATEMENT
63  @sa DISABLE_PSI_STATEMENT_DIGEST
64  @sa DISABLE_PSI_SYSTEM
65  @sa DISABLE_PSI_TABLE
66  @sa DISABLE_PSI_THREAD
67  @sa DISABLE_PSI_TRANSACTION
68  @sa DISABLE_TLS_CHANNEL
69  */
70 
71 #ifndef DISABLE_PSI_MUTEX
72 #define HAVE_PSI_MUTEX_INTERFACE
73 #endif /* DISABLE_PSI_MUTEX */
74 
75 /**
76  @def DISABLE_PSI_RWLOCK
77  Compiling option to disable the rwlock instrumentation.
78  @sa DISABLE_PSI_MUTEX
79 */
80 
81 #ifndef DISABLE_PSI_RWLOCK
82 #define HAVE_PSI_RWLOCK_INTERFACE
83 #endif /* DISABLE_PSI_RWLOCK */
84 
85 /**
86  @def DISABLE_PSI_COND
87  Compiling option to disable the cond instrumentation.
88  @sa DISABLE_PSI_MUTEX
89 */
90 
91 #ifndef DISABLE_PSI_COND
92 #define HAVE_PSI_COND_INTERFACE
93 #endif /* DISABLE_PSI_COND */
94 
95 /**
96  @def DISABLE_PSI_FILE
97  Compiling option to disable the file instrumentation.
98  @sa DISABLE_PSI_MUTEX
99 */
100 
101 #ifndef DISABLE_PSI_FILE
102 #define HAVE_PSI_FILE_INTERFACE
103 #endif /* DISABLE_PSI_FILE */
104 
105 /**
106  @def DISABLE_PSI_THREAD
107  Compiling option to disable the thread instrumentation.
108  @sa DISABLE_PSI_MUTEX
109 */
110 
111 #ifndef DISABLE_PSI_THREAD
112 #define HAVE_PSI_THREAD_INTERFACE
113 #endif /* DISABLE_PSI_THREAD */
114 
115 /**
116  @def DISABLE_PSI_TABLE
117  Compiling option to disable the table instrumentation.
118  @sa DISABLE_PSI_MUTEX
119 */
120 
121 #ifndef DISABLE_PSI_TABLE
122 #define HAVE_PSI_TABLE_INTERFACE
123 #endif /* DISABLE_PSI_TABLE */
124 
125 /**
126  @def DISABLE_PSI_STAGE
127  Compiling option to disable the stage instrumentation.
128  @sa DISABLE_PSI_MUTEX
129 */
130 
131 #ifndef DISABLE_PSI_STAGE
132 #define HAVE_PSI_STAGE_INTERFACE
133 #endif /* DISABLE_PSI_STAGE */
134 
135 /**
136  @def DISABLE_PSI_STATEMENT
137  Compiling option to disable the statement instrumentation.
138  @sa DISABLE_PSI_MUTEX
139 */
140 
141 #ifndef DISABLE_PSI_STATEMENT
142 #define HAVE_PSI_STATEMENT_INTERFACE
143 #endif /* DISABLE_PSI_STATEMENT */
144 
145 /**
146  @def DISABLE_PSI_SP
147  Compiling option to disable the stored program instrumentation.
148  @sa DISABLE_PSI_MUTEX
149 */
150 
151 #ifndef DISABLE_PSI_SP
152 #define HAVE_PSI_SP_INTERFACE
153 #endif /* DISABLE_PSI_SP */
154 
155 /**
156  @def DISABLE_PSI_PS
157  Compiling option to disable the prepared statement instrumentation.
158  @sa DISABLE_PSI_MUTEX
159 */
160 
161 #ifndef DISABLE_PSI_STATEMENT
162 #ifndef DISABLE_PSI_PS
163 #define HAVE_PSI_PS_INTERFACE
164 #endif /* DISABLE_PSI_PS */
165 #endif /* DISABLE_PSI_STATEMENT */
166 
167 /**
168  @def DISABLE_PSI_STATEMENT_DIGEST
169  Compiling option to disable the statement digest instrumentation.
170 */
171 
172 #ifndef DISABLE_PSI_STATEMENT
173 #ifndef DISABLE_PSI_STATEMENT_DIGEST
174 #define HAVE_PSI_STATEMENT_DIGEST_INTERFACE
175 #endif /* DISABLE_PSI_STATEMENT_DIGEST */
176 #endif /* DISABLE_PSI_STATEMENT */
177 
178 /**
179  @def DISABLE_PSI_TRANSACTION
180  Compiling option to disable the transaction instrumentation.
181  @sa DISABLE_PSI_MUTEX
182 */
183 
184 #ifndef DISABLE_PSI_TRANSACTION
185 #define HAVE_PSI_TRANSACTION_INTERFACE
186 #endif /* DISABLE_PSI_TRANSACTION */
187 
188 /**
189  @def DISABLE_PSI_SOCKET
190  Compiling option to disable the statement instrumentation.
191  @sa DISABLE_PSI_MUTEX
192 */
193 
194 #ifndef DISABLE_PSI_SOCKET
195 #define HAVE_PSI_SOCKET_INTERFACE
196 #endif /* DISABLE_PSI_SOCKET */
197 
198 /**
199  @def DISABLE_PSI_MEMORY
200  Compiling option to disable the memory instrumentation.
201  @sa DISABLE_PSI_MUTEX
202 */
203 
204 #ifndef DISABLE_PSI_MEMORY
205 #define HAVE_PSI_MEMORY_INTERFACE
206 #endif /* DISABLE_PSI_MEMORY */
207 
208 /**
209  @def DISABLE_PSI_ERROR
210  Compiling option to disable the error instrumentation.
211  @sa DISABLE_PSI_MUTEX
212 */
213 
214 #ifndef DISABLE_PSI_ERROR
215 #define HAVE_PSI_ERROR_INTERFACE
216 #endif /* DISABLE_PSI_ERROR */
217 
218 /**
219  @def DISABLE_PSI_IDLE
220  Compiling option to disable the idle instrumentation.
221  @sa DISABLE_PSI_MUTEX
222 */
223 
224 #ifndef DISABLE_PSI_IDLE
225 #define HAVE_PSI_IDLE_INTERFACE
226 #endif /* DISABLE_PSI_IDLE */
227 
228 /**
229  @def DISABLE_PSI_METADATA
230  Compiling option to disable the metadata instrumentation.
231  @sa DISABLE_PSI_MUTEX
232 */
233 
234 #ifndef DISABLE_PSI_METADATA
235 #define HAVE_PSI_METADATA_INTERFACE
236 #endif /* DISABLE_PSI_METADATA */
237 
238 /**
239  @def DISABLE_PSI_DATA_LOCK
240  Compiling option to disable the data lock instrumentation.
241  @sa DISABLE_PSI_MUTEX
242 */
243 
244 #ifndef DISABLE_PSI_DATA_LOCK
245 #define HAVE_PSI_DATA_LOCK_INTERFACE
246 #endif /* DISABLE_PSI_DATA_LOCK */
247 
248 /**
249  @def DISABLE_PSI_SYSTEM
250  Compiling option to disable the system instrumentation.
251  @sa DISABLE_PSI_MUTEX
252 */
253 
254 #ifndef DISABLE_PSI_SYSTEM
255 #define HAVE_PSI_SYSTEM_INTERFACE
256 #endif /* DISABLE_PSI_SYSTEM */
257 
258 /**
259  @def DISABLE_PSI_TLS_CHANNEL
260  Compiling option to disable TLS Channel instrumentation.
261 */
262 
263 #ifndef DISABLE_PSI_TLS_CHANNEL
264 #define HAVE_PSI_TLS_CHANNEL_INTERFACE
265 #endif // !DISABLE_PSI_TLS_CHANNEL
266 
267 #endif /* HAVE_PSI_INTERFACE */
268 
269 #endif // MY_PSI_CONFIG_INCLUDED