Commit Graph

24 Commits

Author SHA1 Message Date
John Baldwin
01a36e296d Allow the -p argument to kdump to accept either a PID or a thread ID.
Submitted by:	Dmitry Banschikov  d.banschikov hostcomm ru
MFC after:	1 week
2012-06-04 19:09:14 +00:00
John Baldwin
88bf5036fc Include the associated wait channel message for context switch ktrace
records.  kdump supports both the old and new messages.

Submitted by:	Andrey Zonov  andrey zonov org
MFC after:	1 week
2012-04-20 15:32:36 +00:00
John Baldwin
35818d2e94 Add new ktrace records for the start and end of VM faults. This gives
a pair of records similar to syscall entry and return that a user can
use to determine how long page faults take.  The new ktrace records are
enabled via the 'p' trace type, and are enabled in the default set of
trace points.

Reviewed by:	kib
MFC after:	2 weeks
2012-04-05 17:13:14 +00:00
Dmitry Chagin
a30c325c64 Update manual page to reflect latest changes of ABI description support.
MFC after:	1 Month.
2011-02-25 22:14:12 +00:00
Joel Dahl
da52b4caaf Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with:	imp, rwatson
2010-12-11 08:32:16 +00:00
John Baldwin
c23d84a86b Correct the abbreviations for general I/O and signal traces.
PR:		docs/151854
Submitted by:	Stephen Veiss  stephen of brokenbottle net
MFC after:	3 days
2010-11-01 15:18:57 +00:00
John Baldwin
a56be37e68 Add a new type of KTRACE record for sysctl(3) invocations. It uses the
internal sysctl_sysctl_name() handler to map the MIB array to a string
name and logs this name in the trace log.  This can be useful to see
exactly which sysctls a thread is invoking.

MFC after:	1 month
2009-03-11 21:48:36 +00:00
Ruslan Ermilov
da647ae946 Spell -t option's argument by name. 2008-04-02 09:41:29 +00:00
Dag-Erling Smørgrav
60e15db992 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
2008-02-23 01:01:49 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
Robert Watson
df0c8868b1 Add "-s" argument to kdump to suppress the display of I/O data.
MFC after:	1 week
2005-11-12 14:21:48 +00:00
Robert Watson
a9ac598b36 Add a "-H" argument to kdump, which causes kdump to print an additional
field holding the threadid.  This is more useful for libthr than
libpthread, but still quite useful in libpthread as it can be used to
process interlaced records from multiple threads over the course of a
system call.

Detect old ktr_buffer values using the heuristic "if it's negative,
then it must not be a valid threadid".  This may leave something to be
desired.

MFC after:	1 month
Reviewed by:	davidxu
2005-11-01 14:48:23 +00:00
George V. Neville-Neil
a9a2bf999b Update kdump manual page with information on the dump format.
Add a table with the different types of operations traced.

Reviewed by:	Ruslan Ermilov
Approved by:	Robert Watson (mentor)
2005-01-28 12:17:33 +00:00
Ruslan Ermilov
b388c4ac50 Bump document date on behalf of the -E option. 2004-05-18 20:42:36 +00:00
Peter Wemm
24b648094d First pass at attempted debrucification:
- sort the -E switch into the right place.
- add previously missing -p pid in usage (from the last few commits).
- add -E to usage.
- consistently use trfile in the man page.

I knew I shouldn't have touched the man page.  If I commit to a man page,
it just makes people suspicious. :-)
2003-12-08 22:47:59 +00:00
Peter Wemm
ec13191464 Add a -E (elapsed time) flag to kdump. This is like -T, except it is
relative to start of the dump.

Approved by:  re (scottl)
2003-12-07 01:06:32 +00:00
Peter Wemm
ec4beb5d8b Two enhancements for kdump.
1) add a "-p pid", which is rather useful for selecting a single pid in
a combined trace file (eg: with ktrace -i).
2) display binary genio data in a more precise format.
2003-06-03 01:44:43 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Ruslan Ermilov
625003720a mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 14:16:33 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Philippe Charnier
15fc002be8 Use err(3). Correct incomplete man page. 1997-07-16 06:49:49 +00:00
John-Mark Gurney
93e0d62d1c `appears'' -> `appeared'' (closes PR#3393, Submitted-by: Josh Gilliam)
add missing Id's
other minor clean ups
1997-04-27 08:45:46 +00:00
Poul-Henning Kamp
82e2dd32b6 For now we just hexdump the stuff in USER records. 1996-09-19 19:50:45 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00