Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/mach Trace data movement with vm_read and vm_write
details: https://anonhg.NetBSD.org/src/rev/3014dcf7235d
branches: trunk
changeset: 555883:3014dcf7235d
user: manu <manu%NetBSD.org@localhost>
date: Wed Dec 03 18:19:12 2003 +0000
description:
Trace data movement with vm_read and vm_write
diffstat:
sys/compat/mach/mach_vm.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diffs (61 lines):
diff -r 7ffa6046d273 -r 3014dcf7235d sys/compat/mach/mach_vm.c
--- a/sys/compat/mach/mach_vm.c Wed Dec 03 18:18:43 2003 +0000
+++ b/sys/compat/mach/mach_vm.c Wed Dec 03 18:19:12 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mach_vm.c,v 1.40 2003/11/29 23:56:08 manu Exp $ */
+/* $NetBSD: mach_vm.c,v 1.41 2003/12/03 18:19:12 manu Exp $ */
/*-
* Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
@@ -36,8 +36,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "opt_ktrace.h"
+
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mach_vm.c,v 1.40 2003/11/29 23:56:08 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mach_vm.c,v 1.41 2003/12/03 18:19:12 manu Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -50,6 +52,7 @@
#include <sys/vnode.h>
#include <sys/file.h>
#include <sys/filedesc.h>
+#include <sys/ktrace.h>
#include <sys/exec.h>
#include <sys/syscallargs.h>
@@ -793,6 +796,11 @@
return mach_msg_error(args, EFAULT);
}
+#ifdef KTRACE
+ if (KTRPOINT(l->l_proc, KTR_MOOL) && error == 0)
+ ktrmool(l->l_proc, buf, size, (void *)va);
+#endif
+
free(buf, M_WAITOK);
rep->rep_msgh.msgh_bits =
@@ -821,6 +829,7 @@
mach_vm_write_request_t *req = args->smsg;
mach_vm_write_reply_t *rep = args->rmsg;
size_t *msglen = args->rsize;
+ struct lwp *l = args->l;
struct lwp *tl = args->tl;
size_t size;
void *addr;
@@ -853,6 +862,11 @@
return mach_msg_error(args, EFAULT);
}
+#ifdef KTRACE
+ if (KTRPOINT(l->l_proc, KTR_MOOL) && error == 0)
+ ktrmool(l->l_proc, buf, size, (void *)addr);
+#endif
+
free(buf, M_WAITOK);
rep->rep_msgh.msgh_bits =
Home |
Main Index |
Thread Index |
Old Index