diff options
author | bde <bde@FreeBSD.org> | 1996-06-25 20:02:16 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-06-25 20:02:16 +0000 |
commit | b78ec1326fea8cfb976e7abdf10620439850a0a0 (patch) | |
tree | c03e6b6eda5a905cdc18da08c49cfe58e6af2c5b /sys/amd64/amd64/trap.c | |
parent | 3d80cb8e5e226da61878d59c56b97b2aca43c535 (diff) | |
download | FreeBSD-src-b78ec1326fea8cfb976e7abdf10620439850a0a0.zip FreeBSD-src-b78ec1326fea8cfb976e7abdf10620439850a0a0.tar.gz |
trap.c:
Fixed profiling of system times. It was pre-4.4Lite and didn't support
statclocks. System times were too small by a factor of 8.
Handle deferred profiling ticks the 4.4Lite way: use addupc_task() instead
of addupc(). Call addupc_task() directly instead of using the ADDUPC()
macro.
Removed vestigial support for PROFTIMER.
switch.s:
Removed addupc().
resourcevar.h:
Removed ADDUPC() and declarations of addupc().
cpu.h:
Updated a comment. i386's never were tahoe's, and the deferred profiling
tick became (possibly) multiple ticks in 4.4Lite.
Obtained from: mostly from NetBSD
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r-- | sys/amd64/amd64/trap.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 224a6f4..2ee576a 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.77 1996/06/12 05:02:54 gpalmer Exp $ + * $Id: trap.c,v 1.78 1996/06/13 07:17:21 asami Exp $ */ /* @@ -163,19 +163,10 @@ userret(p, frame, oticks) /* * Charge system time if profiling. */ - if (p->p_flag & P_PROFIL) { - u_quad_t ticks = p->p_sticks - oticks; - - if (ticks) { -#ifdef PROFTIMER - extern int profscale; - addupc(frame->tf_eip, &p->p_stats->p_prof, - ticks * profscale); -#else - addupc(frame->tf_eip, &p->p_stats->p_prof, ticks); -#endif - } - } + if (p->p_flag & P_PROFIL) + addupc_task(p, frame->tf_eip, + (u_int)(p->p_sticks - oticks) * psratio); + curpriority = p->p_priority; } @@ -227,8 +218,9 @@ trap(frame) astoff(); cnt.v_soft++; if (p->p_flag & P_OWEUPC) { - addupc(frame.tf_eip, &p->p_stats->p_prof, 1); p->p_flag &= ~P_OWEUPC; + addupc_task(p, p->p_stats->p_prof.pr_addr, + p->p_stats->p_prof.pr_ticks); } goto out; |