-/* $OpenBSD: kern_clock.c,v 1.107 2023/03/03 20:16:44 cheloha Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.108 2023/04/25 00:58:47 cheloha Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
if (CLKF_USERMODE(frame)) {
pr = p->p_p;
if (pr->ps_flags & PS_PROFIL)
- addupc_intr(p, CLKF_PC(frame));
+ addupc_intr(p, CLKF_PC(frame), 1);
if (--spc->spc_pscnt > 0)
return;
/*
}
#endif
if (p != NULL && p->p_p->ps_flags & PS_PROFIL)
- addupc_intr(p, PROC_PC(p));
+ addupc_intr(p, PROC_PC(p), 1);
if (--spc->spc_pscnt > 0)
return;
/*
-/* $OpenBSD: subr_prof.c,v 1.31 2021/09/03 16:45:45 jasper Exp $ */
+/* $OpenBSD: subr_prof.c,v 1.32 2023/04/25 00:58:47 cheloha Exp $ */
/* $NetBSD: subr_prof.c,v 1.12 1996/04/22 01:38:50 christos Exp $ */
/*-
* Trap will then call addupc_task().
*/
void
-addupc_intr(struct proc *p, u_long pc)
+addupc_intr(struct proc *p, u_long pc, u_long nticks)
{
struct uprof *prof;
return; /* out of range; ignore */
p->p_prof_addr = pc;
- p->p_prof_ticks++;
+ p->p_prof_ticks += nticks;
atomic_setbits_int(&p->p_flag, P_OWEUPC);
need_proftick(p);
}
-/* $OpenBSD: resourcevar.h,v 1.25 2022/03/18 14:45:39 visa Exp $ */
+/* $OpenBSD: resourcevar.h,v 1.26 2023/04/25 00:58:47 cheloha Exp $ */
/* $NetBSD: resourcevar.h,v 1.12 1995/11/22 23:01:53 cgd Exp $ */
/*
#include <lib/libkern/libkern.h> /* for KASSERT() */
-void addupc_intr(struct proc *, u_long);
+void addupc_intr(struct proc *, u_long, u_long);
void addupc_task(struct proc *, u_long, u_int);
void tuagg_unlocked(struct process *, struct proc *);
void tuagg(struct process *, struct proc *);