MySQL 8.3.0
Source Code Documentation
my_psi_config.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2001, 2023, 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 @sa DISABLE_PSI_SERVER_TELEMETRY_TRACES
70 @sa DISABLE_PSI_METRICS
71 */
72
73#ifndef DISABLE_PSI_MUTEX
74#define HAVE_PSI_MUTEX_INTERFACE
75#endif /* DISABLE_PSI_MUTEX */
76
77/**
78 @def DISABLE_PSI_RWLOCK
79 Compiling option to disable the rwlock instrumentation.
80 @sa DISABLE_PSI_MUTEX
81*/
82
83#ifndef DISABLE_PSI_RWLOCK
84#define HAVE_PSI_RWLOCK_INTERFACE
85#endif /* DISABLE_PSI_RWLOCK */
86
87/**
88 @def DISABLE_PSI_COND
89 Compiling option to disable the cond instrumentation.
90 @sa DISABLE_PSI_MUTEX
91*/
92
93#ifndef DISABLE_PSI_COND
94#define HAVE_PSI_COND_INTERFACE
95#endif /* DISABLE_PSI_COND */
96
97/**
98 @def DISABLE_PSI_FILE
99 Compiling option to disable the file instrumentation.
100 @sa DISABLE_PSI_MUTEX
101*/
102
103#ifndef DISABLE_PSI_FILE
104#define HAVE_PSI_FILE_INTERFACE
105#endif /* DISABLE_PSI_FILE */
106
107/**
108 @def DISABLE_PSI_THREAD
109 Compiling option to disable the thread instrumentation.
110 @sa DISABLE_PSI_MUTEX
111*/
112
113#ifndef DISABLE_PSI_THREAD
114#define HAVE_PSI_THREAD_INTERFACE
115#endif /* DISABLE_PSI_THREAD */
116
117/**
118 @def DISABLE_PSI_TABLE
119 Compiling option to disable the table instrumentation.
120 @sa DISABLE_PSI_MUTEX
121*/
122
123#ifndef DISABLE_PSI_TABLE
124#define HAVE_PSI_TABLE_INTERFACE
125#endif /* DISABLE_PSI_TABLE */
126
127/**
128 @def DISABLE_PSI_STAGE
129 Compiling option to disable the stage instrumentation.
130 @sa DISABLE_PSI_MUTEX
131*/
132
133#ifndef DISABLE_PSI_STAGE
134#define HAVE_PSI_STAGE_INTERFACE
135#endif /* DISABLE_PSI_STAGE */
136
137/**
138 @def DISABLE_PSI_STATEMENT
139 Compiling option to disable the statement instrumentation.
140 @sa DISABLE_PSI_MUTEX
141*/
142
143#ifndef DISABLE_PSI_STATEMENT
144#define HAVE_PSI_STATEMENT_INTERFACE
145#endif /* DISABLE_PSI_STATEMENT */
146
147/**
148 @def DISABLE_PSI_SP
149 Compiling option to disable the stored program instrumentation.
150 @sa DISABLE_PSI_MUTEX
151*/
152
153#ifndef DISABLE_PSI_SP
154#define HAVE_PSI_SP_INTERFACE
155#endif /* DISABLE_PSI_SP */
156
157/**
158 @def DISABLE_PSI_PS
159 Compiling option to disable the prepared statement instrumentation.
160 @sa DISABLE_PSI_MUTEX
161*/
162
163#ifndef DISABLE_PSI_STATEMENT
164#ifndef DISABLE_PSI_PS
165#define HAVE_PSI_PS_INTERFACE
166#endif /* DISABLE_PSI_PS */
167#endif /* DISABLE_PSI_STATEMENT */
168
169/**
170 @def DISABLE_PSI_STATEMENT_DIGEST
171 Compiling option to disable the statement digest instrumentation.
172*/
173
174#ifndef DISABLE_PSI_STATEMENT
175#ifndef DISABLE_PSI_STATEMENT_DIGEST
176#define HAVE_PSI_STATEMENT_DIGEST_INTERFACE
177#endif /* DISABLE_PSI_STATEMENT_DIGEST */
178#endif /* DISABLE_PSI_STATEMENT */
179
180/**
181 @def DISABLE_PSI_TRANSACTION
182 Compiling option to disable the transaction instrumentation.
183 @sa DISABLE_PSI_MUTEX
184*/
185
186#ifndef DISABLE_PSI_TRANSACTION
187#define HAVE_PSI_TRANSACTION_INTERFACE
188#endif /* DISABLE_PSI_TRANSACTION */
189
190/**
191 @def DISABLE_PSI_SOCKET
192 Compiling option to disable the statement instrumentation.
193 @sa DISABLE_PSI_MUTEX
194*/
195
196#ifndef DISABLE_PSI_SOCKET
197#define HAVE_PSI_SOCKET_INTERFACE
198#endif /* DISABLE_PSI_SOCKET */
199
200/**
201 @def DISABLE_PSI_MEMORY
202 Compiling option to disable the memory instrumentation.
203 @sa DISABLE_PSI_MUTEX
204*/
205
206#ifndef DISABLE_PSI_MEMORY
207#define HAVE_PSI_MEMORY_INTERFACE
208#endif /* DISABLE_PSI_MEMORY */
209
210/**
211 @def DISABLE_PSI_ERROR
212 Compiling option to disable the error instrumentation.
213 @sa DISABLE_PSI_MUTEX
214*/
215
216#ifndef DISABLE_PSI_ERROR
217#define HAVE_PSI_ERROR_INTERFACE
218#endif /* DISABLE_PSI_ERROR */
219
220/**
221 @def DISABLE_PSI_IDLE
222 Compiling option to disable the idle instrumentation.
223 @sa DISABLE_PSI_MUTEX
224*/
225
226#ifndef DISABLE_PSI_IDLE
227#define HAVE_PSI_IDLE_INTERFACE
228#endif /* DISABLE_PSI_IDLE */
229
230/**
231 @def DISABLE_PSI_METADATA
232 Compiling option to disable the metadata instrumentation.
233 @sa DISABLE_PSI_MUTEX
234*/
235
236#ifndef DISABLE_PSI_METADATA
237#define HAVE_PSI_METADATA_INTERFACE
238#endif /* DISABLE_PSI_METADATA */
239
240/**
241 @def DISABLE_PSI_DATA_LOCK
242 Compiling option to disable the data lock instrumentation.
243 @sa DISABLE_PSI_MUTEX
244*/
245
246#ifndef DISABLE_PSI_DATA_LOCK
247#define HAVE_PSI_DATA_LOCK_INTERFACE
248#endif /* DISABLE_PSI_DATA_LOCK */
249
250/**
251 @def DISABLE_PSI_SYSTEM
252 Compiling option to disable the system instrumentation.
253 @sa DISABLE_PSI_MUTEX
254*/
255
256#ifndef DISABLE_PSI_SYSTEM
257#define HAVE_PSI_SYSTEM_INTERFACE
258#endif /* DISABLE_PSI_SYSTEM */
259
260/**
261 @def DISABLE_PSI_TLS_CHANNEL
262 Compiling option to disable TLS Channel instrumentation.
263 @sa DISABLE_PSI_MUTEX
264*/
265
266#ifndef DISABLE_PSI_TLS_CHANNEL
267#define HAVE_PSI_TLS_CHANNEL_INTERFACE
268#endif // !DISABLE_PSI_TLS_CHANNEL
269
270/**
271 @def DISABLE_PSI_SERVER_TELEMETRY_TRACES
272 Compiling option to disable MySQL Server Telemetry traces instrumentation.
273 @sa DISABLE_PSI_MUTEX
274*/
275
276#ifndef DISABLE_PSI_SERVER_TELEMETRY_TRACES
277#define HAVE_PSI_SERVER_TELEMETRY_TRACES_INTERFACE
278#endif // !DISABLE_PSI_SERVER_TELEMETRY_TRACES
279
280/**
281 @def DISABLE_PSI_METRICS
282 Compiling option to disable MySQL Server Telemetry metrics instrumentation.
283 @sa DISABLE_PSI_MUTEX
284*/
285
286#ifndef DISABLE_PSI_METRICS
287#define HAVE_PSI_METRICS_INTERFACE
288#endif // !DISABLE_PSI_METRICS
289
290#endif /* HAVE_PSI_INTERFACE */
291
292#endif // MY_PSI_CONFIG_INCLUDED