[PATCH 2/6] libmultipath: Remove debugging code from lock.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are better tools available to trace mutex lock and unlock
activity than the macros in this header file, e.g.
valgrind --tool=drd --trace-mutex=yes multipathd -d
Hence remove the debugging macros.

Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
---
 libmultipath/lock.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/libmultipath/lock.h b/libmultipath/lock.h
index c569f01..71baf10 100644
--- a/libmultipath/lock.h
+++ b/libmultipath/lock.h
@@ -12,21 +12,9 @@ struct mutex_lock {
 	int depth;
 };
 
-#ifdef LCKDBG
-#define lock(a) \
-		fprintf(stderr, "%s:%s(%i) lock %p depth: %d (%ld)\n", __FILE__, __FUNCTION__, __LINE__, a.mutex, a.depth, pthread_self()); \
-		a.depth++; pthread_mutex_lock(a.mutex)
-#define unlock(a) \
-		fprintf(stderr, "%s:%s(%i) unlock %p depth: %d (%ld)\n", __FILE__, __FUNCTION__, __LINE__, a.mutex, a.depth, pthread_self()); \
-	a.depth--; pthread_mutex_unlock(a.mutex)
-#define lock_cleanup_pop(a) \
-		fprintf(stderr, "%s:%s(%i) unlock %p depth: %d (%ld)\n", __FILE__, __FUNCTION__, __LINE__, a.mutex, a.depth, pthread_self()); \
-	pthread_cleanup_pop(1)
-#else
 #define lock(a) a.depth++; pthread_mutex_lock(a.mutex)
 #define unlock(a) a.depth--; pthread_mutex_unlock(a.mutex)
 #define lock_cleanup_pop(a) pthread_cleanup_pop(1)
-#endif
 
 void cleanup_lock (void * data);
 
-- 
2.9.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux