[svn-commits] mjordan: branch mjordan/1.8_instrumented r362539 - /team/mjordan/1.8_instrume...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Apr 19 09:57:17 CDT 2012


Author: mjordan
Date: Thu Apr 19 09:57:13 2012
New Revision: 362539

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=362539
Log:
Throttle that back a bit... keeping statements only for wrlocks

Modified:
    team/mjordan/1.8_instrumented/main/lock.c

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=362539&r1=362538&r2=362539
==============================================================================
--- team/mjordan/1.8_instrumented/main/lock.c (original)
+++ team/mjordan/1.8_instrumented/main/lock.c Thu Apr 19 09:57:13 2012
@@ -117,14 +117,13 @@
 				   filename, lineno, func, mutex_name);
 		if (t->tracking) {
 			ast_reentrancy_lock(lt);
-			__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+			/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 			__ast_mutex_logger("%s line %d (%s): Error: '%s' was locked here.\n",
 				    lt->file[ROFFSET], lt->lineno[ROFFSET], lt->func[ROFFSET], mutex_name);
 #ifdef HAVE_BKTR
 			__dump_backtrace(&lt->backtrace[ROFFSET], canlog);
 #endif
-			__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-			ast_reentrancy_unlock(lt);
+	/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */			ast_reentrancy_unlock(lt);
 		}
 		break;
 	}
@@ -139,7 +138,7 @@
 	}
 	if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+/*		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__); */
 		lt->file[0] = filename;
 		lt->lineno[0] = lineno;
 		lt->func[0] = func;
@@ -148,8 +147,7 @@
 #ifdef HAVE_BKTR
 		memset(&lt->backtrace[0], 0, sizeof(lt->backtrace[0]));
 #endif
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 		delete_reentrancy_cs(&t->track);
 	}
 #endif /* DEBUG_THREADS */
@@ -192,13 +190,12 @@
 	if (t->tracking) {
 #ifdef HAVE_BKTR
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy != AST_MAX_REENTRANCY) {
 			ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
 			bt = &lt->backtrace[lt->reentrancy];
 		}
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 		ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
 #else
 		ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t);
@@ -224,7 +221,7 @@
 					__ast_mutex_logger("%s line %d (%s): Deadlock? waited %d sec for mutex '%s'?\n",
 							   filename, lineno, func, (int) wait_time, mutex_name);
 					ast_reentrancy_lock(lt);
-					__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+					/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 #ifdef HAVE_BKTR
 					__dump_backtrace(&lt->backtrace[lt->reentrancy], canlog);
 #endif
@@ -234,8 +231,7 @@
 #ifdef HAVE_BKTR
 					__dump_backtrace(&lt->backtrace[ROFFSET], canlog);
 #endif
-					__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-					ast_reentrancy_unlock(lt);
+			/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */					ast_reentrancy_unlock(lt);
 					reported_wait = wait_time;
 				}
 				usleep(200);
@@ -255,7 +251,7 @@
 #ifdef DEBUG_THREADS
 	if (t->tracking && !res) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy < AST_MAX_REENTRANCY) {
 			lt->file[lt->reentrancy] = filename;
 			lt->lineno[lt->reentrancy] = lineno;
@@ -266,8 +262,7 @@
 			__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
 							   filename, lineno, func, mutex_name);
 		}
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 		if (t->tracking) {
 			ast_mark_lock_acquired(t);
 		}
@@ -277,8 +272,7 @@
 			ast_reentrancy_lock(lt);
 			__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
 			bt = &lt->backtrace[lt->reentrancy-1];
-			__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-			ast_reentrancy_unlock(lt);
+	/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */			ast_reentrancy_unlock(lt);
 		} else {
 			bt = NULL;
 		}
@@ -333,13 +327,12 @@
 	if (t->tracking) {
 #ifdef HAVE_BKTR
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy != AST_MAX_REENTRANCY) {
 			ast_bt_get_addresses(&lt->backtrace[lt->reentrancy]);
 			bt = &lt->backtrace[lt->reentrancy];
 		}
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 		ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
 #else
 		ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t);
@@ -352,7 +345,7 @@
 #ifdef DEBUG_THREADS
 	if (t->tracking && !res) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy < AST_MAX_REENTRANCY) {
 			lt->file[lt->reentrancy] = filename;
 			lt->lineno[lt->reentrancy] = lineno;
@@ -363,8 +356,7 @@
 			__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
 					   filename, lineno, func, mutex_name);
 		}
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 		if (t->tracking) {
 			ast_mark_lock_acquired(t);
 		}
@@ -408,7 +400,7 @@
 
 	if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy && (lt->thread[ROFFSET] != pthread_self())) {
 			__ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n",
 					   filename, lineno, func, mutex_name);
@@ -439,8 +431,7 @@
 			bt = &lt->backtrace[lt->reentrancy - 1];
 		}
 #endif
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 
 #ifdef HAVE_BKTR
 		ast_remove_lock_info(t, bt);
@@ -522,7 +513,7 @@
 
 	if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy && (lt->thread[ROFFSET] != pthread_self())) {
 			__ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n",
 					   filename, lineno, func, mutex_name);
@@ -553,8 +544,7 @@
 			bt = &lt->backtrace[lt->reentrancy - 1];
 		}
 #endif
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 
 #ifdef HAVE_BKTR
 		ast_remove_lock_info(t, bt);
@@ -574,7 +564,7 @@
 		DO_THREAD_CRASH;
 	} else if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy < AST_MAX_REENTRANCY) {
 			lt->file[lt->reentrancy] = filename;
 			lt->lineno[lt->reentrancy] = lineno;
@@ -589,8 +579,7 @@
 			__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
 							   filename, lineno, func, mutex_name);
 		}
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 
 #ifdef HAVE_BKTR
 		ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
@@ -636,7 +625,7 @@
 
 	if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy && (lt->thread[ROFFSET] != pthread_self())) {
 			__ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n",
 					   filename, lineno, func, mutex_name);
@@ -666,8 +655,7 @@
 			bt = &lt->backtrace[lt->reentrancy - 1];
 		}
 #endif
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 
 #ifdef HAVE_BKTR
 		ast_remove_lock_info(t, bt);
@@ -687,7 +675,7 @@
 		DO_THREAD_CRASH;
 	} else if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);
+		/*__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, lineno, func, __LINE__);*/
 		if (lt->reentrancy < AST_MAX_REENTRANCY) {
 			lt->file[lt->reentrancy] = filename;
 			lt->lineno[lt->reentrancy] = lineno;
@@ -702,8 +690,7 @@
 			__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
 							   filename, lineno, func, mutex_name);
 		}
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 
 #ifdef HAVE_BKTR
 		ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, t, bt);
@@ -785,8 +772,7 @@
 #ifdef HAVE_BKTR
 		memset(&lt->backtrace[0], 0, sizeof(lt->backtrace[0]));
 #endif
-		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func);
-		ast_reentrancy_unlock(lt);
+/* 		__ast_mutex_logger("Global lock released by %s line %d (%s)\n", filename, lineno, func); */		ast_reentrancy_unlock(lt);
 		delete_reentrancy_cs(&t->track);
 	}
 #endif /* DEBUG_THREADS */
@@ -827,7 +813,7 @@
 
 	if (t->tracking) {
 		ast_reentrancy_lock(lt);
-		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, line, func, __LINE__);
+ 		__ast_mutex_logger("Global lock obtained by %s line %d (%s) at %d\n", filename, line, func, __LINE__);
 		if (lt->reentrancy) {
 			int i;
 			pthread_t self = pthread_self();




More information about the svn-commits mailing list