MySQL  8.0.17
Source Code Documentation
psi_idle.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_IDLE_H
24 #define MYSQL_PSI_IDLE_H
25 
26 /**
27  @file include/mysql/psi/psi_idle.h
28  Performance schema instrumentation interface.
29 
30  @defgroup psi_abi_idle Idle Instrumentation (ABI)
31  @ingroup psi_abi
32  @{
33 */
34 
35 #include "my_inttypes.h"
36 #include "my_macros.h"
37 #include "my_psi_config.h" // IWYU pragma: keep
38 #include "my_sharedlib.h"
40 
41 /**
42  @def PSI_IDLE_VERSION_1
43  Performance Schema Idle Interface number for version 1.
44  This version is supported.
45 */
46 #define PSI_IDLE_VERSION_1 1
47 
48 /**
49  @def PSI_CURRENT_IDLE_VERSION
50  Performance Schema Idle Interface number for the most recent version.
51  The most current version is @c PSI_IDLE_VERSION_1
52 */
53 #define PSI_CURRENT_IDLE_VERSION 1
54 
55 /** Entry point for the performance schema interface. */
57  /**
58  ABI interface finder.
59  Calling this method with an interface version number returns either
60  an instance of the ABI for this version, or NULL.
61  @sa PSI_IDLE_VERSION_1
62  @sa PSI_IDLE_VERSION_2
63  @sa PSI_CURRENT_IDLE_VERSION
64  */
65  void *(*get_interface)(int version);
66 };
68 
69 #ifdef HAVE_PSI_IDLE_INTERFACE
70 
71 /**
72  Performance Schema Idle Interface, version 1.
73  @since PSI_IDLE_VERSION_1
74 */
76  /** @sa start_idle_wait_v1_t. */
78  /** @sa end_idle_wait_v1_t. */
80 };
81 
83 
85 
86 #endif /* HAVE_PSI_IDLE_INTERFACE */
87 
88 /** @} (end of group psi_abi_idle) */
89 
90 #endif /* MYSQL_PSI_IDLE_H */
Some common macros.
void(* end_idle_wait_v1_t)(struct PSI_idle_locker *locker)
Record an idle instrumentation wait end event.
Definition: psi_idle_bits.h:80
start_idle_wait_v1_t start_idle_wait
Definition: psi_idle.h:77
Some integer typedefs for easier portability.
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:70
Performance schema instrumentation interface.
Functions related to handling of plugins and other dynamically loaded libraries.
Entry point for the performance schema interface.
Definition: psi_idle.h:56
end_idle_wait_v1_t end_idle_wait
Definition: psi_idle.h:79
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
Performance Schema Idle Interface, version 1.
Definition: psi_idle.h:75
MYSQL_PLUGIN_IMPORT PSI_idle_service_t * psi_idle_service
Definition: psi_noop.cc:567
const string version("\ersion\)
struct PSI_idle_locker *(* start_idle_wait_v1_t)(struct PSI_idle_locker_state_v1 *state, const char *src_file, unsigned int src_line)
Record an idle instrumentation wait start event.
Definition: psi_idle_bits.h:72