[svn-commits] murf: branch murf/mtxprof r131296 - /team/murf/mtxprof/main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 16 13:34:54 CDT 2008


Author: murf
Date: Wed Jul 16 13:34:54 2008
New Revision: 131296

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131296
Log:
These changes commit in behalf of bugs 12772 and 13089; still in the research phase

Modified:
    team/murf/mtxprof/main/channel.c
    team/murf/mtxprof/main/utils.c

Modified: team/murf/mtxprof/main/channel.c
URL: http://svn.digium.com/view/asterisk/team/murf/mtxprof/main/channel.c?view=diff&rev=131296&r1=131295&r2=131296
==============================================================================
--- team/murf/mtxprof/main/channel.c (original)
+++ team/murf/mtxprof/main/channel.c Wed Jul 16 13:34:54 2008
@@ -1700,8 +1700,10 @@
 	log_show_lock(&chan->lock_dont_use);
 #endif
 	
+	log_show_lock(&chan->lock_dont_use);
 	ast_channel_lock(chan); /* in sip runs, this lock eats up a tremendous amount of time */
-
+	log_show_lock(&chan->lock_dont_use);
+	
 	/* You can't answer an outbound call */
 	if (ast_test_flag(chan, AST_FLAG_OUTGOING)) {
 		ast_channel_unlock(chan);

Modified: team/murf/mtxprof/main/utils.c
URL: http://svn.digium.com/view/asterisk/team/murf/mtxprof/main/utils.c?view=diff&rev=131296&r1=131295&r2=131296
==============================================================================
--- team/murf/mtxprof/main/utils.c (original)
+++ team/murf/mtxprof/main/utils.c Wed Jul 16 13:34:54 2008
@@ -613,9 +613,11 @@
 {
 	struct thr_lock_info *lock_info;
 	int i;
-
+	/* printf("store lock info for %s:%d[%s(%s)[%p]\n", filename,line_num, func,lock_name,lock_addr); */
+	
 	if (!(lock_info = ast_threadstorage_get(&thread_lock_info, sizeof(*lock_info))))
 		return;
+	/* printf("store lock info 2\n"); */
 
 	pthread_mutex_lock(&lock_info->lock);
 
@@ -646,6 +648,7 @@
 		lock_info->num_locks--;
 		memset(&lock_info->locks[i], 0, sizeof(lock_info->locks[0]));
 	}
+	/* printf("store lock info 3\n"); */
 
 	lock_info->locks[i].file = filename;
 	lock_info->locks[i].line_num = line_num;
@@ -732,6 +735,7 @@
 	struct thr_lock_info *lock_info;
 	int i = 0;
 
+	/* printf("remove lock info for                [%p]\n", lock_addr); */
 	if (!(lock_info = ast_threadstorage_get(&thread_lock_info, sizeof(*lock_info))))
 		return;
 
@@ -869,13 +873,17 @@
 	struct ast_str *str;
 	int lockinfos = 0;
 	int totlocks = 0;
-
+	int i;
+	
 	if (!(str = ast_str_create(4096))) {
 		ast_log(LOG_NOTICE,"Could not create str\n");
 		return;
 	}
-	ast_log(LOG_ERROR,"lockptr:tracking=%d;\n", lockptr->tracking);
-	ast_log(LOG_ERROR,"file:%s; lineno:%d; func:%s; re-ent:%d\n",lockptr->track.file[0], lockptr->track.lineno[0], lockptr->track.func[0], lockptr->track.reentrancy);
+	printf("lockptr:tracking=%d;\n", lockptr->tracking);
+	for(i=0;i<lockptr->track.reentrancy;i++) {
+		printf("file:%s; lineno:%d; func:%s; re-ent:%d\n",lockptr->track.file[i], lockptr->track.lineno[i], lockptr->track.func[i], lockptr->track.reentrancy);
+	}
+	
 	
 	ast_log(LOG_ERROR,"Look for lock addr %p in list\n", this_lock_addr);
 	pthread_mutex_lock(&lock_infos_lock.mutex);




More information about the svn-commits mailing list