Commit 91d39f63 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: Remove unused mutex keys

parent b15224c7
......@@ -522,7 +522,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
PSI_KEY(ibuf_mutex),
PSI_KEY(ibuf_pessimistic_insert_mutex),
PSI_KEY(log_sys_mutex),
PSI_KEY(mutex_list_mutex),
PSI_KEY(page_zip_stat_per_index_mutex),
PSI_KEY(purge_sys_pq_mutex),
PSI_KEY(recv_sys_mutex),
......@@ -533,7 +532,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
PSI_KEY(rw_lock_debug_mutex),
# endif /* UNIV_DEBUG */
PSI_KEY(rw_lock_list_mutex),
PSI_KEY(rw_lock_mutex),
PSI_KEY(srv_innodb_monitor_mutex),
PSI_KEY(srv_misc_tmpfile_mutex),
PSI_KEY(srv_monitor_file_mutex),
......@@ -544,9 +542,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
PSI_KEY(lock_wait_mutex),
PSI_KEY(trx_mutex),
PSI_KEY(srv_threads_mutex),
# ifndef PFS_SKIP_EVENT_MUTEX
PSI_KEY(event_mutex),
# endif /* PFS_SKIP_EVENT_MUTEX */
PSI_KEY(rtr_active_mutex),
PSI_KEY(rtr_match_mutex),
PSI_KEY(rtr_path_mutex),
......
......@@ -7177,32 +7177,7 @@ i_s_innodb_mutexes_fill_table(
/* deny access to user without PROCESS_ACL privilege */
if (check_global_access(thd, PROCESS_ACL)) {
DBUG_RETURN(0);
}
// mutex_enter(&mutex_list_mutex);
#ifdef JAN_TODO_FIXME
ib_mutex_t* mutex;
for (mutex = UT_LIST_GET_FIRST(os_mutex_list); mutex != NULL;
mutex = UT_LIST_GET_NEXT(list, mutex)) {
if (mutex->count_os_wait == 0) {
continue;
}
OK(field_store_string(fields[MUTEXES_NAME], mutex->cmutex_name));
OK(field_store_string(fields[MUTEXES_CREATE_FILE],
innobase_basename(mutex->cfile_name)));
OK(fields[MUTEXES_CREATE_LINE]->store(lock->cline, true));
fields[MUTEXES_CREATE_LINE]->set_notnull();
OK(fields[MUTEXES_OS_WAITS]->store(lock->count_os_wait, true));
fields[MUTEXES_OS_WAITS]->set_notnull();
OK(schema_table_store_record(thd, tables->table));
}
mutex_exit(&mutex_list_mutex);
#endif /* JAN_TODO_FIXME */
{
} else {
struct Locking
{
Locking() { mutex_enter(&rw_lock_list_mutex); }
......
......@@ -43,9 +43,6 @@ Created 9/5/1995 Heikki Tuuri
instrumentation due to their large number of instances. */
# define PFS_SKIP_BUFFER_MUTEX_RWLOCK
/* By default, event->mutex will also be excluded from instrumentation */
# define PFS_SKIP_EVENT_MUTEX
#endif /* UNIV_PFS_MUTEX || UNIV_PFS_RWLOCK */
#ifdef UNIV_PFS_MUTEX
......@@ -65,7 +62,6 @@ extern mysql_pfs_key_t ibuf_pessimistic_insert_mutex_key;
extern mysql_pfs_key_t log_sys_mutex_key;
extern mysql_pfs_key_t log_cmdq_mutex_key;
extern mysql_pfs_key_t log_flush_order_mutex_key;
extern mysql_pfs_key_t mutex_list_mutex_key;
extern mysql_pfs_key_t recalc_pool_mutex_key;
extern mysql_pfs_key_t page_cleaner_mutex_key;
extern mysql_pfs_key_t purge_sys_pq_mutex_key;
......@@ -81,7 +77,6 @@ extern mysql_pfs_key_t page_zip_stat_per_index_mutex_key;
extern mysql_pfs_key_t rw_lock_debug_mutex_key;
# endif /* UNIV_DEBUG */
extern mysql_pfs_key_t rw_lock_list_mutex_key;
extern mysql_pfs_key_t rw_lock_mutex_key;
extern mysql_pfs_key_t srv_innodb_monitor_mutex_key;
extern mysql_pfs_key_t srv_misc_tmpfile_mutex_key;
extern mysql_pfs_key_t srv_monitor_file_mutex_key;
......@@ -93,8 +88,6 @@ extern mysql_pfs_key_t lock_mutex_key;
extern mysql_pfs_key_t lock_wait_mutex_key;
extern mysql_pfs_key_t trx_sys_mutex_key;
extern mysql_pfs_key_t srv_threads_mutex_key;
extern mysql_pfs_key_t event_mutex_key;
extern mysql_pfs_key_t event_manager_mutex_key;
extern mysql_pfs_key_t sync_array_mutex_key;
extern mysql_pfs_key_t thread_mutex_key;
extern mysql_pfs_key_t row_drop_list_mutex_key;
......
......@@ -186,8 +186,6 @@ enum latch_level_t {
RW_LOCK_X,
RW_LOCK_NOT_LOCKED,
SYNC_MONITOR_MUTEX,
SYNC_ANY_LATCH,
SYNC_DOUBLEWRITE,
......@@ -274,13 +272,12 @@ enum latch_level_t {
};
/** Each latch has an ID. This id is used for creating the latch and to look
up its meta-data. See sync0debug.c. */
up its meta-data. See sync0debug.cc. */
enum latch_id_t {
LATCH_ID_NONE = 0,
LATCH_ID_BUF_POOL,
LATCH_ID_DICT_FOREIGN_ERR,
LATCH_ID_DICT_SYS,
LATCH_ID_FILE_FORMAT_MAX,
LATCH_ID_FIL_SYSTEM,
LATCH_ID_FLUSH_LIST,
LATCH_ID_FTS_BG_THREADS,
......@@ -292,8 +289,6 @@ enum latch_id_t {
LATCH_ID_IBUF_PESSIMISTIC_INSERT,
LATCH_ID_LOG_SYS,
LATCH_ID_LOG_FLUSH_ORDER,
LATCH_ID_LIST,
LATCH_ID_MUTEX_LIST,
LATCH_ID_PAGE_CLEANER,
LATCH_ID_PURGE_SYS_PQ,
LATCH_ID_RECALC_POOL,
......@@ -306,7 +301,6 @@ enum latch_id_t {
LATCH_ID_RTR_MATCH_MUTEX,
LATCH_ID_RTR_PATH_MUTEX,
LATCH_ID_RW_LOCK_LIST,
LATCH_ID_RW_LOCK_MUTEX,
LATCH_ID_SRV_INNODB_MONITOR,
LATCH_ID_SRV_MISC_TMPFILE,
LATCH_ID_SRV_MONITOR_FILE,
......@@ -317,11 +311,8 @@ enum latch_id_t {
LATCH_ID_LOCK_SYS,
LATCH_ID_LOCK_SYS_WAIT,
LATCH_ID_TRX_SYS,
LATCH_ID_SRV_SYS,
LATCH_ID_SRV_SYS_TASKS,
LATCH_ID_PAGE_ZIP_STAT_PER_INDEX,
LATCH_ID_EVENT_MANAGER,
LATCH_ID_EVENT_MUTEX,
LATCH_ID_SYNC_ARRAY_MUTEX,
LATCH_ID_ROW_DROP_LIST,
LATCH_ID_INDEX_ONLINE_LOG,
......@@ -330,7 +321,6 @@ enum latch_id_t {
LATCH_ID_BUF_BLOCK_LOCK,
LATCH_ID_BUF_BLOCK_DEBUG,
LATCH_ID_DICT_OPERATION,
LATCH_ID_CHECKPOINT,
LATCH_ID_FIL_SPACE,
LATCH_ID_FTS_CACHE,
LATCH_ID_FTS_CACHE_INIT,
......@@ -339,10 +329,6 @@ enum latch_id_t {
LATCH_ID_IBUF_INDEX_TREE,
LATCH_ID_INDEX_TREE,
LATCH_ID_DICT_TABLE_STATS,
LATCH_ID_HASH_TABLE_RW_LOCK,
LATCH_ID_BUF_CHUNK_MAP_LATCH,
LATCH_ID_SYNC_DEBUG_MUTEX,
LATCH_ID_SCRUB_STAT_MUTEX,
LATCH_ID_DEFRAGMENT_MUTEX,
LATCH_ID_BTR_DEFRAGMENT_MUTEX,
LATCH_ID_FIL_CRYPT_STAT_MUTEX,
......@@ -350,8 +336,7 @@ enum latch_id_t {
LATCH_ID_FIL_CRYPT_THREADS_MUTEX,
LATCH_ID_RW_TRX_HASH_ELEMENT,
LATCH_ID_READ_VIEW,
LATCH_ID_TEST_MUTEX,
LATCH_ID_MAX = LATCH_ID_TEST_MUTEX
LATCH_ID_MAX = LATCH_ID_READ_VIEW
};
#ifndef UNIV_INNOCHECKSUM
......
......@@ -452,7 +452,6 @@ LatchDebug::LatchDebug()
LEVEL_MAP_INSERT(RW_LOCK_S);
LEVEL_MAP_INSERT(RW_LOCK_X);
LEVEL_MAP_INSERT(RW_LOCK_NOT_LOCKED);
LEVEL_MAP_INSERT(SYNC_MONITOR_MUTEX);
LEVEL_MAP_INSERT(SYNC_ANY_LATCH);
LEVEL_MAP_INSERT(SYNC_DOUBLEWRITE);
LEVEL_MAP_INSERT(SYNC_BUF_FLUSH_LIST);
......@@ -737,7 +736,6 @@ LatchDebug::check_order(
/* Fall through */
case SYNC_MONITOR_MUTEX:
case SYNC_RECV:
case SYNC_FTS_BG_THREADS:
case SYNC_WORK_QUEUE:
......@@ -1244,7 +1242,7 @@ void
sync_latch_meta_init()
UNIV_NOTHROW
{
latch_meta.resize(LATCH_ID_MAX);
latch_meta.resize(LATCH_ID_MAX + 1);
/* The latches should be ordered on latch_id_t. So that we can
index directly into the vector to update and fetch meta-data. */
......@@ -1283,8 +1281,6 @@ sync_latch_meta_init()
LATCH_ADD_MUTEX(LOG_FLUSH_ORDER, SYNC_LOG_FLUSH_ORDER,
log_flush_order_mutex_key);
LATCH_ADD_MUTEX(MUTEX_LIST, SYNC_NO_ORDER_CHECK, mutex_list_mutex_key);
LATCH_ADD_MUTEX(PAGE_CLEANER, SYNC_PAGE_CLEANER,
page_cleaner_mutex_key);
......@@ -1321,8 +1317,6 @@ sync_latch_meta_init()
LATCH_ADD_MUTEX(RW_LOCK_LIST, SYNC_NO_ORDER_CHECK,
rw_lock_list_mutex_key);
LATCH_ADD_MUTEX(RW_LOCK_MUTEX, SYNC_NO_ORDER_CHECK, rw_lock_mutex_key);
LATCH_ADD_MUTEX(SRV_INNODB_MONITOR, SYNC_NO_ORDER_CHECK,
srv_innodb_monitor_mutex_key);
......@@ -1353,16 +1347,6 @@ sync_latch_meta_init()
LATCH_ADD_MUTEX(PAGE_ZIP_STAT_PER_INDEX, SYNC_ANY_LATCH,
page_zip_stat_per_index_mutex_key);
#ifndef PFS_SKIP_EVENT_MUTEX
LATCH_ADD_MUTEX(EVENT_MANAGER, SYNC_NO_ORDER_CHECK,
event_manager_mutex_key);
#else
LATCH_ADD_MUTEX(EVENT_MANAGER, SYNC_NO_ORDER_CHECK,
PFS_NOT_INSTRUMENTED);
#endif /* !PFS_SKIP_EVENT_MUTEX */
LATCH_ADD_MUTEX(EVENT_MUTEX, SYNC_NO_ORDER_CHECK, event_mutex_key);
LATCH_ADD_MUTEX(SYNC_ARRAY_MUTEX, SYNC_NO_ORDER_CHECK,
sync_array_mutex_key);
......@@ -1408,12 +1392,7 @@ sync_latch_meta_init()
LATCH_ADD_RWLOCK(DICT_TABLE_STATS, SYNC_INDEX_TREE,
dict_table_stats_key);
LATCH_ADD_MUTEX(SYNC_DEBUG_MUTEX, SYNC_NO_ORDER_CHECK,
PFS_NOT_INSTRUMENTED);
/* JAN: TODO: Add PFS instrumentation */
LATCH_ADD_MUTEX(SCRUB_STAT_MUTEX, SYNC_NO_ORDER_CHECK,
PFS_NOT_INSTRUMENTED);
LATCH_ADD_MUTEX(DEFRAGMENT_MUTEX, SYNC_NO_ORDER_CHECK,
PFS_NOT_INSTRUMENTED);
LATCH_ADD_MUTEX(BTR_DEFRAGMENT_MUTEX, SYNC_NO_ORDER_CHECK,
......
......@@ -51,7 +51,6 @@ mysql_pfs_key_t ibuf_pessimistic_insert_mutex_key;
mysql_pfs_key_t log_sys_mutex_key;
mysql_pfs_key_t log_cmdq_mutex_key;
mysql_pfs_key_t log_flush_order_mutex_key;
mysql_pfs_key_t mutex_list_mutex_key;
mysql_pfs_key_t recalc_pool_mutex_key;
mysql_pfs_key_t page_cleaner_mutex_key;
mysql_pfs_key_t purge_sys_pq_mutex_key;
......@@ -67,7 +66,6 @@ mysql_pfs_key_t rtr_active_mutex_key;
mysql_pfs_key_t rtr_match_mutex_key;
mysql_pfs_key_t rtr_path_mutex_key;
mysql_pfs_key_t rw_lock_list_mutex_key;
mysql_pfs_key_t rw_lock_mutex_key;
mysql_pfs_key_t srv_innodb_monitor_mutex_key;
mysql_pfs_key_t srv_misc_tmpfile_mutex_key;
mysql_pfs_key_t srv_monitor_file_mutex_key;
......@@ -79,8 +77,6 @@ mysql_pfs_key_t lock_mutex_key;
mysql_pfs_key_t lock_wait_mutex_key;
mysql_pfs_key_t trx_sys_mutex_key;
mysql_pfs_key_t srv_threads_mutex_key;
mysql_pfs_key_t event_mutex_key;
mysql_pfs_key_t event_manager_mutex_key;
mysql_pfs_key_t sync_array_mutex_key;
mysql_pfs_key_t thread_mutex_key;
mysql_pfs_key_t row_drop_list_mutex_key;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment