Subject: syscall and traps accounting patch
To: None <port-alpha@netbsd.org>
From: Andrey Petrov <petrov@netbsd.org>
List: port-alpha
Date: 07/16/2004 14:51:46
Here is a small patch which corrects lack of traps and syscalls accounting.

Index: alpha/syscall.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/alpha/syscall.c,v
retrieving revision 1.14
diff -u -p -r1.14 syscall.c
--- alpha/syscall.c	13 Feb 2004 18:01:44 -0000	1.14
+++ alpha/syscall.c	16 Jul 2004 21:48:43 -0000
@@ -170,6 +170,7 @@ syscall_plain(struct lwp *l, u_int64_t c
 	struct proc *p = l->l_proc;
 	boolean_t needlock;
 
+	uvmexp.syscalls++;
 	l->l_md.md_tf = framep;
 
 	callp = p->p_emul->e_sysent;
Index: alpha/trap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/alpha/trap.c,v
retrieving revision 1.93
diff -u -p -r1.93 trap.c
--- alpha/trap.c	17 May 2004 17:43:08 -0000	1.93
+++ alpha/trap.c	16 Jul 2004 21:48:43 -0000
@@ -244,6 +244,8 @@ trap(const u_long a0, const u_long a1, c
 	int call_debugger = 1;
 #endif
 
+	uvmexp.traps++;
+
 	l = curlwp;
 
 	user = (framep->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0;