[asterisk-commits] mjordan: branch mjordan/1.8_instrumented r366294 - in /team/mjordan/1.8_instr...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 11 15:20:59 CDT 2012


Author: mjordan
Date: Fri May 11 15:20:54 2012
New Revision: 366294

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=366294
Log:
Remove some of the debugging

Modified:
    team/mjordan/1.8_instrumented/include/asterisk/lock.h
    team/mjordan/1.8_instrumented/main/lock.c

Modified: team/mjordan/1.8_instrumented/include/asterisk/lock.h
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/1.8_instrumented/include/asterisk/lock.h?view=diff&rev=366294&r1=366293&r2=366294
==============================================================================
--- team/mjordan/1.8_instrumented/include/asterisk/lock.h (original)
+++ team/mjordan/1.8_instrumented/include/asterisk/lock.h Fri May 11 15:20:54 2012
@@ -209,7 +209,7 @@
 
 #ifdef DEBUG_THREADS
 
-#define __ast_mutex_logger(...)  do { if (0) fprintf(stderr, __VA_ARGS__); else fprintf(stderr, __VA_ARGS__); } while (0)
+#define __ast_mutex_logger(...)  do { if (canlog) fprintf(stderr, __VA_ARGS__); else fprintf(stderr, __VA_ARGS__); } while (0)
 
 #ifdef THREAD_CRASH
 #define DO_THREAD_CRASH do { *((int *)(0)) = 1; } while(0)

Modified: team/mjordan/1.8_instrumented/main/lock.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/1.8_instrumented/main/lock.c?view=diff&rev=366294&r1=366293&r2=366294
==============================================================================
--- team/mjordan/1.8_instrumented/main/lock.c (original)
+++ team/mjordan/1.8_instrumented/main/lock.c Fri May 11 15:20:54 2012
@@ -1056,7 +1056,7 @@
 
 	if (t->tracking && !t->track) {
 		if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-			__ast_mutex_logger("Should only see this once - initializing the reentrancy lock\n");
+			/*__ast_mutex_logger("Should only see this once - initializing the reentrancy lock\n");*/
 		}
 		ast_reentrancy_init(&t->track);
 	}
@@ -1065,18 +1065,18 @@
 	if (t->tracking) {
 #ifdef HAVE_BKTR
 		if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-			__ast_mutex_logger("Attempting to grab global lock %p for %p in wrlock\n", lt, t);
+			/*__ast_mutex_logger("Attempting to grab global lock %p for %p in wrlock\n", lt, t);*/
 		}
 		ast_reentrancy_lock(lt);
 		if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-			__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
+			/*__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);*/
 		}
 		if (lt->reentrancy != AST_MAX_REENTRANCY) {
 			ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
 			bt = &lt->backtrace[lt->reentrancy];
 		}
 		if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-			__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
+			/*__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);*/
 		}
 		ast_reentrancy_unlock(lt);
 		ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
@@ -1130,7 +1130,7 @@
 	if (!res && t->tracking) {
 		ast_reentrancy_lock(lt);
 		if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-			__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
+			/*__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);*/
 		}
 		if (lt->reentrancy < AST_MAX_REENTRANCY) {
 			lt->file[lt->reentrancy] = filename;
@@ -1141,7 +1141,7 @@
 		}
 		ast_reentrancy_unlock(lt);
 		if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-			__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
+			/*__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);*/
 		}
 		if (t->tracking) {
 			ast_mark_lock_acquired(t);
@@ -1151,12 +1151,12 @@
 		if (lt->reentrancy) {
 			ast_reentrancy_lock(lt);
 			if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-				__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);
+				/*__ast_mutex_logger("Global lock %p obtained by %s line %d (%s) at %d\n", lt, filename, line, func, __LINE__);*/
 			}
 			bt = &lt->backtrace[lt->reentrancy-1];
 			ast_reentrancy_unlock(lt);
 			if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-				__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);
+				/*__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, line, func);*/
 			}
 		} else {
 			bt = NULL;
@@ -1177,7 +1177,7 @@
 		DO_THREAD_CRASH;
 	}
 	if (!strcmp(filename, "asterisk.c") && !strcmp(func, "ast_register_thread")) {
-		__ast_mutex_logger("Exiting wrlock\n");
+		/*__ast_mutex_logger("Exiting wrlock\n");*/
 	}
 #endif /* DEBUG_THREADS */
 	return res;




More information about the asterisk-commits mailing list