summaryrefslogtreecommitdiffstats
path: root/usr.bin/ktrace/ktrace.1
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-02-23 01:01:49 +0000
committerdes <des@FreeBSD.org>2008-02-23 01:01:49 +0000
commitdf26e399aa077b14fb965be866012bccf2847bae (patch)
treef964310d3ee2e43cfebd6c2b2628bc7056a3aa02 /usr.bin/ktrace/ktrace.1
parent78a1e4fcc29bdf9689366a67205160335e7897bd (diff)
downloadFreeBSD-src-df26e399aa077b14fb965be866012bccf2847bae.zip
FreeBSD-src-df26e399aa077b14fb965be866012bccf2847bae.tar.gz
This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payload
consists of the null-terminated name and the contents of any structure you wish to record. A new ktrstruct() function constructs and emits a KTR_STRUCT record. It is accompanied by convenience macros for struct stat and struct sockaddr. In kdump(1), KTR_STRUCT records are handled by a dispatcher function that runs stringent sanity checks on its contents before handing it over to individual decoding funtions for each type of structure. Currently supported structures are struct stat and struct sockaddr for the AF_INET, AF_INET6 and AF_UNIX families; support for AF_APPLETALK and AF_IPX is present but disabled, as I am unable to test it properly. Since 's' was already taken, the letter 't' is used by ktrace(1) to enable KTR_STRUCT trace points, and in kdump(1) to enable their decoding. Derived from patches by Andrew Li <andrew2.li@citi.com>. PR: kern/117836 MFC after: 3 weeks
Diffstat (limited to 'usr.bin/ktrace/ktrace.1')
-rw-r--r--usr.bin/ktrace/ktrace.112
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1
index 0260b1e..07cfc40 100644
--- a/usr.bin/ktrace/ktrace.1
+++ b/usr.bin/ktrace/ktrace.1
@@ -32,7 +32,7 @@
.\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
-.Dd November 6, 2006
+.Dd February 23, 2008
.Dt KTRACE 1
.Os
.Sh NAME
@@ -43,11 +43,11 @@
.Op Fl aCcdi
.Op Fl f Ar trfile
.Op Fl g Ar pgrp | Fl p Ar pid
-.Op Fl t Ar trstr
+.Op Fl t Ar cnistuw
.Nm
.Op Fl adi
.Op Fl f Ar trfile
-.Op Fl t Ar trstr
+.Op Fl t Ar cnistuw
.Ar command
.Sh DESCRIPTION
The
@@ -105,7 +105,7 @@ processes.
Enable (disable) tracing on the indicated process id (only one
.Fl p
flag is permitted).
-.It Fl t Ar trstr
+.It Fl t Ar cnistuw
The string argument represents the kernel trace points, one per letter.
The following table equates the letters with the tracepoints:
.Pp
@@ -119,13 +119,15 @@ trace
.Tn I/O
.It Cm s
trace signal processing
+.It Cm t
+trace various structures
.It Cm u
userland traces
.It Cm w
context switches
.It Cm +
trace the default set of trace points -
-.Cm c , n , i , s , u
+.Cm c , n , i , s , t , u
.El
.It Ar command
Execute
OpenPOWER on IntegriCloud