summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/sys/ktrace.26
-rw-r--r--sys/kern/kern_ktrace.c17
-rw-r--r--sys/kern/kern_synch.c12
-rw-r--r--sys/sys/ktrace.h13
-rw-r--r--usr.bin/kdump/kdump.c16
-rw-r--r--usr.bin/ktrace/ktrace.16
-rw-r--r--usr.bin/ktrace/ktrace.h5
-rw-r--r--usr.bin/ktrace/ltrace.18
-rw-r--r--usr.bin/ktrace/subr.c5
9 files changed, 14 insertions, 74 deletions
diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2
index 895b623a25b..bc0d707fd96 100644
--- a/lib/libc/sys/ktrace.2
+++ b/lib/libc/sys/ktrace.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ktrace.2,v 1.27 2015/01/19 15:54:11 millert Exp $
+.\" $OpenBSD: ktrace.2,v 1.28 2015/09/07 15:38:45 guenther Exp $
.\" $NetBSD: ktrace.2,v 1.2 1995/02/27 12:33:58 cgd Exp $
.\"
.\" Copyright (c) 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)ktrace.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: January 19 2015 $
+.Dd $Mdocdate: September 7 2015 $
.Dt KTRACE 2
.Os
.Sh NAME
@@ -106,8 +106,6 @@ Trace all I/O
Trace posted signals.
.It Dv KTRFAC_EMUL
Trace emulation changes.
-.It Dv KTRFAC_CSW
-Trace context switch points.
.It Dv KTRFAC_STRUCT
Trace various structs
.It Dv KTRFAC_USER
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index b4e930149b2..29403528cde 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_ktrace.c,v 1.76 2015/08/22 20:18:49 deraadt Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.77 2015/09/07 15:38:45 guenther Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
@@ -313,21 +313,6 @@ ktrpsig(struct proc *p, int sig, sig_t action, int mask, int code,
}
void
-ktrcsw(struct proc *p, int out, int user)
-{
- struct ktr_header kth;
- struct ktr_csw kc;
-
- atomic_setbits_int(&p->p_flag, P_INKTR);
- ktrinitheader(&kth, p, KTR_CSW);
- kc.out = out;
- kc.user = user;
-
- ktrwrite(p, &kth, &kc, sizeof(kc));
- atomic_clearbits_int(&p->p_flag, P_INKTR);
-}
-
-void
ktrstruct(struct proc *p, const char *name, const void *data, size_t datalen)
{
struct ktr_header kth;
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 7a49c354ae5..7c1ff231854 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.121 2015/05/12 09:30:35 mikeb Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.122 2015/09/07 15:38:45 guenther Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -234,11 +234,6 @@ sleep_setup(struct sleep_state *sls, const volatile void *ident, int prio,
panic("tsleep: not SONPROC");
#endif
-#ifdef KTRACE
- if (KTRPOINT(p, KTR_CSW))
- ktrcsw(p, 1, 0);
-#endif
-
sls->sls_catch = 0;
sls->sls_do_sleep = 1;
sls->sls_sig = 1;
@@ -279,11 +274,6 @@ sleep_finish(struct sleep_state *sls, int do_sleep)
* we need to clear it before the ktrace.
*/
atomic_clearbits_int(&p->p_flag, P_SINTR);
-
-#ifdef KTRACE
- if (KTRPOINT(p, KTR_CSW))
- ktrcsw(p, 0, 0);
-#endif
}
void
diff --git a/sys/sys/ktrace.h b/sys/sys/ktrace.h
index 94fd788e6f7..2eec62f2758 100644
--- a/sys/sys/ktrace.h
+++ b/sys/sys/ktrace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ktrace.h,v 1.23 2015/07/28 05:50:41 guenther Exp $ */
+/* $OpenBSD: ktrace.h,v 1.24 2015/09/07 15:38:45 guenther Exp $ */
/* $NetBSD: ktrace.h,v 1.12 1996/02/04 02:12:29 christos Exp $ */
/*
@@ -129,15 +129,6 @@ struct ktr_psig {
};
/*
- * KTR_CSW - trace context switches
- */
-#define KTR_CSW 6
-struct ktr_csw {
- int out; /* 1 if switch out, 0 if switch in */
- int user; /* 1 if usermode (ivcsw), 0 if kernel (vcsw) */
-};
-
-/*
* KTR_EMUL - emulation change
*/
#define KTR_EMUL 7
@@ -176,7 +167,6 @@ struct ktr_user {
#define KTRFAC_NAMEI (1<<KTR_NAMEI)
#define KTRFAC_GENIO (1<<KTR_GENIO)
#define KTRFAC_PSIG (1<<KTR_PSIG)
-#define KTRFAC_CSW (1<<KTR_CSW)
#define KTRFAC_EMUL (1<<KTR_EMUL)
#define KTRFAC_STRUCT (1<<KTR_STRUCT)
#define KTRFAC_USER (1<<KTR_USER)
@@ -198,7 +188,6 @@ __END_DECLS
#else
-void ktrcsw(struct proc *, int, int);
void ktremul(struct proc *);
void ktrgenio(struct proc *, int, enum uio_rw, struct iovec *, ssize_t);
void ktrnamei(struct proc *, char *);
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
index c9ac0bef159..ef9e879fee5 100644
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kdump.c,v 1.103 2015/07/19 04:45:25 guenther Exp $ */
+/* $OpenBSD: kdump.c,v 1.104 2015/09/07 15:38:45 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -139,7 +139,6 @@ static void mappidtoemul(pid_t, struct emulation *);
static struct emulation * findemul(pid_t);
static int fread_tail(void *, size_t, size_t);
static void dumpheader(struct ktr_header *);
-static void ktrcsw(struct ktr_csw *);
static void ktremul(char *, size_t);
static void ktrgenio(struct ktr_genio *, size_t);
static void ktrnamei(const char *, size_t);
@@ -292,9 +291,6 @@ main(int argc, char *argv[])
case KTR_PSIG:
ktrpsig((struct ktr_psig *)m);
break;
- case KTR_CSW:
- ktrcsw((struct ktr_csw *)m);
- break;
case KTR_EMUL:
ktremul(m, ktrlen);
mappidtoemul(ktr_header.ktr_pid, current);
@@ -379,9 +375,6 @@ dumpheader(struct ktr_header *kth)
case KTR_PSIG:
type = "PSIG";
break;
- case KTR_CSW:
- type = "CSW";
- break;
case KTR_EMUL:
type = "EMUL";
break;
@@ -1373,13 +1366,6 @@ ktrpsig(struct ktr_psig *psig)
}
static void
-ktrcsw(struct ktr_csw *cs)
-{
- (void)printf("%s %s\n", cs->out ? "stop" : "resume",
- cs->user ? "user" : "kernel");
-}
-
-static void
ktruser(struct ktr_user *usr, size_t len)
{
if (len < sizeof(struct ktr_user))
diff --git a/usr.bin/ktrace/ktrace.1 b/usr.bin/ktrace/ktrace.1
index 9780efdbd0d..0d07ff5300d 100644
--- a/usr.bin/ktrace/ktrace.1
+++ b/usr.bin/ktrace/ktrace.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ktrace.1,v 1.25 2015/03/13 19:58:41 jmc Exp $
+.\" $OpenBSD: ktrace.1,v 1.26 2015/09/07 15:38:45 guenther Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" from: @(#)ktrace.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: March 13 2015 $
+.Dd $Mdocdate: September 7 2015 $
.Dt KTRACE 1
.Os
.Sh NAME
@@ -138,8 +138,6 @@ trace various structures
.It Cm u
trace user data coming from
.Xr utrace 2
-.It Cm w
-trace context switch points
.It Cm +
trace the default points
.El
diff --git a/usr.bin/ktrace/ktrace.h b/usr.bin/ktrace/ktrace.h
index 1483f99c481..c8a4a56b9a7 100644
--- a/usr.bin/ktrace/ktrace.h
+++ b/usr.bin/ktrace/ktrace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ktrace.h,v 1.6 2015/01/19 15:30:52 krw Exp $ */
+/* $OpenBSD: ktrace.h,v 1.7 2015/09/07 15:38:45 guenther Exp $ */
/*-
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -34,6 +34,7 @@
KTRFAC_GENIO | KTRFAC_PSIG | KTRFAC_EMUL | KTRFAC_STRUCT | \
KTRFAC_USER)
-#define ALL_POINTS (DEF_POINTS | KTRFAC_CSW)
+/* any KTRFAC_* not included in DEF_POINTS should be added here */
+#define ALL_POINTS (DEF_POINTS)
#define DEF_TRACEFILE "ktrace.out"
diff --git a/usr.bin/ktrace/ltrace.1 b/usr.bin/ktrace/ltrace.1
index 66217f229aa..a3e2dfe97e0 100644
--- a/usr.bin/ktrace/ltrace.1
+++ b/usr.bin/ktrace/ltrace.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ltrace.1,v 1.6 2015/03/13 19:58:41 jmc Exp $
+.\" $OpenBSD: ltrace.1,v 1.7 2015/09/07 15:38:45 guenther Exp $
.\"
.\" Copyright (c) 2013 Miodrag Vallat.
.\"
@@ -43,7 +43,7 @@
.\"
.\" from: @(#)ktrace.1 8.1 (Berkeley) 6/6/93
.\"
-.Dd $Mdocdate: March 13 2015 $
+.Dd $Mdocdate: September 7 2015 $
.Dt LTRACE 1
.Os
.Sh NAME
@@ -129,12 +129,8 @@ trace various structures
.It Cm u
trace user data coming from
.Xr utrace 2
-.It Cm w
-trace context switch points
.It Cm +
trace the default points
-.Pq everything but context switch points
-.El
.It Fl u Ar trspec
Restrict the trace to a list of shared objects and/or function names, as
specified by the
diff --git a/usr.bin/ktrace/subr.c b/usr.bin/ktrace/subr.c
index 96bded2611a..cab26dcd92e 100644
--- a/usr.bin/ktrace/subr.c
+++ b/usr.bin/ktrace/subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr.c,v 1.9 2015/01/16 06:40:09 deraadt Exp $ */
+/* $OpenBSD: subr.c,v 1.10 2015/09/07 15:38:45 guenther Exp $ */
/* $NetBSD: subr.c,v 1.6 1995/08/31 23:01:45 jtc Exp $ */
/*-
@@ -65,9 +65,6 @@ getpoints(s)
case 's':
facs |= KTRFAC_PSIG;
break;
- case 'w':
- facs |= KTRFAC_CSW;
- break;
case 't':
facs |= KTRFAC_STRUCT;
break;