diff options
Diffstat (limited to 'storage/xtradb/include/sync0sync.h')
-rw-r--r-- | storage/xtradb/include/sync0sync.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/storage/xtradb/include/sync0sync.h b/storage/xtradb/include/sync0sync.h index 72cfbf61dd8..8112fff8a30 100644 --- a/storage/xtradb/include/sync0sync.h +++ b/storage/xtradb/include/sync0sync.h @@ -43,6 +43,9 @@ Created 9/5/1995 Heikki Tuuri #include "sync0arr.h" #include "ut0counter.h" +/** Enable semaphore request instrumentation */ +extern my_bool srv_instrument_semaphores; + #if defined(UNIV_DEBUG) && !defined(UNIV_HOTBACKUP) extern "C" my_bool timed_mutexes; #endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */ @@ -189,7 +192,7 @@ necessary only if the memory block containing it is freed. */ # endif/* UNIV_SYNC_DEBUG */ # else # define mutex_create(K, M, level) \ - pfs_mutex_create_func((K), (M), #M) + pfs_mutex_create_func((K), (M), __FILE__, __LINE__, #M) # endif /* UNIV_DEBUG */ # define mutex_enter(M) \ @@ -256,9 +259,9 @@ mutex_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ +#endif /* UNIV_DEBUG */ const char* cfile_name, /*!< in: file name where created */ ulint cline, /*!< in: file line where created */ -#endif /* UNIV_DEBUG */ const char* cmutex_name); /*!< in: mutex name */ /******************************************************************//** @@ -275,11 +278,11 @@ mutex_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ +#endif /* UNIV_DEBUG */ const char* cfile_name, /*!< in: file name where created */ ulint cline, /*!< in: file line where created */ -#endif /* UNIV_DEBUG */ const char* cmutex_name); /*!< in: mutex name */ /******************************************************************//** NOTE! Use the corresponding macro mutex_free(), not directly this function! @@ -402,9 +405,9 @@ pfs_mutex_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ +# endif /* UNIV_DEBUG */ const char* cfile_name, /*!< in: file name where created */ ulint cline, /*!< in: file line where created */ -# endif /* UNIV_DEBUG */ const char* cmutex_name); /******************************************************************//** NOTE! Please use the corresponding macro mutex_create(), not directly @@ -423,11 +426,11 @@ pfs_mutex_create_func( # ifdef UNIV_SYNC_DEBUG ulint level, /*!< in: level */ # endif /* UNIV_SYNC_DEBUG */ +# endif /* UNIV_DEBUG */ const char* cfile_name, /*!< in: file name where created */ ulint cline, /*!< in: file line where created */ -# endif /* UNIV_DEBUG */ const char* cmutex_name); /******************************************************************//** NOTE! Please use the corresponding macro mutex_enter(), not directly @@ -947,27 +950,28 @@ struct ib_mutex_t { Otherwise, this is 0. */ UT_LIST_NODE_T(ib_mutex_t) list; /*!< All allocated mutexes are put into a list. Pointers to the next and prev. */ + #ifdef UNIV_SYNC_DEBUG - const char* file_name; /*!< File where the mutex was locked */ - ulint line; /*!< Line where the mutex was locked */ - ulint level; /*!< Level in the global latching order */ + ulint level; /*!< Level in the global latching order */ #endif /* UNIV_SYNC_DEBUG */ -#ifdef UNIV_DEBUG - const char* cfile_name;/*!< File name where mutex created */ - ulint cline; /*!< Line where created */ -#endif + + const char* file_name; /*!< File where the mutex was locked */ + ulint line; /*!< Line where the mutex was locked */ + const char* cfile_name; /*!< File name where mutex created */ + ulint cline; /*!< Line where created */ ulong count_os_wait; /*!< count of os_wait */ + const char* cmutex_name; /*!< mutex name */ + os_thread_id_t thread_id; /*!< The thread id of the thread + which locked the mutex. */ + #ifdef UNIV_DEBUG /** Value of mutex_t::magic_n */ # define MUTEX_MAGIC_N 979585UL - - os_thread_id_t thread_id; /*!< The thread id of the thread - which locked the mutex. */ ulint magic_n; /*!< MUTEX_MAGIC_N */ ulint ib_mutex_type; /*!< 0=usual mutex, 1=rw_lock mutex */ #endif /* UNIV_DEBUG */ - const char* cmutex_name; /*!< mutex name */ + #ifdef UNIV_PFS_MUTEX struct PSI_mutex* pfs_psi; /*!< The performance schema instrumentation hook */ |