summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2007-12-01 22:04:16 +0000
committerrwatson <rwatson@FreeBSD.org>2007-12-01 22:04:16 +0000
commit090235e567d2103bb33c8098bde951eb3c184d05 (patch)
tree078abf5d6f6ec15b509ed5ddcf1ae98c1893fb79 /sys/kern/kern_lock.c
parenta032664fc9c37f7b29a9713d084d2e3510510531 (diff)
downloadFreeBSD-src-090235e567d2103bb33c8098bde951eb3c184d05.zip
FreeBSD-src-090235e567d2103bb33c8098bde951eb3c184d05.tar.gz
Modify stack(9) stack_print() and stack_sbuf_print() routines to use new
linker interfaces for looking up function names and offsets from instruction pointers. Create two variants of each call: one that is "DDB-safe" and avoids locking in the linker, and one that is safe for use in live kernels, by virtue of observing locking, and in particular safe when kernel modules are being loaded and unloaded simultaneous to their use. This will allow them to be used outside of debugging contexts. Modify two of three current stack(9) consumers to use the DDB-safe interfaces, as they run in low-level debugging contexts, such as inside lockmgr(9) and the kernel memory allocator. Update man page.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index b06e17e..3e1d78f 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -625,7 +625,7 @@ lockmgr_printinfo(lkp)
if (lkp->lk_waitcount > 0)
printf(" with %d pending", lkp->lk_waitcount);
#ifdef DEBUG_LOCKS
- stack_print(&lkp->lk_stack);
+ stack_print_ddb(&lkp->lk_stack);
#endif
}
OpenPOWER on IntegriCloud