MySQL  8.0.27
Source Code Documentation
debug_lock_order.h
Go to the documentation of this file.
1 /* Copyright (c) 2014, 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 as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 #ifndef DEBUG_LOCK_ORDER_H
17 #define DEBUG_LOCK_ORDER_H
18 
19 #include "my_sys.h"
20 
21 struct PSI_bootstrap;
22 
24  const char *m_name;
25  const char *m_operation;
26  int m_flags;
27 };
28 
30  char *m_from_name;
31  char *m_from_state;
32  char *m_to_name;
35  int m_flags;
36  char *m_constraint;
37  char *m_comment;
38 };
39 
40 #define LO_FLAG_TRACE 1 << 0
41 #define LO_FLAG_DEBUG 1 << 1
42 #define LO_FLAG_LOOP 1 << 2
43 #define LO_FLAG_IGNORED 1 << 3
44 #define LO_FLAG_BIND 1 << 4
45 #define LO_FLAG_UNFAIR 1 << 5
46 /* Micro arcs, generated from macro declarations. */
47 #define LO_FLAG_MICRO 1 << 6
48 
50  bool m_enabled;
51  char *m_out_dir;
65 };
66 
68 
69 int LO_init(
70  struct LO_global_param *param, PSI_thread_bootstrap **thread_bootstrap,
71  PSI_mutex_bootstrap **mutex_bootstrap,
72  PSI_rwlock_bootstrap **rwlock_bootstrap,
73  PSI_cond_bootstrap **cond_bootstrap, PSI_file_bootstrap **file_bootstrap,
74  PSI_socket_bootstrap **socket_bootstrap,
75  PSI_table_bootstrap **table_bootstrap, PSI_mdl_bootstrap **mdl_bootstrap,
76  PSI_idle_bootstrap **idle_bootstrap, PSI_stage_bootstrap **stage_bootstrap,
77  PSI_statement_bootstrap **statement_bootstrap,
78  PSI_transaction_bootstrap **transaction_bootstrap,
79  PSI_memory_bootstrap **memory_bootstrap);
80 
81 void LO_activate();
82 
83 class LO_graph;
86 
87 void LO_dump();
88 
89 void LO_cleanup();
90 
91 /*
92  Helper for the performance schema.
93 */
95 
96 #endif
Definition: debug_lock_order.cc:1990
PSI_thread * LO_get_chain_thread(PSI_thread *psi)
Definition: debug_lock_order.cc:8164
int LO_init(struct LO_global_param *param, PSI_thread_bootstrap **thread_bootstrap, PSI_mutex_bootstrap **mutex_bootstrap, PSI_rwlock_bootstrap **rwlock_bootstrap, PSI_cond_bootstrap **cond_bootstrap, PSI_file_bootstrap **file_bootstrap, PSI_socket_bootstrap **socket_bootstrap, PSI_table_bootstrap **table_bootstrap, PSI_mdl_bootstrap **mdl_bootstrap, PSI_idle_bootstrap **idle_bootstrap, PSI_stage_bootstrap **stage_bootstrap, PSI_statement_bootstrap **statement_bootstrap, PSI_transaction_bootstrap **transaction_bootstrap, PSI_memory_bootstrap **memory_bootstrap)
Definition: debug_lock_order.cc:7923
void LO_add_node_properties(LO_graph *g, const LO_node_properties *node)
Definition: debug_lock_order.cc:8076
void LO_cleanup()
Definition: debug_lock_order.cc:8116
void LO_activate()
Definition: debug_lock_order.cc:8112
void LO_add_authorised_arc(LO_graph *g, const LO_authorised_arc *arc)
Definition: debug_lock_order.cc:8072
LO_global_param lo_param
Definition: debug_lock_order.cc:7919
void LO_dump()
Definition: debug_lock_order.cc:8114
struct PSI_thread PSI_thread
Definition: psi_thread_bits.h:81
Common header for many mysys elements.
Definition: debug_lock_order.h:29
char * m_from_state
Definition: debug_lock_order.h:31
char * m_to_name
Definition: debug_lock_order.h:32
int m_flags
Definition: debug_lock_order.h:35
char * m_to_operation
Definition: debug_lock_order.h:34
char * m_from_name
Definition: debug_lock_order.h:30
char * m_comment
Definition: debug_lock_order.h:37
char * m_constraint
Definition: debug_lock_order.h:36
bool m_op_recursive
Definition: debug_lock_order.h:33
Definition: debug_lock_order.h:49
bool m_trace_missing_key
Definition: debug_lock_order.h:63
bool m_debug_loop
Definition: debug_lock_order.h:56
char * m_dependencies_1
Definition: debug_lock_order.h:52
bool m_debug_missing_key
Definition: debug_lock_order.h:64
bool m_trace_missing_arc
Definition: debug_lock_order.h:57
bool m_trace_bad_unlock
Definition: debug_lock_order.h:61
bool m_debug_missing_unlock
Definition: debug_lock_order.h:60
bool m_debug_bad_unlock
Definition: debug_lock_order.h:62
bool m_trace_loop
Definition: debug_lock_order.h:55
bool m_trace_missing_unlock
Definition: debug_lock_order.h:59
bool m_print_txt
Definition: debug_lock_order.h:54
bool m_debug_missing_arc
Definition: debug_lock_order.h:58
bool m_enabled
Definition: debug_lock_order.h:50
char * m_out_dir
Definition: debug_lock_order.h:51
char * m_dependencies_2
Definition: debug_lock_order.h:53
Definition: debug_lock_order.h:23
const char * m_operation
Definition: debug_lock_order.h:25
const char * m_name
Definition: debug_lock_order.h:24
int m_flags
Definition: debug_lock_order.h:26
Entry point for the performance schema interface.
Definition: psi_cond.h:45
Entry point for the performance schema interface.
Definition: psi_file.h:65
Entry point for the performance schema interface.
Definition: psi_idle.h:59
Entry point for the performance schema interface.
Definition: psi_mdl.h:67
Entry point for the performance schema interface.
Definition: psi_memory.h:84
Entry point for the performance schema interface.
Definition: psi_mutex.h:45
Entry point for the performance schema interface.
Definition: psi_rwlock.h:52
Entry point for the performance schema interface.
Definition: psi_socket.h:51
Entry point for the performance schema interface.
Definition: psi_stage.h:45
Entry point for the performance schema interface.
Definition: psi_statement.h:45
Entry point for the performance schema interface.
Definition: psi_table.h:59
Entry point for the performance schema interface.
Definition: psi_thread.h:87
Entry point for the performance schema interface.
Definition: psi_transaction.h:59