diff options
| author | dsl <dsl@NetBSD.org> | 2007-10-28 18:35:49 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2007-10-28 18:35:49 +0000 |
| commit | 121ee101f7921631e335e75bb2caed4cc22b1901 (patch) | |
| tree | 1d7357ef2537ba267ea871fc754c677f85d7f094 /sys | |
| parent | b86dc43816bd6fbf71c65495ecfd283a4af1a724 (diff) | |
Add support for the SYSCALL_STATS and SYSCALL_TIMES options.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/amd64/amd64/syscall.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/syscall.c b/sys/arch/amd64/amd64/syscall.c index 86173be69af..d81123854a3 100644 --- a/sys/arch/amd64/amd64/syscall.c +++ b/sys/arch/amd64/amd64/syscall.c @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.29 2007/10/27 22:56:41 dsl Exp $ */ +/* $NetBSD: syscall.c,v 1.30 2007/10/28 18:35:49 dsl Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #ifndef BUILD_SYSCALL_PLAIN /* See bottom of file */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.29 2007/10/27 22:56:41 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.30 2007/10/28 18:35:49 dsl Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -48,6 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.29 2007/10/27 22:56:41 dsl Exp $"); #include <sys/ktrace.h> #include <sys/systrace.h> #include <sys/syscall.h> +#include <sys/syscall_stats.h> #include <uvm/uvm_extern.h> @@ -112,6 +113,7 @@ syscall_fancy(struct trapframe *frame) /* * Code is first argument, followed by actual args. */ + SYSCALL_COUNT(syscall_counts, code); code = frame->tf_rdi & (SYS_NSYSENT - 1); callp += code; if (callp->sy_argsize != 0) { @@ -146,6 +148,9 @@ syscall_fancy(struct trapframe *frame) } } + SYSCALL_COUNT(syscall_counts, code); + SYSCALL_TIME_SYS_ENTRY(l, syscall_times, code); + if ((error = trace_enter(l, code, code, NULL, args)) == 0) { rval[0] = 0; rval[1] = 0; @@ -187,6 +192,7 @@ syscall_fancy(struct trapframe *frame) trace_exit(l, code, args, rval, error); + SYSCALL_TIME_SYS_EXIT(l); userret(l); } |
