Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Fix previous - syscall_fancy() didn't con...
details: https://anonhg.NetBSD.org/src/rev/70cfd33e1e5f
branches: trunk
changeset: 780137:70cfd33e1e5f
user: dsl <dsl%NetBSD.org@localhost>
date: Thu Jul 12 18:13:08 2012 +0000
description:
Fix previous - syscall_fancy() didn't contain the check for p_trace_anabled.
diffstat:
sys/arch/i386/i386/freebsd_syscall.c | 10 ++++++----
sys/arch/i386/i386/ibcs2_syscall.c | 14 +++++++++-----
sys/arch/i386/i386/svr4_syscall.c | 14 +++++++++-----
3 files changed, 24 insertions(+), 14 deletions(-)
diffs (146 lines):
diff -r 1b8c265eaafa -r 70cfd33e1e5f sys/arch/i386/i386/freebsd_syscall.c
--- a/sys/arch/i386/i386/freebsd_syscall.c Thu Jul 12 17:37:24 2012 +0000
+++ b/sys/arch/i386/i386/freebsd_syscall.c Thu Jul 12 18:13:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: freebsd_syscall.c,v 1.38 2012/07/12 17:26:42 dsl Exp $ */
+/* $NetBSD: freebsd_syscall.c,v 1.39 2012/07/12 18:13:08 dsl Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: freebsd_syscall.c,v 1.38 2012/07/12 17:26:42 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: freebsd_syscall.c,v 1.39 2012/07/12 18:13:08 dsl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -112,7 +112,8 @@
goto bad;
}
- if ((error = trace_enter(code, args, callp->sy_narg)) == 0) {
+ if (!__predict_false(p->p_trace_enabled)
+ || (error = trace_enter(code, args, callp->sy_narg)) == 0) {
rval[0] = 0;
rval[1] = frame->tf_edx; /* need to keep edx for shared FreeBSD bins */
error = sy_call(callp, l, args, rval);
@@ -142,7 +143,8 @@
break;
}
- trace_exit(code, rval, error);
+ if (__predict_false(p->p_trace_enabled))
+ trace_exit(code, rval, error);
userret(l);
}
diff -r 1b8c265eaafa -r 70cfd33e1e5f sys/arch/i386/i386/ibcs2_syscall.c
--- a/sys/arch/i386/i386/ibcs2_syscall.c Thu Jul 12 17:37:24 2012 +0000
+++ b/sys/arch/i386/i386/ibcs2_syscall.c Thu Jul 12 18:13:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ibcs2_syscall.c,v 1.47 2012/07/12 17:26:42 dsl Exp $ */
+/* $NetBSD: ibcs2_syscall.c,v 1.48 2012/07/12 18:13:08 dsl Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_syscall.c,v 1.47 2012/07/12 17:26:42 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_syscall.c,v 1.48 2012/07/12 18:13:08 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vm86.h"
@@ -75,12 +75,14 @@
char * params;
const struct sysent *callp;
struct lwp *l;
+ struct proc *p;
int error;
size_t argsize;
register_t code, args[8], rval[2];
l = curlwp;
- LWP_CACHE_CREDS(l, l->l_proc);
+ p = l->l_proc;
+ LWP_CACHE_CREDS(l, p);
code = frame->tf_eax;
if (IBCS2_HIGH_SYSCALL(code))
@@ -109,7 +111,8 @@
goto bad;
}
- if ((error = trace_enter(code, args, callp->sy_narg)) == 0) {
+ if (!__predict_false(p->p_trace_enabled)
+ || (error = trace_enter(code, args, callp->sy_narg)) == 0) {
rval[0] = 0;
rval[1] = 0;
error = sy_call(callp, l, args, rval);
@@ -140,7 +143,8 @@
break;
}
- trace_exit(code, rval, error);
+ if (__predict_false(p->p_trace_enabled))
+ trace_exit(code, rval, error);
userret(l);
}
diff -r 1b8c265eaafa -r 70cfd33e1e5f sys/arch/i386/i386/svr4_syscall.c
--- a/sys/arch/i386/i386/svr4_syscall.c Thu Jul 12 17:37:24 2012 +0000
+++ b/sys/arch/i386/i386/svr4_syscall.c Thu Jul 12 18:13:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svr4_syscall.c,v 1.46 2012/07/12 17:26:42 dsl Exp $ */
+/* $NetBSD: svr4_syscall.c,v 1.47 2012/07/12 18:13:08 dsl Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: svr4_syscall.c,v 1.46 2012/07/12 17:26:42 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: svr4_syscall.c,v 1.47 2012/07/12 18:13:08 dsl Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vm86.h"
@@ -74,12 +74,14 @@
char *params;
const struct sysent *callp;
struct lwp *l;
+ struct proc *p;
int error;
size_t argsize;
register_t code, args[8], rval[2];
l = curlwp;
- LWP_CACHE_CREDS(l, l->l_proc);
+ p = l->l_proc;
+ LWP_CACHE_CREDS(l, p);
code = frame->tf_eax;
callp = svr4_sysent;
@@ -106,7 +108,8 @@
goto bad;
}
- if ((error = trace_enter(code, args, callp->sy_narg)) == 0) {
+ if (!__predict_false(p->p_trace_enabled)
+ || (error = trace_enter(code, args, callp->sy_narg)) == 0) {
rval[0] = 0;
rval[1] = 0;
error = sy_call(callp, l, args, rval);
@@ -137,7 +140,8 @@
break;
}
- trace_exit(code, rval, error);
+ if (__predict_false(p->p_trace_enabled))
+ trace_exit(code, rval, error);
userret(l);
}
Home |
Main Index |
Thread Index |
Old Index