diff options
author | phk <phk@FreeBSD.org> | 2006-02-08 08:09:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2006-02-08 08:09:17 +0000 |
commit | 74f8e63a104485f17205e2a3e446e00f968c324c (patch) | |
tree | dcc7f358367ea74ccf47cede57e272875e9b589d /sys/sparc64 | |
parent | 4d8070a25b5c7585b416e8a3db16fc15f2e3cd13 (diff) | |
download | FreeBSD-src-74f8e63a104485f17205e2a3e446e00f968c324c.zip FreeBSD-src-74f8e63a104485f17205e2a3e446e00f968c324c.tar.gz |
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.
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/trap.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index fb67479..c38f72a 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -230,7 +230,6 @@ trap(struct trapframe *tf) { struct thread *td; struct proc *p; - u_int sticks; int error; int sig; ksiginfo_t ksi; @@ -248,7 +247,7 @@ trap(struct trapframe *tf) KASSERT(td->td_proc != NULL, ("trap: curproc NULL")); p = td->td_proc; - sticks = td->td_sticks; + td->td_pticks = 0; td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); @@ -293,7 +292,7 @@ trap(struct trapframe *tf) trapsignal(td, &ksi); } - userret(td, tf, sticks); + userret(td, tf); mtx_assert(&Giant, MA_NOTOWNED); } else { KASSERT((tf->tf_type & T_KERNEL) != 0, @@ -502,7 +501,6 @@ syscall(struct trapframe *tf) register_t args[8]; register_t *argp; struct proc *p; - u_int sticks; u_long code; u_long tpc; int reg; @@ -523,7 +521,7 @@ syscall(struct trapframe *tf) reg = 0; regcnt = REG_MAXARGS; - sticks = td->td_sticks; + td->td_pticks = 0; td->td_frame = tf; if (td->td_ucred != p->p_ucred) cred_update_thread(td); @@ -646,7 +644,7 @@ syscall(struct trapframe *tf) /* * Handle reschedule and other end-of-syscall issues */ - userret(td, tf, sticks); + userret(td, tf); #ifdef KTRACE if (KTRPOINT(td, KTR_SYSRET)) |