summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-09-22 14:39:46 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-09-22 14:39:46 +0000
commit1031da441dc0dad98bf1bd76d877befbba8b0baa (patch)
treed44dfe847b39686051b30a6d953f4814b31385c2 /sys/arch
parentf898fce3d4855fe73fdaa806098c8c35d37d5b85 (diff)
Add systrace support.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/trap.c15
-rw-r--r--sys/arch/sgi/sgi/conf.c9
2 files changed, 14 insertions, 10 deletions
diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c
index 61edb1d1f36..870c9d6e981 100644
--- a/sys/arch/mips64/mips64/trap.c
+++ b/sys/arch/mips64/mips64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.10 2004/09/21 08:53:51 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.11 2004/09/22 14:39:44 miod Exp $ */
/* tracked to 1.23 */
/*
@@ -47,9 +47,6 @@
* THIS CODE SHOULD BE REWRITTEN!
*/
-#include "ppp.h"
-#include "bridge.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/exec.h>
@@ -90,6 +87,9 @@
#include <sys/cdefs.h>
#include <sys/syslog.h>
+#include "systrace.h"
+#include <dev/systrace.h>
+
int want_resched; /* resched() was called */
struct proc *machFPCurProcPtr; /* pointer to last proc to use FP */
@@ -530,7 +530,12 @@ printf("SIG-BUSB @%p pc %p, ra %p\n", trapframe->badvaddr, trapframe->pc, trapfr
else
trp[-1].code = code;
#endif
- i = (*callp->sy_call)(p, &args, rval);
+#if NSYSTRACE > 0
+ if (ISSET(p->p_flag, P_SYSTRACE))
+ i = systrace_redirect(code, p, args.i, rval);
+ else
+#endif
+ i = (*callp->sy_call)(p, &args, rval);
/*
* Reinitialize proc pointer `p' as it may be different
* if this is a child returning from fork syscall.
diff --git a/sys/arch/sgi/sgi/conf.c b/sys/arch/sgi/sgi/conf.c
index 1a25a9ca358..3f845e53294 100644
--- a/sys/arch/sgi/sgi/conf.c
+++ b/sys/arch/sgi/sgi/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.4 2004/09/21 07:55:50 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.5 2004/09/22 14:39:45 miod Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -45,8 +45,6 @@
#include <sys/tty.h>
#include <sys/conf.h>
-int ttselect __P((dev_t, int, struct proc *));
-
/*
* Block devices.
*/
@@ -151,7 +149,8 @@ cdev_decl(ksyms);
#include "pci.h"
cdev_decl(pci);
-#include <pf.h>
+#include "pf.h"
+#include "systrace.h"
struct cdevsw cdevsw[] =
{
@@ -209,7 +208,7 @@ cdev_wsdisplay_init(NWSDISPLAY, wsdisplay), /* 25: */
cdev_notdef(), /* 47: */
cdev_notdef(), /* 48: */
cdev_notdef(), /* 49: */
- cdev_notdef(), /* 50: */
+ cdev_systrace_init(NSYSTRACE,systrace), /* 50: system call tracing */
#ifdef XFS
cdev_xfs_init(NXFS,xfs_dev), /* 51: xfs communication device */
#else