Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern also feed getdents/readdir data to KTRACE



details:   https://anonhg.NetBSD.org/src/rev/39b85d6fe805
branches:  trunk
changeset: 551242:39b85d6fe805
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Sep 02 12:31:35 2003 +0000

description:
also feed getdents/readdir data to KTRACE

diffstat:

 sys/kern/vfs_syscalls.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (47 lines):

diff -r bca748335be0 -r 39b85d6fe805 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Tue Sep 02 12:19:38 2003 +0000
+++ b/sys/kern/vfs_syscalls.c   Tue Sep 02 12:31:35 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.191 2003/08/07 16:32:03 agc Exp $   */
+/*     $NetBSD: vfs_syscalls.c,v 1.192 2003/09/02 12:31:35 drochner Exp $      */
 
 /*
  * Copyright (c) 1989, 1993
@@ -37,10 +37,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.191 2003/08/07 16:32:03 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.192 2003/09/02 12:31:35 drochner Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_43.h"
+#include "opt_ktrace.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -58,6 +59,9 @@
 #include <sys/sysctl.h>
 #include <sys/sa.h>
 #include <sys/syscallargs.h>
+#ifdef KTRACE
+#include <sys/ktrace.h>
+#endif
 
 #include <miscfs/genfs/genfs.h>
 #include <miscfs/syncfs/syncfs.h>
@@ -3149,6 +3153,14 @@
        }
        error = vn_readdir(fp, SCARG(uap, buf), UIO_USERSPACE,
                        SCARG(uap, count), &done, p, 0, 0);
+#ifdef KTRACE
+       if (!error && KTRPOINT(p, KTR_GENIO)) {
+               struct iovec iov;
+               iov.iov_base = SCARG(uap, buf);
+               iov.iov_len = done;
+               ktrgenio(p, SCARG(uap, fd), UIO_READ, &iov, done, 0);
+       }
+#endif
        *retval = done;
  out:
        FILE_UNUSE(fp, p);



Home | Main Index | Thread Index | Old Index