-.\" $OpenBSD: kdump.1,v 1.31 2016/06/02 22:47:13 tedu Exp $
+.\" $OpenBSD: kdump.1,v 1.32 2016/07/18 09:36:50 guenther Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" from: @(#)kdump.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: June 2 2016 $
+.Dd $Mdocdate: July 18 2016 $
.Dt KDUMP 1
.Os
.Sh NAME
.Op Fl f Ar file
.Op Fl m Ar maxdata
.Op Fl p Ar pid
-.Op Fl t Op Cm cinstuxX+
+.Op Fl t Op Cm cinpstuxX+
.Sh DESCRIPTION
.Nm
displays the kernel trace files produced with
Display absolute timestamps for each entry (seconds since the Epoch).
.It Fl TR
If both options are specified, display timestamps relative to trace start.
-.It Fl t Op Cm cinstuxX+
+.It Fl t Op Cm cinpstuxX+
Selects which tracepoints to display.
See the
.Fl t
-/* $OpenBSD: kdump.c,v 1.128 2016/06/02 22:47:13 tedu Exp $ */
+/* $OpenBSD: kdump.c,v 1.129 2016/07/18 09:36:50 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
timestamp = timestamp == 2 ? 3 : 1;
break;
case 't':
- trpoints = getpoints(optarg);
+ trpoints = getpoints(optarg, DEF_POINTS);
if (trpoints < 0)
errx(1, "unknown trace point in %s", optarg);
break;
extern char *__progname;
fprintf(stderr, "usage: %s "
"[-dHlnRTXx] [-f file] [-m maxdata] [-p pid]\n"
- "%*s[-t [cinstuxX+]]\n",
+ "%*s[-t [cinpstuxX+]]\n",
__progname, (int)(sizeof("usage: ") + strlen(__progname)), "");
exit(1);
}
-/* $OpenBSD: extern.h,v 1.2 2002/02/16 21:27:47 millert Exp $ */
+/* $OpenBSD: extern.h,v 1.3 2016/07/18 09:36:50 guenther Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-extern int getpoints(const char *);
-extern const char *ioctlname(unsigned long);
+int getpoints(const char *, int);
+const char *ioctlname(unsigned long);
-.\" $OpenBSD: ktrace.1,v 1.28 2016/03/06 20:25:27 guenther Exp $
+.\" $OpenBSD: ktrace.1,v 1.29 2016/07/18 09:36:50 guenther Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" from: @(#)ktrace.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: March 6 2016 $
+.Dd $Mdocdate: July 18 2016 $
.Dt KTRACE 1
.Os
.Sh NAME
flag is permitted).
.It Fl t Ar trstr
The string argument represents the kernel trace points, one per letter.
-The default flags are
-.Cm c ,
-.Cm i ,
-.Cm n ,
-.Cm s ,
-.Cm t ,
-.Cm u ,
-and
-.Cm x .
-The following table equates the letters with the tracepoints:
+By default all trace points except for
+.Cm X
+are enabled.
+The following table equates the letters with the trace points:
.Pp
.Bl -tag -width flag -offset indent -compact
.It Cm c
trace I/O
.It Cm n
trace namei translations
+.It Cm p
+trace violation of
+.Xr pledge 2
+restrictions
.It Cm s
trace signal processing
.It Cm t
-/* $OpenBSD: ktrace.c,v 1.32 2015/04/18 18:28:37 deraadt Exp $ */
+/* $OpenBSD: ktrace.c,v 1.33 2016/07/18 09:36:50 guenther Exp $ */
/* $NetBSD: ktrace.c,v 1.4 1995/08/31 23:01:44 jtc Exp $ */
/*-
inherit = 1;
break;
case 't':
- trpoints = getpoints(optarg);
+ trpoints = getpoints(optarg, KTRFAC_USER);
if (trpoints < 0) {
warnx("unknown facility in %s", optarg);
usage();
pidset = 1;
break;
case 't':
- trpoints = getpoints(optarg);
+ trpoints = getpoints(optarg, DEF_POINTS);
if (trpoints < 0) {
warnx("unknown facility in %s", optarg);
usage();
-.\" $OpenBSD: ltrace.1,v 1.9 2016/03/06 20:25:27 guenther Exp $
+.\" $OpenBSD: ltrace.1,v 1.10 2016/07/18 09:36:50 guenther Exp $
.\"
.\" Copyright (c) 2013 Miodrag Vallat.
.\"
.\"
.\" from: @(#)ktrace.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: March 6 2016 $
+.Dd $Mdocdate: July 18 2016 $
.Dt LTRACE 1
.Os
.Sh NAME
processes.
.It Fl t Ar trstr
The string argument represents the kernel trace points, one per letter.
-The default flags are
-.Cm c ,
-.Cm i ,
-.Cm n ,
-.Cm s ,
-.Cm t ,
-.Cm u ,
-and
-.Cm x .
-The following table equates the letters with the tracepoints:
+The default is just
+.Cm u .
+The following table equates the letters with the trace points:
.Pp
.Bl -tag -width flag -offset indent -compact
.It Cm c
trace I/O
.It Cm n
trace namei translations
+.It Cm p
+trace violation of
+.Xr pledge 2
+restrictions
.It Cm s
trace signal processing
.It Cm t
-/* $OpenBSD: subr.c,v 1.12 2016/03/06 20:25:27 guenther Exp $ */
+/* $OpenBSD: subr.c,v 1.13 2016/07/18 09:36:50 guenther Exp $ */
/* $NetBSD: subr.c,v 1.6 1995/08/31 23:01:45 jtc Exp $ */
/*-
#include "ktrace.h"
#include "extern.h"
+/*
+ * If you change the trace point letters, then update to match:
+ * ktrace/ktrace.1, ktrace/ltrace.1, kdump/kdump.1, and
+ * usage() in kdump/kdump.c
+ */
int
-getpoints(s)
- const char *s;
+getpoints(const char *s, int defpoints)
{
int facs = 0;
case 'c':
facs |= KTRFAC_SYSCALL | KTRFAC_SYSRET;
break;
+ case 'i':
+ facs |= KTRFAC_GENIO;
+ break;
case 'n':
facs |= KTRFAC_NAMEI;
break;
- case 'i':
- facs |= KTRFAC_GENIO;
+ case 'p':
+ facs |= KTRFAC_PLEDGE;
break;
case 's':
facs |= KTRFAC_PSIG;
facs |= KTRFAC_EXECENV;
break;
case '+':
- facs |= DEF_POINTS;
+ facs |= defpoints;
break;
default:
return (-1);