summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2006-02-08 08:09:17 +0000
committerphk <phk@FreeBSD.org>2006-02-08 08:09:17 +0000
commit74f8e63a104485f17205e2a3e446e00f968c324c (patch)
treedcc7f358367ea74ccf47cede57e272875e9b589d /sys/powerpc/aim
parent4d8070a25b5c7585b416e8a3db16fc15f2e3cd13 (diff)
downloadFreeBSD-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/powerpc/aim')
-rw-r--r--sys/powerpc/aim/trap.c7
1 files changed, 3 insertions, 4 deletions
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);
}
OpenPOWER on IntegriCloud