Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make lockdebug_lock_print(NULL, ...) dump all locks...
details: https://anonhg.NetBSD.org/src/rev/3466988e5833
branches: trunk
changeset: 748714:3466988e5833
user: dyoung <dyoung%NetBSD.org@localhost>
date: Tue Nov 03 00:29:11 2009 +0000
description:
Make lockdebug_lock_print(NULL, ...) dump all locks. Now, in ddb,
'show lock 0x0' dumps all of the locks.
XXX I still need to fix 'show all lock'.
diffstat:
sys/kern/subr_lockdebug.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r 8bf28fe99489 -r 3466988e5833 sys/kern/subr_lockdebug.c
--- a/sys/kern/subr_lockdebug.c Tue Nov 03 00:24:05 2009 +0000
+++ b/sys/kern/subr_lockdebug.c Tue Nov 03 00:29:11 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_lockdebug.c,v 1.40 2009/10/05 23:39:27 rmind Exp $ */
+/* $NetBSD: subr_lockdebug.c,v 1.41 2009/11/03 00:29:11 dyoung Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.40 2009/10/05 23:39:27 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_lockdebug.c,v 1.41 2009/11/03 00:29:11 dyoung Exp $");
#include "opt_ddb.h"
@@ -792,12 +792,18 @@
lockdebug_t *ld;
TAILQ_FOREACH(ld, &ld_all, ld_achain) {
- if (ld->ld_lock == addr) {
+ if (ld->ld_lock == NULL)
+ continue;
+ if (addr == NULL || ld->ld_lock == addr) {
lockdebug_dump(ld, pr);
- return;
+ if (addr != NULL)
+ return;
}
}
- (*pr)("Sorry, no record of a lock with address %p found.\n", addr);
+ if (addr != NULL) {
+ (*pr)("Sorry, no record of a lock with address %p found.\n",
+ addr);
+ }
#else
(*pr)("Sorry, kernel not built with the LOCKDEBUG option.\n");
#endif /* LOCKDEBUG */
Home |
Main Index |
Thread Index |
Old Index