MySQL  8.0.26
Source Code Documentation
pfs_metadata_provider.h
Go to the documentation of this file.
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
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef PFS_METADATA_PROVIDER_H
24 #define PFS_METADATA_PROVIDER_H
25 
26 /* HAVE_PSI_*_INTERFACE */
27 #include "my_psi_config.h" // IWYU pragma: keep
28 
29 /**
30  @file include/pfs_metadata_provider.h
31  Performance schema instrumentation (declarations).
32 */
33 
34 #ifdef HAVE_PSI_METADATA_INTERFACE
35 #if defined(MYSQL_SERVER) || defined(PFS_DIRECT_CALL)
36 #ifndef MYSQL_DYNAMIC_PLUGIN
37 #ifndef WITH_LOCK_ORDER
38 
39 #include <sys/types.h>
40 
41 #include "my_inttypes.h"
42 #include "my_macros.h"
43 #include "mysql/psi/psi_mdl.h"
44 
45 struct MDL_key;
46 
47 #define PSI_METADATA_CALL(M) pfs_##M##_vc
48 
50  void *identity, const MDL_key *key, opaque_mdl_type mdl_type,
51  opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status,
52  const char *src_file, uint src_line);
53 
55  opaque_mdl_status mdl_status);
56 
58  opaque_mdl_duration mdl_duration);
59 
61 
63  struct PSI_metadata_locker_state_v1 *state, struct PSI_metadata_lock *mdl,
64  const char *src_file, uint src_line);
65 
66 void pfs_end_metadata_wait_vc(struct PSI_metadata_locker *locker, int rc);
67 
68 #endif /* WITH_LOCK_ORDER */
69 #endif /* MYSQL_DYNAMIC_PLUGIN */
70 #endif /* MYSQL_SERVER || PFS_DIRECT_CALL */
71 #endif /* HAVE_PSI_METADATA_INTERFACE */
72 
73 #endif
int opaque_mdl_duration
Definition: psi_mdl_bits.h:41
struct PSI_metadata_locker PSI_metadata_locker
Definition: psi_mdl_bits.h:58
int opaque_mdl_status
Definition: psi_mdl_bits.h:44
int opaque_mdl_type
Definition: psi_mdl_bits.h:35
struct PSI_metadata_lock PSI_metadata_lock
Definition: psi_mdl_bits.h:51
static uchar key[100]
Definition: mi_test2.cc:58
Some integer typedefs for easier portability.
Some common macros.
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:78
std::decay_t< T > identity
Definition: string_view.h:164
void pfs_destroy_metadata_lock_vc(PSI_metadata_lock *lock)
Definition: pfs.cc:7870
struct PSI_metadata_locker * pfs_start_metadata_wait_vc(struct PSI_metadata_locker_state_v1 *state, struct PSI_metadata_lock *mdl, const char *src_file, uint src_line)
Definition: pfs.cc:7876
void pfs_end_metadata_wait_vc(struct PSI_metadata_locker *locker, int rc)
Definition: pfs.cc:7959
void pfs_set_metadata_lock_status_vc(PSI_metadata_lock *lock, opaque_mdl_status mdl_status)
Definition: pfs.cc:7856
PSI_metadata_lock * pfs_create_metadata_lock_vc(void *identity, const MDL_key *key, opaque_mdl_type mdl_type, opaque_mdl_duration mdl_duration, opaque_mdl_status mdl_status, const char *src_file, uint src_line)
Definition: pfs.cc:7827
void pfs_set_metadata_lock_duration_vc(PSI_metadata_lock *lock, opaque_mdl_duration mdl_duration)
Definition: pfs.cc:7863
Performance schema instrumentation interface.
Metadata lock object key.
Definition: mdl.h:364
State data storage for start_metadata_wait_v1_t.
Definition: psi_mdl_bits.h:69
unsigned int uint
Definition: uca-dump.cc:29