MySQL  8.0.19
Source Code Documentation
sync0sync.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3 Copyright (c) 1995, 2019, Oracle and/or its affiliates. All Rights Reserved.
4 Copyright (c) 2008, Google Inc.
5 Copyright (c) 2012, Facebook Inc.
6 
7 Portions of this file contain modifications contributed and copyrighted by
8 Google, Inc. Those modifications are gratefully acknowledged and are described
9 briefly in the InnoDB documentation. The contributions by Google are
10 incorporated with their permission, and subject to the conditions contained in
11 the file COPYING.Google.
12 
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License, version 2.0, as published by the
15 Free Software Foundation.
16 
17 This program is also distributed with certain software (including but not
18 limited to OpenSSL) that is licensed under separate terms, as designated in a
19 particular file or component or in included license documentation. The authors
20 of MySQL hereby grant you an additional permission to link the program and
21 your derivative works with the separately licensed software that they have
22 included with MySQL.
23 
24 This program is distributed in the hope that it will be useful, but WITHOUT
25 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
27 for more details.
28 
29 You should have received a copy of the GNU General Public License along with
30 this program; if not, write to the Free Software Foundation, Inc.,
31 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 
33 *****************************************************************************/
34 
35 /** @file include/sync0sync.h
36  Mutex, the basic synchronization primitive
37 
38  Created 9/5/1995 Heikki Tuuri
39  *******************************************************/
40 
41 #ifndef sync0sync_h
42 #define sync0sync_h
43 
44 #include "univ.i"
45 #include "ut0counter.h"
46 
47 #ifdef HAVE_PSI_INTERFACE
48 
49 /** Define for performance schema registration key */
51  public:
52  /** Default Constructor */
54 
55  /** Constructor */
56  mysql_pfs_key_t(unsigned int val) : m_value(val) {}
57 
58  /** Retreive the count.
59  @return number of keys defined */
60  static int get_count() { return s_count; }
61 
62  /* Key value. */
63  unsigned int m_value;
64 
65  private:
66  /** To keep count of number of PS keys defined. */
67  static unsigned int s_count;
68 };
69 
70 #endif /* HAVE_PFS_INTERFACE */
71 
72 #if defined UNIV_PFS_MUTEX || defined UNIV_PFS_RWLOCK
73 
74 /* By default, buffer mutexes and rwlocks will be excluded from
75 instrumentation due to their large number of instances. */
76 #define PFS_SKIP_BUFFER_MUTEX_RWLOCK
77 
78 /* By default, event->mutex will also be excluded from instrumentation */
79 #define PFS_SKIP_EVENT_MUTEX
80 
81 #endif /* UNIV_PFS_MUTEX || UNIV_PFS_RWLOCK */
82 
83 #ifdef UNIV_PFS_MUTEX
84 /* Key defines to register InnoDB mutexes with performance schema */
87 #ifndef PFS_SKIP_BUFFER_MUTEX_RWLOCK
88 extern mysql_pfs_key_t buffer_block_mutex_key;
89 #endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */
142 #ifdef UNIV_DEBUG
144 #endif /* UNIV_DEBUG */
150 #ifdef UNIV_DEBUG
152 #endif /* UNIV_DEBUG */
164 #ifndef PFS_SKIP_EVENT_MUTEX
165 extern mysql_pfs_key_t event_mutex_key;
166 extern mysql_pfs_key_t event_manager_mutex_key;
167 #endif /* !PFS_SKIP_EVENT_MUTEX */
177 #endif /* UNIV_PFS_MUTEX */
178 
179 #ifdef UNIV_PFS_RWLOCK
180 /* Following are rwlock keys used to register with MySQL
181 performance schema */
183 #ifndef PFS_SKIP_BUFFER_MUTEX_RWLOCK
184 extern mysql_pfs_key_t buf_block_lock_key;
185 #endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */
186 #ifdef UNIV_DEBUG
188 #endif /* UNIV_DEBUG */
202 #endif /* UNIV_PFS_RWLOCK */
203 
204 #ifdef HAVE_PSI_INTERFACE
205 /* There are mutexes/rwlocks that we want to exclude from instrumentation
206 even if their corresponding performance schema define is set. And this
207 PFS_NOT_INSTRUMENTED is used as the key value to identify those objects that
208 would be excluded from instrumentation.*/
210 #endif /* HAVE_PFS_INTERFACE */
211 
212 /** Prints info of the sync system.
213 @param[in] file where to print */
214 void sync_print(FILE *file);
215 
216 #endif /* !sync0sync_h */
trx_sys_mutex_key
mysql_pfs_key_t trx_sys_mutex_key
page_zip_stat_per_index_mutex_key
mysql_pfs_key_t page_zip_stat_per_index_mutex_key
page_sys_arch_mutex_key
mysql_pfs_key_t page_sys_arch_mutex_key
rw_lock_mutex_key
mysql_pfs_key_t rw_lock_mutex_key
trx_sys_rseg_mutex_key
mysql_pfs_key_t trx_sys_rseg_mutex_key
autoinc_mutex_key
mysql_pfs_key_t autoinc_mutex_key
log_closer_mutex_key
mysql_pfs_key_t log_closer_mutex_key
dict_sys_mutex_key
mysql_pfs_key_t dict_sys_mutex_key
buf_pool_flush_state_mutex_key
mysql_pfs_key_t buf_pool_flush_state_mutex_key
fil_space_latch_key
mysql_pfs_key_t fil_space_latch_key
master_key_id_mutex_key
mysql_pfs_key_t master_key_id_mutex_key
undo_space_rseg_mutex_key
mysql_pfs_key_t undo_space_rseg_mutex_key
clone_sys_mutex_key
mysql_pfs_key_t clone_sys_mutex_key
log_sys_arch_mutex_key
mysql_pfs_key_t log_sys_arch_mutex_key
sync_print
void sync_print(FILE *file)
Prints info of the sync system.
Definition: sync0sync.cc:219
fts_optimize_mutex_key
mysql_pfs_key_t fts_optimize_mutex_key
temp_space_rseg_mutex_key
mysql_pfs_key_t temp_space_rseg_mutex_key
row_drop_list_mutex_key
mysql_pfs_key_t row_drop_list_mutex_key
srv_monitor_file_mutex_key
mysql_pfs_key_t srv_monitor_file_mutex_key
recv_writer_mutex_key
mysql_pfs_key_t recv_writer_mutex_key
index_tree_rw_lock_key
mysql_pfs_key_t index_tree_rw_lock_key
log_flush_notifier_mutex_key
mysql_pfs_key_t log_flush_notifier_mutex_key
rtr_match_mutex_key
mysql_pfs_key_t rtr_match_mutex_key
clone_snapshot_mutex_key
mysql_pfs_key_t clone_snapshot_mutex_key
btr_search_latch_key
mysql_pfs_key_t btr_search_latch_key
lock_wait_mutex_key
mysql_pfs_key_t lock_wait_mutex_key
log_flusher_mutex_key
mysql_pfs_key_t log_flusher_mutex_key
mysql_pfs_key_t::s_count
static unsigned int s_count
To keep count of number of PS keys defined.
Definition: sync0sync.h:67
autoinc_persisted_mutex_key
mysql_pfs_key_t autoinc_persisted_mutex_key
trx_pool_mutex_key
mysql_pfs_key_t trx_pool_mutex_key
trx_sys_rw_lock_key
mysql_pfs_key_t trx_sys_rw_lock_key
srv_innodb_monitor_mutex_key
mysql_pfs_key_t srv_innodb_monitor_mutex_key
fil_system_mutex_key
mysql_pfs_key_t fil_system_mutex_key
buf_pool_chunks_mutex_key
mysql_pfs_key_t buf_pool_chunks_mutex_key
mysql_pfs_key_t::mysql_pfs_key_t
mysql_pfs_key_t(unsigned int val)
Constructor.
Definition: sync0sync.h:56
buf_dblwr_mutex_key
mysql_pfs_key_t buf_dblwr_mutex_key
log_sn_lock_key
mysql_pfs_key_t log_sn_lock_key
dict_operation_lock_key
mysql_pfs_key_t dict_operation_lock_key
fts_pll_tokenize_mutex_key
mysql_pfs_key_t fts_pll_tokenize_mutex_key
page_cleaner_mutex_key
mysql_pfs_key_t page_cleaner_mutex_key
dict_persist_dirty_tables_mutex_key
mysql_pfs_key_t dict_persist_dirty_tables_mutex_key
ibuf_pessimistic_insert_mutex_key
mysql_pfs_key_t ibuf_pessimistic_insert_mutex_key
sync_thread_mutex_key
mysql_pfs_key_t sync_thread_mutex_key
log_writer_mutex_key
mysql_pfs_key_t log_writer_mutex_key
zip_pad_mutex_key
mysql_pfs_key_t zip_pad_mutex_key
ibuf_mutex_key
mysql_pfs_key_t ibuf_mutex_key
fts_doc_id_mutex_key
mysql_pfs_key_t fts_doc_id_mutex_key
mysql_pfs_key_t::get_count
static int get_count()
Retreive the count.
Definition: sync0sync.h:60
page_sys_arch_client_mutex_key
mysql_pfs_key_t page_sys_arch_client_mutex_key
buf_pool_LRU_list_mutex_key
mysql_pfs_key_t buf_pool_LRU_list_mutex_key
temp_pool_manager_mutex_key
mysql_pfs_key_t temp_pool_manager_mutex_key
trx_mutex_key
mysql_pfs_key_t trx_mutex_key
page_sys_arch_oper_mutex_key
mysql_pfs_key_t page_sys_arch_oper_mutex_key
buf_pool_zip_free_mutex_key
mysql_pfs_key_t buf_pool_zip_free_mutex_key
rsegs_lock_key
mysql_pfs_key_t rsegs_lock_key
srv_sys_mutex_key
mysql_pfs_key_t srv_sys_mutex_key
index_online_log_key
mysql_pfs_key_t index_online_log_key
parallel_read_mutex_key
mysql_pfs_key_t parallel_read_mutex_key
trx_i_s_cache_lock_key
mysql_pfs_key_t trx_i_s_cache_lock_key
ibuf_bitmap_mutex_key
mysql_pfs_key_t ibuf_bitmap_mutex_key
mysql_pfs_key_t
Define for performance schema registration key.
Definition: sync0sync.h:50
parser_mutex_key
mysql_pfs_key_t parser_mutex_key
consts::FILE
const std::string FILE("FILE")
trx_pool_manager_mutex_key
mysql_pfs_key_t trx_pool_manager_mutex_key
PFS_NOT_INSTRUMENTED
mysql_pfs_key_t PFS_NOT_INSTRUMENTED
mutex_list_mutex_key
mysql_pfs_key_t mutex_list_mutex_key
clone_task_mutex_key
mysql_pfs_key_t clone_task_mutex_key
srv_threads_mutex_key
mysql_pfs_key_t srv_threads_mutex_key
lock_mutex_key
mysql_pfs_key_t lock_mutex_key
fts_cache_init_rw_lock_key
mysql_pfs_key_t fts_cache_init_rw_lock_key
buf_pool_zip_mutex_key
mysql_pfs_key_t buf_pool_zip_mutex_key
buf_pool_free_list_mutex_key
mysql_pfs_key_t buf_pool_free_list_mutex_key
buf_pool_zip_hash_mutex_key
mysql_pfs_key_t buf_pool_zip_hash_mutex_key
fts_cache_rw_lock_key
mysql_pfs_key_t fts_cache_rw_lock_key
trx_purge_latch_key
mysql_pfs_key_t trx_purge_latch_key
dict_table_mutex_key
mysql_pfs_key_t dict_table_mutex_key
cache_last_read_mutex_key
mysql_pfs_key_t cache_last_read_mutex_key
rtr_active_mutex_key
mysql_pfs_key_t rtr_active_mutex_key
trx_undo_mutex_key
mysql_pfs_key_t trx_undo_mutex_key
purge_sys_pq_mutex_key
mysql_pfs_key_t purge_sys_pq_mutex_key
log_checkpointer_mutex_key
mysql_pfs_key_t log_checkpointer_mutex_key
recv_sys_mutex_key
mysql_pfs_key_t recv_sys_mutex_key
flush_list_mutex_key
mysql_pfs_key_t flush_list_mutex_key
fts_delete_mutex_key
mysql_pfs_key_t fts_delete_mutex_key
sync_array_mutex_key
mysql_pfs_key_t sync_array_mutex_key
fts_bg_threads_mutex_key
mysql_pfs_key_t fts_bg_threads_mutex_key
hash_table_mutex_key
mysql_pfs_key_t hash_table_mutex_key
undo_spaces_lock_key
mysql_pfs_key_t undo_spaces_lock_key
rw_lock_debug_mutex_key
mysql_pfs_key_t rw_lock_debug_mutex_key
dict_table_stats_key
mysql_pfs_key_t dict_table_stats_key
log_limits_mutex_key
mysql_pfs_key_t log_limits_mutex_key
recalc_pool_mutex_key
mysql_pfs_key_t recalc_pool_mutex_key
rw_lock_list_mutex_key
mysql_pfs_key_t rw_lock_list_mutex_key
hash_table_locks_key
mysql_pfs_key_t hash_table_locks_key
mysql_pfs_key_t::mysql_pfs_key_t
mysql_pfs_key_t()
Default Constructor.
Definition: sync0sync.h:53
buf_block_debug_latch_key
mysql_pfs_key_t buf_block_debug_latch_key
rtr_ssn_mutex_key
mysql_pfs_key_t rtr_ssn_mutex_key
dict_foreign_err_mutex_key
mysql_pfs_key_t dict_foreign_err_mutex_key
file_open_mutex_key
mysql_pfs_key_t file_open_mutex_key
srv_misc_tmpfile_mutex_key
mysql_pfs_key_t srv_misc_tmpfile_mutex_key
ut0counter.h
log_cmdq_mutex_key
mysql_pfs_key_t log_cmdq_mutex_key
mysql_pfs_key_t::m_value
unsigned int m_value
Definition: sync0sync.h:63
log_write_notifier_mutex_key
mysql_pfs_key_t log_write_notifier_mutex_key
rtr_path_mutex_key
mysql_pfs_key_t rtr_path_mutex_key
lock_free_hash_mutex_key
mysql_pfs_key_t lock_free_hash_mutex_key