1 /* Copyright (c) 2012, 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 Foundation,
21   51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
22 
23 #ifndef PFS_STAGE_PROVIDER_H
24 #define PFS_STAGE_PROVIDER_H
25 
26 /**
27   @file include/pfs_stage_provider.h
28   Performance schema instrumentation (declarations).
29 */
30 
31 #ifdef HAVE_PSI_STAGE_INTERFACE
32 #ifdef MYSQL_SERVER
33 #ifndef EMBEDDED_LIBRARY
34 #ifndef MYSQL_DYNAMIC_PLUGIN
35 
36 #include "mysql/psi/psi.h"
37 
38 #define PSI_STAGE_CALL(M) pfs_ ## M ## _v1
39 
40 C_MODE_START
41 
42 void pfs_register_stage_v1(const char *category,
43                            PSI_stage_info_v1 **info_array,
44                            int count);
45 
46 PSI_stage_progress* pfs_start_stage_v1(PSI_stage_key key, const char *src_file, int src_line);
47 PSI_stage_progress* pfs_get_current_stage_progress_v1();
48 
49 void pfs_end_stage_v1();
50 
51 C_MODE_END
52 
53 #endif /* MYSQL_DYNAMIC_PLUGIN */
54 #endif /* EMBEDDED_LIBRARY */
55 #endif /* MYSQL_SERVER */
56 #endif /* HAVE_PSI_STAGE_INTERFACE */
57 
58 #endif
59 
60