From 1031da441dc0dad98bf1bd76d877befbba8b0baa Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 22 Sep 2004 14:39:46 +0000 Subject: Add systrace support. --- sys/arch/mips64/mips64/trap.c | 15 ++++++++++----- sys/arch/sgi/sgi/conf.c | 9 ++++----- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'sys/arch') 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 #include #include @@ -90,6 +87,9 @@ #include #include +#include "systrace.h" +#include + 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 #include -int ttselect __P((dev_t, int, struct proc *)); - /* * Block devices. */ @@ -151,7 +149,8 @@ cdev_decl(ksyms); #include "pci.h" cdev_decl(pci); -#include +#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 -- cgit v1.2.3