MySQL  8.0.17
Source Code Documentation
psi_base.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_BASE_H
24 #define MYSQL_PSI_BASE_H
25 
26 #include "my_psi_config.h"
27 
28 /**
29  @file include/mysql/psi/psi_base.h
30  Performance schema instrumentation interface.
31 
32  @defgroup instrumentation_interface Instrumentation Interface
33  @ingroup performance_schema
34  @{
35 
36  @defgroup psi_api Instrumentation Programming Interface
37  @{
38  @}
39 
40  @defgroup psi_abi Instrumentation Binary Interface
41  @{
42 */
43 
44 #define PSI_INSTRUMENT_ME 0
45 
46 #define PSI_DOCUMENT_ME ""
47 
48 #define PSI_NOT_INSTRUMENTED 0
49 
50 /**
51  Singleton flag.
52  This flag indicate that an instrumentation point is a singleton.
53 */
54 #define PSI_FLAG_SINGLETON (1 << 0)
55 
56 /**
57  Mutable flag.
58  This flag indicate that an instrumentation point is a general placeholder,
59  that can mutate into a more specific instrumentation point.
60 */
61 #define PSI_FLAG_MUTABLE (1 << 1)
62 
63 /**
64  Per Thread flag.
65  This flag indicates the instrumented object is per thread.
66  Reserved for future use.
67 */
68 #define PSI_FLAG_THREAD (1 << 2)
69 
70 /**
71  Stage progress flag.
72  This flag apply to the stage instruments only.
73  It indicates the instrumentation provides progress data.
74 */
75 #define PSI_FLAG_STAGE_PROGRESS (1 << 3)
76 
77 /**
78  Shared Exclusive flag.
79  Indicates that rwlock support the shared exclusive state.
80 */
81 #define PSI_FLAG_RWLOCK_SX (1 << 4)
82 
83 /**
84  Transferable flag.
85  This flag indicate that an instrumented object can
86  be created by a thread and destroyed by another thread.
87 */
88 #define PSI_FLAG_TRANSFER (1 << 5)
89 
90 /**
91  User flag.
92  This flag indicate that an instrumented object exists on a
93  user or foreground thread. If not set, then the object
94  exists on a system or background thread.
95 */
96 #define PSI_FLAG_USER (1 << 6)
97 
98 /**
99  Global stat only flag.
100  This flag indicates statistics for the instrument
101  are aggregated globally only.
102  No per thread / account / user / host aggregations
103  are available.
104 */
105 #define PSI_FLAG_ONLY_GLOBAL_STAT (1 << 7)
106 
107 /**
108  Priority lock flag.
109  Indicates that rwlock support the priority lock scheduling.
110 */
111 #define PSI_FLAG_RWLOCK_PR (1 << 8)
112 
113 #define PSI_VOLATILITY_UNKNOWN 0
114 #define PSI_VOLATILITY_PERMANENT 1
115 #define PSI_VOLATILITY_PROVISIONING 2
116 #define PSI_VOLATILITY_DDL 3
117 #define PSI_VOLATILITY_CACHE 4
118 #define PSI_VOLATILITY_SESSION 5
119 #define PSI_VOLATILITY_TRANSACTION 6
120 #define PSI_VOLATILITY_QUERY 7
121 #define PSI_VOLATILITY_INTRA_QUERY 8
122 
123 #define PSI_COUNT_VOLATILITY 9
124 
127 };
128 
129 /**
130  @} (end of group psi_abi)
131  @} (end of group instrumentation_interface)
132 */
133 
134 #endif /* MYSQL_PSI_BASE_H */
Definition: psi_base.h:125
int m_placeholder
Definition: psi_base.h:126
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...