aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2006-02-08 08:09:17 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2006-02-08 08:09:17 +0000
commiteb2da9a51f817e3511ca53ff5ada25bb5e2df790 (patch)
treedcc7f358367ea74ccf47cede57e272875e9b589d /sys/sparc64
parentf2b1bd14dc74a9b061aaec65ce71d9f27a77f31c (diff)
downloadsrc-eb2da9a51f817e3511ca53ff5ada25bb5e2df790.tar.gz
src-eb2da9a51f817e3511ca53ff5ada25bb5e2df790.zip
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.
Notes
Notes: svn path=/head/; revision=155455
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/trap.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c
index fb67479cfdd2..c38f72a7b6b5 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))