summaryrefslogtreecommitdiff
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
parentea7dd64533d76753a2e6f1ad27ad69d462393543 (diff)
Honor psratio for addupc_task(), as other arches do.
-rw-r--r--sys/arch/mvme88k/mvme88k/trap.c10
-rw-r--r--sys/arch/sparc/sparc/trap.c9
-rw-r--r--sys/arch/sparc64/sparc64/trap.c9
3 files changed, 19 insertions, 9 deletions
diff --git a/sys/arch/mvme88k/mvme88k/trap.c b/sys/arch/mvme88k/mvme88k/trap.c
index fee5e760639..ac40778ebcc 100644
--- a/sys/arch/mvme88k/mvme88k/trap.c
+++ b/sys/arch/mvme88k/mvme88k/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.34 2002/03/14 01:26:40 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.35 2002/03/26 01:00:27 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -159,8 +159,12 @@ userret(struct proc *p, struct m88100_saved_state *frame, u_quad_t oticks)
/*
* If profiling, charge recent system time to the trapped pc.
*/
- if (p->p_flag & P_PROFIL)
- addupc_task(p, frame->sxip & ~3,(int)(p->p_sticks - oticks));
+ if (p->p_flag & P_PROFIL) {
+ extern int psratio;
+
+ addupc_task(p, frame->sxip & ~3,
+ (int)(p->p_sticks - oticks) * psratio);
+ }
curpriority = p->p_priority;
}
diff --git a/sys/arch/sparc/sparc/trap.c b/sys/arch/sparc/sparc/trap.c
index 7b11d51d082..653ac487b94 100644
--- a/sys/arch/sparc/sparc/trap.c
+++ b/sys/arch/sparc/sparc/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.36 2002/03/14 01:26:44 millert Exp $ */
+/* $OpenBSD: trap.c,v 1.37 2002/03/26 01:00:30 miod Exp $ */
/* $NetBSD: trap.c,v 1.58 1997/09/12 08:55:01 pk Exp $ */
/*
@@ -237,8 +237,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);
+ }
curpriority = p->p_priority;
}
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;