summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2002-03-26 01:00:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2002-03-26 01:00:31 +0000
commitd07fc347fffd520b5773088a7fe99cf55c94e38f (patch)
treee092a543b7f0d64ae1c0175736672d99a3f7053f /sys/arch/sparc64
parentea7dd64533d76753a2e6f1ad27ad69d462393543 (diff)
Honor psratio for addupc_task(), as other arches do.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/trap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index cf9a0e8f8f5..2abccb51f90 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.17 2002/03/14 01:26:45 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.18 2002/03/26 01:00:30 miod Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -368,8 +368,11 @@ userret(p, pc, oticks)
/*
* If profiling, charge recent system time to the trapped pc.
*/
- if (p->p_flag & P_PROFIL)
- addupc_task(p, pc, (int)(p->p_sticks - oticks));
+ if (p->p_flag & P_PROFIL) {
+ extern int psratio;
+
+ addupc_task(p, pc, (int)(p->p_sticks - oticks) * psratio);
+ }
#ifdef notyet
curcpu()->ci_schedstate.spc_curpriority = p->p_priority;