diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-07-05 12:24:17 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2020-07-05 12:24:17 +0000 |
commit | ba426f77868ab3947a57d1ecaf4a03802a716c97 (patch) | |
tree | b7cd53d2945a87f33b65f81baa93bc4fb0ad7e52 /sys/arch | |
parent | 74eaae19488f75534d7308a0c892f09a4b16faa0 (diff) |
Count traps and interrupts. And count system calls in the same place
since this makes it easier to reason about the accounting.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/powerpc64/powerpc64/syscall.c | 4 | ||||
-rw-r--r-- | sys/arch/powerpc64/powerpc64/trap.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/powerpc64/powerpc64/syscall.c b/sys/arch/powerpc64/powerpc64/syscall.c index 4e9221e5625..a62723814fb 100644 --- a/sys/arch/powerpc64/powerpc64/syscall.c +++ b/sys/arch/powerpc64/powerpc64/syscall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.c,v 1.4 2020/06/26 20:58:38 kettenis Exp $ */ +/* $OpenBSD: syscall.c,v 1.5 2020/07/05 12:24:16 kettenis Exp $ */ /* * Copyright (c) 2015 Dale Rahn <drahn@dalerahn.com> @@ -34,8 +34,6 @@ syscall(struct trapframe *frame) int nap = 8, nargs; register_t *ap, *args, copyargs[MAXARGS], rval[2]; - uvmexp.syscalls++; - code = frame->fixreg[0]; callp = p->p_p->ps_emul->e_sysent; nsys = p->p_p->ps_emul->e_nsysent; diff --git a/sys/arch/powerpc64/powerpc64/trap.c b/sys/arch/powerpc64/powerpc64/trap.c index 4ce5adcdf3a..b7df3082345 100644 --- a/sys/arch/powerpc64/powerpc64/trap.c +++ b/sys/arch/powerpc64/powerpc64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.23 2020/07/04 16:27:00 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.24 2020/07/05 12:24:16 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -59,15 +59,23 @@ trap(struct trapframe *frame) switch (type) { case EXC_DECR: + uvmexp.intrs++; ci->ci_idepth++; decr_intr(frame); ci->ci_idepth--; return; case EXC_HVI: + uvmexp.intrs++; ci->ci_idepth++; hvi_intr(frame); ci->ci_idepth--; return; + case EXC_SC: + uvmexp.syscalls++; + break; + default: + uvmexp.traps++; + break; } if (frame->srr1 & PSL_EE) |