Commit Graph

94 Commits

Author SHA1 Message Date
yamt 49cee5da7c #include a necessary header directly, rather than via user.h.
while i'm here, remove unnecessary #include.
2006-05-11 11:58:04 +00:00
skrll 633207bbf9 Add scheduler activations upcall data to the default list of trace
points.

OK'd by christos.
2006-02-07 06:39:47 +00:00
wiz 54282824e9 Sync usage with man page. 2005-12-12 22:42:34 +00:00
wiz c64e5a3705 Improve -v description slightly. 2005-12-12 22:38:28 +00:00
christos 74757293f7 add a trace facility for upcalls. 2005-12-11 19:29:27 +00:00
christos e297758924 Learn about ktrace v1 records. 2005-12-11 11:29:06 +00:00
christos 58fc70c4d6 WARNS=3 2005-07-16 22:00:01 +00:00
enami 686e03f5e7 - If fktrace(2) failed, just exit rather than waiting for trace output.
- Reduce #ifdef a bit.
2004-07-16 23:52:01 +00:00
enami 66820706e0 No need to pretty print the errno with err() or warn(). 2004-07-10 00:00:58 +00:00
wiz b25f3c1fec Drop trailing whitespace, and bump date for previous. 2004-06-24 15:59:13 +00:00
christos 1e77a9474a Fix a bug in ktruss and ktrace, where they would randomly stop tracing if
the write to the ktraced file descriptor (when they used fktrace internally)
would block. Fix by clearing the non-blocking bit in the file descriptor by
default, so that the writes will block. This has the side effect of stopping
the traced process. Add a flag to override (-n) this behavior and have the
trace stop without blocking the traced process (the previous behavior).
Fix lint, add checks to failed syscalls, ansify.
2004-06-24 15:50:50 +00:00
enami a612fb0b9d Replace rest of exit status `1' with EXIT_FAILURE. 2004-02-28 02:42:45 +00:00
enami 698c01aba0 Fix usage:
- ktrace(1) takes -s.
- ktruss(1) takes -l.
- -C/-c and commands are exclusive.
- make output fits 80 column.
2004-02-28 02:22:31 +00:00
enami 8a1309b72f - Make ktruss(1) works as expected when -c or -C is specified.
- Include pid or file descriptor in error message when
  ktrace(2)/fktrace(2) failed.
- Remove unnecessary cast.
2004-02-28 01:43:07 +00:00
enami 4d34b523bc Fix whitespace usage. 2004-02-28 01:37:56 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
wiz c4f3c3c55c Bump date for previous (hi manu!). 2003-11-24 18:00:49 +00:00
manu 23f30b17cb Enable tracing of out of line data sent with Mach messages 2003-11-24 16:53:38 +00:00
christos 309234359e declaration for siginfo code number to name converter function. 2003-09-19 22:49:29 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
wiz 52c00b06b5 Sort translation options list. 2003-07-24 18:21:31 +00:00
dsl fde07830ad Grok KTR_EXEC_ENV and KTR_EXEC_ARG.
Make ktrace -c default to removing all trace points (not just the default ones).
Make kdump default to dumping everything in the trace file.
Add 'A' (all) and '-' (remove following) to valid -t arguments.
Dump data block of UNKNOWN trace points in hex + ascii.
Make first time output with -R 0 (instead of time since epoch).
Use svis() instead of vis() to get " escaped (as \") (needs fixed libc)
Correctly pass unsigned values to svis()
Update man pages.
2003-07-17 09:05:11 +00:00
wiz 36e4d83a5e Grammar and mdoc fixes. Bump date for last two. 2003-05-06 08:22:08 +00:00
gmcgarry e00d2f72dc Some more ktruss documentation from Christian Biere <christianbiere@gmx.de>
in PR#17111.
2003-05-02 07:52:23 +00:00
gmcgarry 9256662c6b Explain what ktruss does. Document -l, -R and -T options.
Addresses PR#10458.
2003-05-02 07:40:20 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz 2e958b3f0b Bump date for some recent mach changes, fix two nits. 2002-12-18 20:10:37 +00:00
manu 6492e2171f Added support for dumping mach messages in ktrace/kdump. While we are
there, KNFify a few functions.
2002-12-09 21:29:20 +00:00
lukem ed401558f2 Implement MKDYNAMICROOT, which currently defaults to "no", but will
be changed in the future to "yes".

If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).

If MKDYNAMICROOT == "yes", the following changes occur:
    in <bsd.own.mk>:
	SHLIBDIR?=     /lib
	SHLINKDIR?=	/lib
    in various Makefiles, the following entry is DISABLED.
	LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).
2002-08-27 14:46:11 +00:00
christos 36496d50b7 PR/17643: Jared D. McNeill: ktrace leaves ktrace.out file with a kernel
that does not support ktrace.
2002-07-19 12:53:31 +00:00
jdolecek a31950f616 actually document trstr 'u' - user data and note it's included by default
kill some trailing whitespace
2001-10-26 23:38:07 +00:00
assar 8422fba5ab repair command-line parsing so that an error is generated if no pid or
program is given (or input file for ktruss)
2001-09-02 23:18:01 +00:00
simonb c24218a889 Add a -s option to open the trace file with O_SYNC. 2001-05-04 07:09:55 +00:00
simonb 0f134bcc0b Don't assume pipes are implemented as sockets -- don't call setsockopt()
on the pipe descriptors.
2001-05-01 02:15:04 +00:00
cgd a8ec668ddf convert to use getprogname() 2001-02-19 23:03:42 +00:00
jdolecek 33150dda73 add support for KTR_USER records 2000-12-17 16:09:40 +00:00
jdolecek 53b6556eda back out previous change - this needs to be discussed first at least 2000-11-14 00:10:16 +00:00
jdolecek dfc9af3212 don't link these static; if shared libraries are hosed, these utilities would
surely not save the situation, not help to recover from it
2000-11-13 21:48:33 +00:00
jdolecek af319ecb1a constify 2000-11-13 21:35:38 +00:00
itojun bbef2fbaac errx?/warnx? audit. do not pass variable alone, use %s. idea from openbsd 2000-07-07 15:10:32 +00:00
matt fcd0fb118f Make gcc 2.96 (and maybe earlier) happier. Include <stdlib.h>,<string.>,
etc. as appropriate to get exit,srncmp,abs,abort,etc.
Add -I${.CURDIR} to a few Makefiles
2000-07-03 02:51:12 +00:00
sommerfeld d4ddc11a83 Two tweaks:
- For cleaner subprocess traces, malloc something before
spawning, so the syscalls malloc does while initializing don't gunk up
the trace.
	- Increase pipe buffer sizes.
2000-05-27 00:45:37 +00:00
itohy 0af9894f2f [ktruss] Use fork(2), not vfork(2).
The child process of do_ktrace() does return and the stack is
changed by another function call (execvp()).
By using vfork() (my previous change), the execution of the parent
process resumes on the modified stack.  Oops.
We could use vfork() carefully, but for now use fork().

Problem reported and investigated by Ethan Solomita <ethan@geocast.com>.
Thanks.
2000-04-13 01:27:53 +00:00
jdolecek 0cdfde1cbc DTRT vs setemul() (for ktruss, similar to kdump.c) 2000-04-10 09:32:03 +00:00
jdolecek 103633896f remove prototype for setemul(), it's in kdump/setemul.h now 2000-04-10 09:30:26 +00:00
jdolecek 646b216e52 add description for -e argument (for ktruss) 2000-04-10 08:11:01 +00:00
jdolecek 84c8f8889f update to setemul() changes 2000-04-10 07:59:22 +00:00
itohy 2f4c0d5e74 Make ktrace(1) not affect interactions between processes.
Following examples show the cases.

    % ktrace -f - false >/dev/null && echo wrong
    wrong
    % ktrace -f - -i /usr/sbin/update >/dev/null
    (does not return to command line)

That is, back out last change and restore the roles of parent/child for
ktrace(1).  The ktruss(1) stuff still remains.
Yes, ktruss(1) has the problems.  Better implementation is expected.
1999-10-29 09:11:49 +00:00
darrenr c1f203f8b5 Change behaviour from running the command as the parent and ktrace/ktruss as
the child to be ktruss/ktrace is the parent.  This fixes a problem with ktruss
where the prompt would be returned in the middle of output.
1999-07-30 14:03:55 +00:00
enami 4191a1e6d4 - remove duplicated setting for LDSTATIC in ktruss/Makefile.
- fix command name in SYNOPSIS section of man page.
- link ktrace man page to ktruss man page.
- add executable and man page for ktruss in distrib sets.
1999-07-28 01:56:03 +00:00