diff options
author | Mikael Ronstrom <mikael@dator8> | 2010-10-28 18:27:25 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@dator8> | 2010-10-28 18:27:25 +0200 |
commit | c0854c3e1746f81abcba27505c7f8adc09ff2c45 (patch) | |
tree | 1e3dd78b44bfef3d1a6bde907ae3c82067dbe686 /sql/scheduler.cc | |
parent | 8fbf0e8817d7dc0f21e0ea33ed391e2260d7f463 (diff) | |
download | mariadb-git-c0854c3e1746f81abcba27505c7f8adc09ff2c45.tar.gz |
Added reporting of fsync to THD wait interface
Diffstat (limited to 'sql/scheduler.cc')
-rw-r--r-- | sql/scheduler.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sql/scheduler.cc b/sql/scheduler.cc index 57e0f86f158..4c56e360e0e 100644 --- a/sql/scheduler.cc +++ b/sql/scheduler.cc @@ -80,12 +80,21 @@ scheduler_functions *thread_scheduler= NULL; */ /**@{*/ -static void scheduler_wait_begin(void) { +static void scheduler_wait_lock_begin(void) { MYSQL_CALLBACK(thread_scheduler, thd_wait_begin, (current_thd, THD_WAIT_TABLE_LOCK)); } -static void scheduler_wait_end(void) { +static void scheduler_wait_lock_end(void) { + MYSQL_CALLBACK(thread_scheduler, thd_wait_end, (current_thd)); +} + +static void scheduler_wait_sync_begin(void) { + MYSQL_CALLBACK(thread_scheduler, + thd_wait_begin, (current_thd, THD_WAIT_TABLE_LOCK)); +} + +static void scheduler_wait_sync_end(void) { MYSQL_CALLBACK(thread_scheduler, thd_wait_end, (current_thd)); } /**@}*/ @@ -98,7 +107,10 @@ static void scheduler_wait_end(void) { mysqld.cc, so this init function will always be called. */ static void scheduler_init() { - thr_set_lock_wait_callback(scheduler_wait_begin, scheduler_wait_end); + thr_set_lock_wait_callback(scheduler_wait_lock_begin, + scheduler_wait_lock_end); + thr_set_sync_wait_callback(scheduler_wait_sync_begin, + scheduler_wait_sync_end); } /* |