summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-24 12:06:15 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-24 12:06:15 +0000
commitdf217187ceff1bf82bb7c6ccdd84056b3690156e (patch)
treef482fa5a28657a27ba066c1b1909e4d84a54dfd3 /share
parent841360d91c453a8c5ac107cf8463b159146ecefd (diff)
downloadFreeBSD-src-df217187ceff1bf82bb7c6ccdd84056b3690156e.zip
FreeBSD-src-df217187ceff1bf82bb7c6ccdd84056b3690156e.tar.gz
Add stack_print_short() and stack_print_short_ddb() interfaces to
stack(9), which generate a more compact rendition of a stack trace via the kernel's printf. MFC after: 1 week
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/stack.914
1 files changed, 11 insertions, 3 deletions
diff --git a/share/man/man9/stack.9 b/share/man/man9/stack.9
index 8d03dd7..6567641 100644
--- a/share/man/man9/stack.9
+++ b/share/man/man9/stack.9
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 2007 Robert N. M. Watson
+.\" Copyright (c) 2007-2009 Robert N. M. Watson
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 27, 2007
+.Dd June 24, 2009
.Dt STACK 9
.Os
.Sh NAME
@@ -54,6 +54,10 @@ In the kernel configuration file:
.Ft void
.Fn stack_print_ddb "struct stack *st"
.Ft void
+.Fn stack_print_short "struct stack *st"
+.Ft void
+.Fn stack_print_short_ddb "struct stack *st"
+.Ft void
.Fn stack_sbuf_print "struct sbuf sb*" "struct stack *st"
.Ft void
.Fn stack_sbuf_print_ddb "struct sbuf sb*" "struct stack *st"
@@ -84,6 +88,8 @@ A trace of the current kernel thread's call stack may be captured using
.Fn stack_save .
.Pp
.Fn stack_print
+and
+.Fn stack_print_short
may be used to print a stack trace using the kernel
.Xr printf 9 ,
and may sleep as a result of acquiring
@@ -91,7 +97,9 @@ and may sleep as a result of acquiring
locks in the kernel linker while looking up symbol names.
In locking-sensitive environments, the unsynchronized
.Fn stack_print_ddb
-variant may be invoked.
+and
+.Fn stack_print_short_ddb
+variants may be invoked.
This function bypasses kernel linker locking, making it usable in
.Xr ddb 4 ,
but not in a live system where linker data structures may change.
OpenPOWER on IntegriCloud