1 | /* Copyright (c) 2017, Percona and/or its affiliates. All rights reserved. |
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 | #pragma once |
16 | |
17 | #ifndef _rdb_psi_h_ |
18 | #define _rdb_psi_h_ |
19 | |
20 | /* MySQL header files */ |
21 | #include <my_global.h> |
22 | #include <my_pthread.h> |
23 | #include <mysql/psi/psi.h> |
24 | |
25 | /* MyRocks header files */ |
26 | #include "./rdb_utils.h" |
27 | |
28 | namespace myrocks { |
29 | |
30 | /* |
31 | The following is needed as an argument for mysql_stage_register, |
32 | irrespectively of whether we're compiling with P_S or not. |
33 | */ |
34 | extern my_core::PSI_stage_info stage_waiting_on_row_lock; |
35 | |
36 | #ifdef HAVE_PSI_INTERFACE |
37 | extern my_core::PSI_thread_key rdb_background_psi_thread_key, |
38 | rdb_drop_idx_psi_thread_key; |
39 | |
40 | extern my_core::PSI_mutex_key rdb_psi_open_tbls_mutex_key, |
41 | rdb_signal_bg_psi_mutex_key, rdb_signal_drop_idx_psi_mutex_key, |
42 | rdb_collation_data_mutex_key, rdb_mem_cmp_space_mutex_key, |
43 | key_mutex_tx_list, rdb_sysvars_psi_mutex_key, rdb_cfm_mutex_key, |
44 | rdb_sst_commit_key; |
45 | |
46 | extern my_core::PSI_rwlock_key key_rwlock_collation_exception_list, |
47 | key_rwlock_read_free_rpl_tables, key_rwlock_skip_unique_check_tables; |
48 | |
49 | extern my_core::PSI_cond_key rdb_signal_bg_psi_cond_key, |
50 | rdb_signal_drop_idx_psi_cond_key; |
51 | #endif // HAVE_PSI_INTERFACE |
52 | |
53 | void init_rocksdb_psi_keys(); |
54 | |
55 | } // namespace myrocks |
56 | |
57 | #endif // _rdb_psi_h_ |
58 | |