summaryrefslogtreecommitdiffstats
path: root/usr.bin/ktrace
Commit message (Collapse)AuthorAgeFilesLines
* MFC 326184: Decode kevent structures logged via ktrace(2) in kdump.jhb2018-01-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new KTR_STRUCT_ARRAY ktrace record type which dumps an array of structures. The structure name in the record payload is preceded by a size_t containing the size of the individual structures. Use this to replace the previous code that dumped the kevent arrays dumped for kevent(). kdump is now able to decode the kevent structures rather than dumping their contents via a hexdump. One change from before is that the 'changes' and 'events' arrays are not marked with separate 'read' and 'write' annotations in kdump output. Instead, the first array is the 'changes' array, and the second array (only present if kevent doesn't fail with an error) is the 'events' array. For kevent(), empty arrays are denoted by an entry with an array containing zero entries rather than no record. - Move kevent decoding tables from truss to libsysdecode. This adds three new functions to decode members of struct kevent: sysdecode_kevent_filter, sysdecode_kevent_flags, and sysdecode_kevent_fflags. kdump uses these helper functions to pretty-print kevent fields. - Move structure definitions for freebsd11 and freebsd32 kevent structures to <sys/event.h> so that they can be shared with userland. The 32-bit structures are only exposed if _WANT_KEVENT32 is defined. The freebsd11 structures are only exposed if _WANT_FREEBSD11_KEVENT is defined. The 32-bit freebsd11 structure requires both. - Decode freebsd11 kevent structures in truss for the compat11.kevent() system call. - Log 32-bit kevent structures via ktrace for 32-bit compat kevent() system calls. - While here, constify the 'void *data' argument to ktrstruct(). Note that this version of the change for 11.x does not include freebsd11 kevent structures or _WANT_FREEBSD11_KEVENT. It also does not include the change to decode the compat11.kevent system call in truss.
* MFC r321422:trasz2017-10-041-3/+11
| | | | | | Improve the ktrace(1) man page to make it slightly more obvious that there are _two_ options that control its behaviour wrt child processes; slightly improve the example[1], and add Xrefs.
* MFC r321327:trasz2017-08-051-11/+11
| | | | Use more usual formatting for the EXAMPLES section of ktrace(1).
* Add a cross reference to ktrace(2).brooks2016-03-311-2/+3
| | | | | | Obtained from: CheriBSD (9cb420d6b7f04c1b7d2006180b80932e5d3fe50e) MFC after: 1 week Sponsored by: DARPA, AFRL
* Add META_MODE support.sjg2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge from head@274682sjg2014-11-191-4/+6
| |\ | |/ |/|
| * Updated dependenciessjg2014-05-161-1/+0
| |
| * Updated dependenciessjg2014-05-101-0/+2
| |
| * Updated dependenciessjg2013-03-111-0/+1
| |
| * Updated dependenciessjg2013-02-161-2/+0
| |
| * Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+19
| | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | Clarify that the -c argument clears the list of tracepoints specified byjhb2014-08-261-4/+6
|/ | | | | | | -t (it does not clear all tracepoints). Submitted by: jmg, Eric van Gyzen <eric@vangyzen.net> MFC after: 1 week
* Don't trace or dump page fault records in the default set of tracepointsjhb2012-05-312-5/+5
| | | | | | | as they can be quite noisy. Requested by: Peter Jeremy MFC after: 3 days
* Add new ktrace records for the start and end of VM faults. This givesjhb2012-04-053-3/+9
| | | | | | | | | | 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
* Make ktrace(1) build cleanly at WARNS level 6 by completely rethinking thedes2011-10-182-40/+73
| | | | | | way in which it handles the -C, -c, -g and -p options. MFC after: 3 weeks
* Add a new trace point, KTRFAC_CAPFAIL, which traces capability checkdes2011-10-113-5/+10
| | | | failures. It is included in the default set for ktrace(1) and kdump(1).
* Remove duplicated header fileskevlo2011-06-241-1/+0
|
* Teach kdump to understand sv_flags records in the trace files.dchagin2011-02-252-1/+5
| | | | MFC after: 1 Month.
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-114-16/+0
| | | | | | | | | 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
* - Sort list of trace points.jhb2010-07-141-3/+3
| | | | | | - Note that 'y' (sysctl requests) is in the default set of trace points. MFC after: 3 days
* Build usr.bin/ with WARNS=6 by default.ed2010-01-021-0/+2
| | | | Also add some missing $FreeBSD$ to keep svn happy.
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+2
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-2/+0
| | | | Tested with: make universe
* Add a new type of KTRACE record for sysctl(3) invocations. It uses thejhb2009-03-113-1/+9
| | | | | | | | 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
* Spell -t option's argument by name.ru2008-04-022-5/+5
|
* Fix usage string.des2008-03-201-2/+2
|
* This patch adds a new ktrace(2) record type, KTR_STRUCT, whose payloaddes2008-02-233-6/+11
| | | | | | | | | | | | | | | | | | | | | | | 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
* Allow the -c -f file options to actually execute.mpp2007-02-131-1/+1
|
* Add needed hyphens, note the KTRACE kernel option, bump doc date.trhodes2006-11-061-5/+9
| | | | | PR: 85186 Submitted by: garys
* When opening a trace file, open O_NONBLOCK so that ktrace doesn't stallrwatson2006-03-141-1/+4
| | | | | | | | | if the target is a fifo. After opening a trace file, check that it is a regular file, and if not, return an error. MFC after: 3 days Reported by: kris PR: 94278
* Sort sections.ru2005-01-181-4/+4
|
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-271-1/+1
| | | | including other headers.
* Do not start err(3) strings with uppercase nor dot terminate them.charnier2003-02-052-9/+8
| | | | Standard sccsid[] area according to style(9).
* Consistently use FBSDIDobrien2002-06-302-1/+2
|
* Warnings fix; ANSIfy, constify, mark unused function parameter(s).markm2002-04-283-18/+13
|
* Use `The .Nm utility'charnier2002-04-201-1/+1
|
* 1) Clean up vendor and ID strings.dwmalone2002-04-013-12/+29
| | | | | | | 2) include stdlib.h for atoi. 3) staticise and constify. 4) add some missing prototypes. 5) add some parens to keep gcc happy.
* remove __Pimp2002-03-221-2/+2
|
* Consistently refer to the trace file of ktrace as 'trfile'.keramida2002-03-031-3/+3
| | | | | PR: docs/35361 Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
* Describe the '+' option in the -t trace string.roam2002-02-111-0/+3
| | | | | | | | PR: 34668 Submitted by: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> Reviewed by: dd Approved by: dd MFC after: 1 week
* Compensate for "Compensate for header dethreading" by backing it out.bde2001-10-101-1/+0
|
* Remove whitespace at EOL.dd2001-07-151-4/+4
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* mdoc(7) police: add missing .Ar in SYNOPSIS.ru2001-07-051-1/+1
|
* Sync manpage and usage. Also fix bug that would always interpret a -c as amikeh2001-06-272-5/+4
| | | | | | | process clear. PR: bin/15456 MFC after: 2 weeks
* Compensate for header dethreading.markm2001-05-011-0/+1
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* getopt and friends are declared in <unistd.h>imp2000-09-041-2/+0
| | | | getopt returns -1 not EOF.
* Don't call err() with no format string.kris2000-07-101-5/+5
|
OpenPOWER on IntegriCloud