From 74f8e63a104485f17205e2a3e446e00f968c324c Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 8 Feb 2006 08:09:17 +0000 Subject: Simplify system time accounting for profiling. Rename struct thread's td_sticks to td_pticks, we will need the other name for more appropriately named use shortly. Reduce it from uint64_t to u_int. Clear td_pticks whenever we enter the kernel instead of recording its value as reference for userret(). Use the absolute value of td->pticks in userret() and eliminate third argument. --- sys/powerpc/aim/trap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/powerpc/aim') diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c index 72da805..7d3deba 100644 --- a/sys/powerpc/aim/trap.c +++ b/sys/powerpc/aim/trap.c @@ -143,7 +143,7 @@ trap(struct trapframe *frame) struct thread *td; struct proc *p; int sig, type, user; - u_int sticks, ucode; + u_int ucode; ksiginfo_t ksi; PCPU_LAZY_INC(cnt.v_trap); @@ -154,13 +154,12 @@ trap(struct trapframe *frame) type = ucode = frame->exc; sig = 0; user = frame->srr1 & PSL_PR; - sticks = 0; CTR3(KTR_TRAP, "trap: %s type=%s (%s)", p->p_comm, trapname(type), user ? "user" : "kernel"); if (user) { - sticks = td->td_sticks; + td->td_pticks = 0; td->td_frame = frame; if (td->td_ucred != p->p_ucred) cred_update_thread(td); @@ -263,7 +262,7 @@ trap(struct trapframe *frame) trapsignal(td, &ksi); } - userret(td, frame, sticks); + userret(td, frame); mtx_assert(&Giant, MA_NOTOWNED); } -- cgit v1.1