[asterisk-commits] murf: branch murf/mtxprof r131642 - in /team/murf/mtxprof: include/asterisk/ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 17 09:42:37 CDT 2008
Author: murf
Date: Thu Jul 17 09:42:36 2008
New Revision: 131642
URL: http://svn.digium.com/view/asterisk?view=rev&rev=131642
Log:
update to lock.h and utils.c for lock_addr
Modified:
team/murf/mtxprof/include/asterisk/lock.h
team/murf/mtxprof/main/utils.c
Modified: team/murf/mtxprof/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/team/murf/mtxprof/include/asterisk/lock.h?view=diff&rev=131642&r1=131641&r2=131642
==============================================================================
--- team/murf/mtxprof/include/asterisk/lock.h (original)
+++ team/murf/mtxprof/include/asterisk/lock.h Thu Jul 17 09:42:36 2008
@@ -513,9 +513,9 @@
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
-#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ 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);
#endif
}
@@ -593,7 +593,7 @@
ast_reentrancy_unlock(lt);
if (t->tracking) {
t->track.time_locked = ast_mark2();
- ast_mark_lock_acquired(&t->mutex);
+ ast_mark_lock_acquired(t);
}
} else {
#ifdef HAVE_BKTR
@@ -605,11 +605,11 @@
bt = NULL;
}
if (t->tracking) {
- ast_remove_lock_info(&t->mutex, bt);
+ ast_remove_lock_info(t, bt);
}
#else
if (t->tracking) {
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t);
}
#endif
__ast_mutex_logger("%s line %d (%s): Error obtaining mutex: %s\n",
@@ -651,9 +651,9 @@
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
-#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ 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);
#endif
}
@@ -682,7 +682,7 @@
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->mutex);
+ ast_mark_lock_acquired(t);
t->track.time_locked = ast_mark2();
}
} else {
@@ -697,7 +697,7 @@
}
#endif
if (t->tracking) {
- ast_mark_lock_failed(&t->mutex);
+ ast_mark_lock_failed(t);
}
}
return res;
@@ -770,9 +770,9 @@
#endif
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->mutex, bt);
-#else
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t, bt);
+#else
+ ast_remove_lock_info(t);
#endif
}
@@ -867,9 +867,9 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->mutex, bt);
-#else
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t, bt);
+#else
+ ast_remove_lock_info(t);
#endif
}
@@ -897,9 +897,9 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
-#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ 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);
#endif
}
}
@@ -964,9 +964,9 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->mutex, bt);
-#else
- ast_remove_lock_info(&t->mutex);
+ ast_remove_lock_info(t, bt);
+#else
+ ast_remove_lock_info(t);
#endif
}
@@ -994,9 +994,9 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex, bt);
-#else
- ast_store_lock_info(AST_MUTEX, filename, lineno, func, mutex_name, &t->mutex);
+ 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);
#endif
}
}
@@ -1187,9 +1187,9 @@
if (t->tracking) {
#ifdef HAVE_BKTR
- ast_remove_lock_info(&t->lock, bt);
-#else
- ast_remove_lock_info(&t->lock);
+ ast_remove_lock_info(t, bt);
+#else
+ ast_remove_lock_info(t);
#endif
}
@@ -1233,9 +1233,9 @@
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock, bt);
-#else
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t);
#endif
}
@@ -1285,7 +1285,7 @@
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else {
#ifdef HAVE_BKTR
@@ -1297,11 +1297,11 @@
bt = NULL;
}
if (t->tracking) {
- ast_remove_lock_info(&t->lock, bt);
+ ast_remove_lock_info(t, bt);
}
#else
if (t->tracking) {
- ast_remove_lock_info(&t->lock);
+ ast_remove_lock_info(t);
}
#endif
__ast_mutex_logger("%s line %d (%s): Error obtaining read lock: %s\n",
@@ -1342,9 +1342,9 @@
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock, bt);
-#else
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
#endif
}
#ifdef DETECT_DEADLOCKS
@@ -1393,7 +1393,7 @@
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else {
#ifdef HAVE_BKTR
@@ -1404,11 +1404,11 @@
bt = NULL;
}
if (t->tracking) {
- ast_remove_lock_info(&t->lock, bt);
+ ast_remove_lock_info(t, bt);
}
#else
if (t->tracking) {
- ast_remove_lock_info(&t->lock);
+ ast_remove_lock_info(t);
}
#endif
__ast_mutex_logger("%s line %d (%s): Error obtaining write lock: %s\n",
@@ -1450,9 +1450,9 @@
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock, bt);
-#else
- ast_store_lock_info(AST_RDLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_RDLOCK, filename, line, func, name, t);
#endif
}
@@ -1470,10 +1470,10 @@
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else if (t->tracking) {
- ast_mark_lock_failed(&t->lock);
+ ast_mark_lock_failed(t);
}
return res;
}
@@ -1510,9 +1510,9 @@
ast_bt_get_addresses(<->backtrace[lt->reentrancy]);
bt = <->backtrace[lt->reentrancy];
ast_reentrancy_unlock(lt);
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock, bt);
-#else
- ast_store_lock_info(AST_WRLOCK, filename, line, func, name, &t->lock);
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t, bt);
+#else
+ ast_store_lock_info(AST_WRLOCK, filename, line, func, name, t);
#endif
}
@@ -1530,10 +1530,10 @@
}
ast_reentrancy_unlock(lt);
if (t->tracking) {
- ast_mark_lock_acquired(&t->lock);
+ ast_mark_lock_acquired(t);
}
} else if (t->tracking) {
- ast_mark_lock_failed(&t->lock);
+ ast_mark_lock_failed(t);
}
return res;
}
Modified: team/murf/mtxprof/main/utils.c
URL: http://svn.digium.com/view/asterisk/team/murf/mtxprof/main/utils.c?view=diff&rev=131642&r1=131641&r2=131642
==============================================================================
--- team/murf/mtxprof/main/utils.c (original)
+++ team/murf/mtxprof/main/utils.c Thu Jul 17 09:42:36 2008
@@ -895,7 +895,7 @@
/* ONLY show info about this particular lock, if
it's acquired... */
totlocks++;
- /* if (lock_info->locks[i].lock_addr == this_lock_addr)*/ {
+ if (lock_info->locks[i].lock_addr == this_lock_addr) {
ast_str_reset(str);
ast_str_append(&str, 0, "Thread ID: %d (%s)\n", (int)lock_info->thread_id, lock_info->thread_name);
append_lock_information(&str, lock_info, i);
More information about the asterisk-commits
mailing list