Commit e4a4ec39 authored by jyang's avatar jyang

Register newly added purge thread to performance schema tracking.

rb://289, approved by Marko
parent 63d38a48
...@@ -312,7 +312,8 @@ static PSI_thread_info all_innodb_threads[] = { ...@@ -312,7 +312,8 @@ static PSI_thread_info all_innodb_threads[] = {
{&srv_lock_timeout_thread_key, "srv_lock_timeout_thread", 0}, {&srv_lock_timeout_thread_key, "srv_lock_timeout_thread", 0},
{&srv_error_monitor_thread_key, "srv_error_monitor_thread", 0}, {&srv_error_monitor_thread_key, "srv_error_monitor_thread", 0},
{&srv_monitor_thread_key, "srv_monitor_thread", 0}, {&srv_monitor_thread_key, "srv_monitor_thread", 0},
{&srv_master_thread_key, "srv_master_thread", 0} {&srv_master_thread_key, "srv_master_thread", 0},
{&srv_purge_thread_key, "srv_purge_thread", 0}
}; };
# endif /* UNIV_PFS_THREAD */ # endif /* UNIV_PFS_THREAD */
......
...@@ -328,6 +328,7 @@ extern mysql_pfs_key_t srv_lock_timeout_thread_key; ...@@ -328,6 +328,7 @@ extern mysql_pfs_key_t srv_lock_timeout_thread_key;
extern mysql_pfs_key_t srv_error_monitor_thread_key; extern mysql_pfs_key_t srv_error_monitor_thread_key;
extern mysql_pfs_key_t srv_monitor_thread_key; extern mysql_pfs_key_t srv_monitor_thread_key;
extern mysql_pfs_key_t srv_master_thread_key; extern mysql_pfs_key_t srv_master_thread_key;
extern mysql_pfs_key_t srv_purge_thread_key;
/* This macro register the current thread and its key with performance /* This macro register the current thread and its key with performance
schema */ schema */
......
...@@ -2965,6 +2965,10 @@ srv_purge_thread( ...@@ -2965,6 +2965,10 @@ srv_purge_thread(
ut_a(srv_n_purge_threads == 1); ut_a(srv_n_purge_threads == 1);
#ifdef UNIV_PFS_THREAD
pfs_register_thread(srv_purge_thread_key);
#endif /* UNIV_PFS_THREAD */
#ifdef UNIV_DEBUG_THREAD_CREATION #ifdef UNIV_DEBUG_THREAD_CREATION
fprintf(stderr, "InnoDB: Purge thread running, id %lu\n", fprintf(stderr, "InnoDB: Purge thread running, id %lu\n",
os_thread_pf(os_thread_get_curr_id())); os_thread_pf(os_thread_get_curr_id()));
......
...@@ -149,6 +149,7 @@ UNIV_INTERN mysql_pfs_key_t srv_lock_timeout_thread_key; ...@@ -149,6 +149,7 @@ UNIV_INTERN mysql_pfs_key_t srv_lock_timeout_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_error_monitor_thread_key; UNIV_INTERN mysql_pfs_key_t srv_error_monitor_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_monitor_thread_key; UNIV_INTERN mysql_pfs_key_t srv_monitor_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_master_thread_key; UNIV_INTERN mysql_pfs_key_t srv_master_thread_key;
UNIV_INTERN mysql_pfs_key_t srv_purge_thread_key;
#endif /* UNIV_PFS_THREAD */ #endif /* UNIV_PFS_THREAD */
#ifdef UNIV_PFS_MUTEX #ifdef UNIV_PFS_MUTEX
......
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