mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 23:54:31 +02:00
MDEV-33978 P_S.THREADS is not showing all server threads
page_encrypt_thread_key: The key for fil_crypt_thread().
All other InnoDB threads should already have been registered for
performance_schema ever since
commit a2f510fccf
This commit is contained in:
parent
dffe3d1fb2
commit
746471b8d8
5 changed files with 13 additions and 0 deletions
|
|
@ -80,6 +80,10 @@ static uint n_fil_crypt_iops_allocated = 0;
|
|||
|
||||
#define DEBUG_KEYROTATION_THROTTLING 0
|
||||
|
||||
#ifdef UNIV_PFS_THREAD
|
||||
mysql_pfs_key_t page_encrypt_thread_key;
|
||||
#endif /* UNIV_PFS_THREAD */
|
||||
|
||||
/** Statistics variables */
|
||||
static fil_crypt_stat_t crypt_stat;
|
||||
static ib_mutex_t crypt_stat_mutex;
|
||||
|
|
@ -2145,6 +2149,10 @@ extern "C" UNIV_INTERN
|
|||
os_thread_ret_t
|
||||
DECLARE_THREAD(fil_crypt_thread)(void*)
|
||||
{
|
||||
my_thread_init();
|
||||
#ifdef UNIV_PFS_THREAD
|
||||
pfs_register_thread(page_encrypt_thread_key);
|
||||
#endif /* UNIV_PFS_THREAD */
|
||||
mutex_enter(&fil_crypt_threads_mutex);
|
||||
uint thread_no = srv_n_fil_crypt_threads_started;
|
||||
srv_n_fil_crypt_threads_started++;
|
||||
|
|
@ -2242,6 +2250,7 @@ DECLARE_THREAD(fil_crypt_thread)(void*)
|
|||
/* We count the number of threads in os_thread_exit(). A created
|
||||
thread should always use that to exit and not use return() to exit. */
|
||||
|
||||
my_thread_end();
|
||||
return os_thread_exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -579,6 +579,7 @@ performance schema instrumented if "UNIV_PFS_THREAD"
|
|||
is defined */
|
||||
static PSI_thread_info all_innodb_threads[] = {
|
||||
PSI_KEY(page_cleaner_thread),
|
||||
PSI_KEY(page_encrypt_thread),
|
||||
PSI_KEY(trx_rollback_clean_thread),
|
||||
PSI_KEY(thread_pool_thread)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -469,6 +469,7 @@ extern ulong srv_buf_dump_status_frequency;
|
|||
|
||||
# ifdef UNIV_PFS_THREAD
|
||||
extern mysql_pfs_key_t page_cleaner_thread_key;
|
||||
extern mysql_pfs_key_t page_encrypt_thread_key;
|
||||
extern mysql_pfs_key_t trx_rollback_clean_thread_key;
|
||||
extern mysql_pfs_key_t thread_pool_thread_key;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue