From 3741804bec65a33d400af38dcc80700c8a668b81 Mon Sep 17 00:00:00 2001 From: arao Date: Mon, 22 Jun 2015 11:10:05 +0530 Subject: Logging: Porting the performance translator logs to new logging framework. Change-Id: Ie6aaf8d30bd4457bb73c48e23e6b1dea27598644 BUG: 1194640 Signed-off-by: arao Reviewed-on: http://review.gluster.org/9822 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- xlators/performance/io-cache/src/io-cache.h | 45 +++++++++++++++-------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'xlators/performance/io-cache/src/io-cache.h') diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h index c677bcd93f4..d7c823fe962 100644 --- a/xlators/performance/io-cache/src/io-cache.h +++ b/xlators/performance/io-cache/src/io-cache.h @@ -24,6 +24,7 @@ #include "hashfn.h" #include #include +#include "io-cache-messages.h" #define IOC_PAGE_SIZE (1024 * 128) /* 128KB */ #define IOC_CACHE_SIZE (32 * 1024 * 1024) @@ -219,64 +220,64 @@ ioc_frame_fill (ioc_page_t *page, call_frame_t *frame, off_t offset, #define ioc_inode_lock(ioc_inode) \ do { \ - gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE, \ - "locked inode(%p)", ioc_inode); \ + gf_msg_trace (ioc_inode->table->xl->name, 0, \ + "locked inode(%p)", ioc_inode); \ pthread_mutex_lock (&ioc_inode->inode_lock); \ } while (0) #define ioc_inode_unlock(ioc_inode) \ do { \ - gf_log (ioc_inode->table->xl->name, GF_LOG_TRACE, \ - "unlocked inode(%p)", ioc_inode); \ + gf_msg_trace (ioc_inode->table->xl->name, 0, \ + "unlocked inode(%p)", ioc_inode); \ pthread_mutex_unlock (&ioc_inode->inode_lock); \ } while (0) -#define ioc_table_lock(table) \ - do { \ - gf_log (table->xl->name, GF_LOG_TRACE, \ - "locked table(%p)", table); \ - pthread_mutex_lock (&table->table_lock); \ +#define ioc_table_lock(table) \ + do { \ + gf_msg_trace (table->xl->name, 0, \ + "locked table(%p)", table); \ + pthread_mutex_lock (&table->table_lock); \ } while (0) -#define ioc_table_unlock(table) \ - do { \ - gf_log (table->xl->name, GF_LOG_TRACE, \ - "unlocked table(%p)", table); \ - pthread_mutex_unlock (&table->table_lock); \ +#define ioc_table_unlock(table) \ + do { \ + gf_msg_trace (table->xl->name, 0, \ + "unlocked table(%p)", table); \ + pthread_mutex_unlock (&table->table_lock); \ } while (0) #define ioc_local_lock(local) \ do { \ - gf_log (local->inode->table->xl->name, GF_LOG_TRACE, \ - "locked local(%p)", local); \ + gf_msg_trace (local->inode->table->xl->name, 0, \ + "locked local(%p)", local); \ pthread_mutex_lock (&local->local_lock); \ } while (0) #define ioc_local_unlock(local) \ do { \ - gf_log (local->inode->table->xl->name, GF_LOG_TRACE, \ - "unlocked local(%p)", local); \ + gf_msg_trace (local->inode->table->xl->name, 0, \ + "unlocked local(%p)", local); \ pthread_mutex_unlock (&local->local_lock); \ } while (0) #define ioc_page_lock(page) \ do { \ - gf_log (page->inode->table->xl->name, GF_LOG_TRACE, \ - "locked page(%p)", page); \ + gf_msg_trace (page->inode->table->xl->name, 0, \ + "locked page(%p)", page); \ pthread_mutex_lock (&page->page_lock); \ } while (0) #define ioc_page_unlock(page) \ do { \ - gf_log (page->inode->table->xl->name, GF_LOG_TRACE, \ - "unlocked page(%p)", page); \ + gf_msg_trace (page->inode->table->xl->name, 0, \ + "unlocked page(%p)", page); \ pthread_mutex_unlock (&page->page_lock); \ } while (0) -- cgit