MySQL  8.0.27
Source Code Documentation
psi_stage.h
Go to the documentation of this file.
1 /* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
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_STAGE_H
24 #define MYSQL_PSI_STAGE_H
25 
26 /**
27  @file include/mysql/psi/psi_stage.h
28  Performance schema instrumentation interface.
29 
30  @defgroup psi_abi_stage Stage Instrumentation (ABI)
31  @ingroup psi_abi
32  @{
33 */
34 
35 #include "my_inttypes.h"
36 #include "my_macros.h"
37 
38 /* HAVE_PSI_*_INTERFACE */
39 #include "my_psi_config.h" // IWYU pragma: keep
40 
41 #include "my_sharedlib.h"
43 
44 /** Entry point for the performance schema interface. */
46  /**
47  ABI interface finder.
48  Calling this method with an interface version number returns either
49  an instance of the ABI for this version, or NULL.
50  @sa PSI_STAGE_VERSION_1
51  @sa PSI_STAGE_VERSION_2
52  @sa PSI_CURRENT_STAGE_VERSION
53  */
54  void *(*get_interface)(int version);
55 };
56 
57 #ifdef HAVE_PSI_STAGE_INTERFACE
58 
59 /**
60  Performance Schema Stage Interface, version 1.
61  @since PSI_STAGE_VERSION_1
62 */
64  /** @sa register_stage_v1_t. */
66  /** @sa start_stage_v1_t. */
68  /** @sa get_current_stage_progress_v1_t. */
70  /** @sa end_stage_v1_t. */
72 };
73 
75 
77 
78 #endif /* HAVE_PSI_STAGE_INTERFACE */
79 
80 /** @} (end of group psi_abi_stage) */
81 
82 #endif /* MYSQL_PSI_FILE_H */
PSI_stage_progress_v1 *(* get_current_stage_progress_v1_t)(void)
Get the current stage progress.
Definition: psi_stage_bits.h:112
MYSQL_PLUGIN_IMPORT PSI_stage_service_t * psi_stage_service
Definition: psi_noop.cc:609
void(* register_stage_v1_t)(const char *category, struct PSI_stage_info_v1 **info, int count)
Stage registration API.
Definition: psi_stage_bits.h:94
PSI_stage_progress_v1 *(* start_stage_v1_t)(PSI_stage_key key, const char *src_file, int src_line)
Start a new stage, and implicitly end the previous stage.
Definition: psi_stage_bits.h:104
void(* end_stage_v1_t)(void)
End the current stage.
Definition: psi_stage_bits.h:115
Some integer typedefs for easier portability.
Some common macros.
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
Functions related to handling of plugins and other dynamically loaded libraries.
#define MYSQL_PLUGIN_IMPORT
Definition: my_sharedlib.h:70
Performance schema instrumentation interface.
required uint64 version
Definition: replication_group_member_actions.proto:40
Entry point for the performance schema interface.
Definition: psi_stage.h:45
Performance Schema Stage Interface, version 1.
Definition: psi_stage.h:63
start_stage_v1_t start_stage
Definition: psi_stage.h:67
end_stage_v1_t end_stage
Definition: psi_stage.h:71
register_stage_v1_t register_stage
Definition: psi_stage.h:65
get_current_stage_progress_v1_t get_current_stage_progress
Definition: psi_stage.h:69