Index: alpha/alpha/clock.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/clock.c,v retrieving revision 1.31 diff -u -r1.31 clock.c --- alpha/alpha/clock.c 26 May 2002 11:23:00 -0000 1.31 +++ alpha/alpha/clock.c 1 Feb 2003 17:36:24 -0000 @@ -446,17 +446,18 @@ hardclock(arg); } -/* - * We assume newhz is either stathz or profhz, and that neither will - * change after being set up above. Could recalculate intervals here - * but that would be a drag. - */ void -setstatclockrate(newhz) - int newhz; +cpu_startprofclock(void) { - /* nothing we can do */ + /* nothing to do */ +} + +void +cpu_stopprofclock(void) +{ + + /* nothing to do */ } /* Index: alpha/alpha/interrupt.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/interrupt.c,v retrieving revision 1.71 diff -u -r1.71 interrupt.c --- alpha/alpha/interrupt.c 1 Feb 2003 12:17:05 -0000 1.71 +++ alpha/alpha/interrupt.c 1 Feb 2003 17:36:24 -0000 @@ -472,16 +472,19 @@ #endif (*platform.clockintr)(framep); /* divide hz (1024) by 8 to get stathz (128) */ - if ((++schedclk2 & 0x7) == 0) + if ((++schedclk2 & 0x7) == 0) { + if (profprocs != 0) + profclock((struct clockframe *)framep); statclock((struct clockframe *)framep); + } #ifdef SMP } else { - mtx_lock_spin(&sched_lock); - hardclock_process(curthread, TRAPF_USERMODE(framep)); - if ((schedclk2 & 0x7) == 0) - statclock_process(curkse, TRAPF_PC(framep), - TRAPF_USERMODE(framep)); - mtx_unlock_spin(&sched_lock); + hardclock_process((struct clockframe *)framep); + if ((schedclk2 & 0x7) == 0) { + if (profprocs != 0) + profclock((struct clockframe *)framep); + statclock((struct clockframe *)framep); + } } #endif critical_exit(); Index: i386/i386/critical.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/critical.c,v retrieving revision 1.6 diff -u -r1.6 critical.c --- i386/i386/critical.c 1 Feb 2003 12:17:06 -0000 1.6 +++ i386/i386/critical.c 1 Feb 2003 17:36:24 -0000 @@ -15,6 +15,7 @@ #include #include #include +#include #include #ifdef SMP @@ -89,6 +90,10 @@ void i386_unpend(void) { + struct clockframe frame; + + frame.cf_cs = SEL_KPL; + frame.cf_eip = (register_t)i386_unpend; KASSERT(curthread->td_critnest == 0, ("unpend critnest != 0")); KASSERT((read_eflags() & PSL_I) == 0, ("unpend interrupts enabled1")); curthread->td_critnest = 1; @@ -131,15 +136,13 @@ PCPU_SET(spending, mask & ~(1 << irq)); switch(irq) { case 0: /* bit 0 - hardclock */ - mtx_lock_spin(&sched_lock); - hardclock_process(curthread, 0); - mtx_unlock_spin(&sched_lock); + hardclock_process(&frame); break; case 1: /* bit 1 - statclock */ - mtx_lock_spin(&sched_lock); - statclock_process(curthread->td_kse, - (register_t)i386_unpend, 0); - mtx_unlock_spin(&sched_lock); + if (profprocs != 0) + profclock(&frame); + if (pscnt == psdiv) + statclock(&frame); break; } KASSERT((read_eflags() & PSL_I) == 0, Index: i386/i386/mp_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v retrieving revision 1.198 diff -u -r1.198 mp_machdep.c --- i386/i386/mp_machdep.c 1 Feb 2003 12:17:06 -0000 1.198 +++ i386/i386/mp_machdep.c 1 Feb 2003 17:36:24 -0000 @@ -63,6 +63,7 @@ #include #include +#include #include #include #include @@ -2603,17 +2604,17 @@ * For statclock, we send an IPI to all CPU's to have them call this * function. * - * WARNING! unpend() will call statclock_process() directly and skip this + * WARNING! unpend() will call statclock() directly and skip this * routine. */ void -forwarded_statclock(struct trapframe frame) +forwarded_statclock(struct clockframe frame) { - mtx_lock_spin(&sched_lock); - statclock_process(curthread->td_kse, TRAPF_PC(&frame), - TRAPF_USERMODE(&frame)); - mtx_unlock_spin(&sched_lock); + if (profprocs != 0) + profclock(&frame); + if (pscnt == psdiv) + statclock(&frame); } void @@ -2642,12 +2643,10 @@ * routine. */ void -forwarded_hardclock(struct trapframe frame) +forwarded_hardclock(struct clockframe frame) { - mtx_lock_spin(&sched_lock); - hardclock_process(curthread, TRAPF_USERMODE(&frame)); - mtx_unlock_spin(&sched_lock); + hardclock_process(&frame); } void Index: i386/include/clock.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/clock.h,v retrieving revision 1.42 diff -u -r1.42 clock.h --- i386/include/clock.h 29 Jan 2003 11:36:39 -0000 1.42 +++ i386/include/clock.h 1 Feb 2003 17:36:24 -0000 @@ -16,6 +16,8 @@ */ extern int adjkerntz; extern int disable_rtc_set; +extern int pscnt; +extern int psdiv; extern int statclock_disable; extern u_int timer_freq; extern int timer0_max_count; Index: i386/include/smp.h =================================================================== RCS file: /home/ncvs/src/sys/i386/include/smp.h,v retrieving revision 1.73 diff -u -r1.73 smp.h --- i386/include/smp.h 17 Oct 2002 18:17:28 -0000 1.73 +++ i386/include/smp.h 1 Feb 2003 17:36:24 -0000 @@ -113,9 +113,9 @@ void bsp_apic_configure(void); void init_secondary(void); void forward_statclock(void); -void forwarded_statclock(struct trapframe frame); +void forwarded_statclock(struct clockframe frame); void forward_hardclock(void); -void forwarded_hardclock(struct trapframe frame); +void forwarded_hardclock(struct clockframe frame); void ipi_selected(u_int cpus, u_int ipi); void ipi_all(u_int ipi); void ipi_all_but_self(u_int ipi); Index: i386/isa/apic_vector.s =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/apic_vector.s,v retrieving revision 1.85 diff -u -r1.85 apic_vector.s --- i386/isa/apic_vector.s 23 Aug 2002 21:45:59 -0000 1.85 +++ i386/isa/apic_vector.s 1 Feb 2003 17:36:24 -0000 @@ -365,7 +365,7 @@ iret /* - * Forward hardclock to another CPU. Pushes a trapframe and calls + * Forward hardclock to another CPU. Pushes a clockframe and calls * forwarded_hardclock(). */ .text @@ -389,14 +389,16 @@ jmp 10f 1: incl TD_INTR_NESTING_LEVEL(%ebx) + pushl $0 /* XXX convert trapframe to clockframe */ call forwarded_hardclock + addl $4, %esp /* XXX convert clockframe to trapframe */ decl TD_INTR_NESTING_LEVEL(%ebx) 10: MEXITCOUNT jmp doreti /* - * Forward statclock to another CPU. Pushes a trapframe and calls + * Forward statclock to another CPU. Pushes a clockframe and calls * forwarded_statclock(). */ .text @@ -422,7 +424,9 @@ jmp 10f 1: incl TD_INTR_NESTING_LEVEL(%ebx) + pushl $0 /* XXX convert trapframe to clockframe */ call forwarded_statclock + addl $4, %esp /* XXX convert clockframe to trapframe */ decl TD_INTR_NESTING_LEVEL(%ebx) 10: MEXITCOUNT Index: i386/isa/clock.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/clock.c,v retrieving revision 1.192 diff -u -r1.192 clock.c --- i386/isa/clock.c 29 Jan 2003 11:36:39 -0000 1.192 +++ i386/isa/clock.c 1 Feb 2003 17:36:24 -0000 @@ -130,6 +130,8 @@ int adjkerntz; /* local offset from GMT in seconds */ int clkintr_pending; int disable_rtc_set; /* disable resettodr() if != 0 */ +int pscnt = 1; +int psdiv = 1; int statclock_disable; #ifndef TIMER_FREQ #define TIMER_FREQ 1193182 @@ -380,7 +382,13 @@ rtcintr(struct clockframe frame) { while (rtcin(RTC_INTR) & RTCIR_PERIOD) { - statclock(&frame); + if (profprocs != 0) { + if (--pscnt == 0) + pscnt = psdiv; + profclock(&frame); + } + if (pscnt == psdiv) + statclock(&frame); #ifdef SMP forward_statclock(); #endif @@ -1169,13 +1177,21 @@ #endif void -setstatclockrate(int newhz) +cpu_startprofclock(void) { - if (newhz == RTC_PROFRATE) - rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; - else - rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; + + rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF; + writertc(RTC_STATUSA, rtc_statusa); + psdiv = pscnt = psratio; +} + +void +cpu_stopprofclock(void) +{ + + rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); + psdiv = pscnt = 1; } static int Index: ia64/ia64/clock.c =================================================================== RCS file: /home/ncvs/src/sys/ia64/ia64/clock.c,v retrieving revision 1.19 diff -u -r1.19 clock.c --- ia64/ia64/clock.c 6 Jan 2003 01:39:24 -0000 1.19 +++ ia64/ia64/clock.c 1 Feb 2003 17:36:24 -0000 @@ -259,12 +259,19 @@ * change after being set up above. Could recalculate intervals here * but that would be a drag. */ + +void +cpu_startprofclock(void) +{ + + /* nothing to do */ +} + void -setstatclockrate(newhz) - int newhz; +cpu_stopprofclock(void) { - /* nothing we can do */ + /* nothing to do */ } /* Index: ia64/ia64/interrupt.c =================================================================== RCS file: /home/ncvs/src/sys/ia64/ia64/interrupt.c,v retrieving revision 1.35 diff -u -r1.35 interrupt.c --- ia64/ia64/interrupt.c 1 Feb 2003 12:17:06 -0000 1.35 +++ ia64/ia64/interrupt.c 1 Feb 2003 17:36:24 -0000 @@ -132,16 +132,19 @@ #endif hardclock((struct clockframe *)framep); /* divide hz (1024) by 8 to get stathz (128) */ - if ((++schedclk2 & 0x7) == 0) + if ((++schedclk2 & 0x7) == 0) { + if (profprocs != 0) + profclock((struct clockframe *)framep); statclock((struct clockframe *)framep); + } #ifdef SMP } else { - mtx_lock_spin(&sched_lock); - hardclock_process(curthread, TRAPF_USERMODE(framep)); - if ((schedclk2 & 0x7) == 0) - statclock_process(curkse, TRAPF_PC(framep), - TRAPF_USERMODE(framep)); - mtx_unlock_spin(&sched_lock); + hardclock_process((struct clockframe *)framep); + if ((schedclk2 & 0x7) == 0) { + if (profprocs != 0) + profclock((struct clockframe *)framep); + statclock((struct clockframe *)framep); + } } #endif critical_exit(); Index: kern/kern_clock.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_clock.c,v retrieving revision 1.145 diff -u -r1.145 kern_clock.c --- kern/kern_clock.c 1 Feb 2003 12:17:07 -0000 1.145 +++ kern/kern_clock.c 1 Feb 2003 17:36:24 -0000 @@ -122,10 +122,9 @@ int stathz; int profhz; -static int profprocs; +int profprocs; int ticks; -static int psdiv, pscnt; /* prof => stat divider */ -int psratio; /* ratio: prof / stat */ +int psratio; /* * Initialize clock frequencies and start both clocks running. @@ -141,7 +140,6 @@ * Set divisors to 1 (normal case) and let the machine-specific * code do its bit. */ - psdiv = pscnt = 1; cpu_initclocks(); #ifdef DEVICE_POLLING @@ -157,32 +155,27 @@ } /* - * Each time the real-time timer fires, this function is called on all CPUs - * with each CPU passing in its curthread as the first argument. If possible - * a nice optimization in the future would be to allow the CPU receiving the - * actual real-time timer interrupt to call this function on behalf of the - * other CPUs rather than sending an IPI to all other CPUs so that they - * can call this function. Note that hardclock() calls hardclock_process() - * for the CPU receiving the timer interrupt, so only the other CPUs in the - * system need to call this function (or have it called on their behalf. + * Each time the real-time timer fires, this function is called on all CPUs. + * Note that hardclock() calls hardclock_process() for the boot CPU, so only + * the other CPUs in the system need to call this function. */ void -hardclock_process(td, user) - struct thread *td; - int user; +hardclock_process(frame) + register struct clockframe *frame; { struct pstats *pstats; + struct thread *td = curthread; struct proc *p = td->td_proc; /* * Run current process's virtual and profile time, as needed. */ - mtx_assert(&sched_lock, MA_OWNED); + mtx_lock_spin_flags(&sched_lock, MTX_QUIET); if (p->p_flag & P_KSES) { /* XXXKSE What to do? */ } else { pstats = p->p_stats; - if (user && + if (CLKF_USERMODE(frame) && timevalisset(&pstats->p_timer[ITIMER_VIRTUAL].it_value) && itimerdecr(&pstats->p_timer[ITIMER_VIRTUAL], tick) == 0) { p->p_sflag |= PS_ALRMPEND; @@ -194,6 +187,7 @@ td->td_kse->ke_flags |= KEF_ASTPENDING; } } + mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); } /* @@ -206,9 +200,7 @@ int need_softclock = 0; CTR0(KTR_CLK, "hardclock fired"); - mtx_lock_spin_flags(&sched_lock, MTX_QUIET); - hardclock_process(curthread, CLKF_USERMODE(frame)); - mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); + hardclock_process(frame); tc_ticktock(); /* @@ -312,7 +304,6 @@ startprofclock(p) register struct proc *p; { - int s; /* * XXX; Right now sched_lock protects statclock(), but perhaps @@ -322,12 +313,8 @@ mtx_lock_spin(&sched_lock); if ((p->p_sflag & PS_PROFIL) == 0) { p->p_sflag |= PS_PROFIL; - if (++profprocs == 1 && stathz != 0) { - s = splstatclock(); - psdiv = pscnt = psratio; - setstatclockrate(profhz); - splx(s); - } + if (++profprocs == 1) + cpu_startprofclock(); } mtx_unlock_spin(&sched_lock); } @@ -339,57 +326,41 @@ stopprofclock(p) register struct proc *p; { - int s; mtx_lock_spin(&sched_lock); if (p->p_sflag & PS_PROFIL) { p->p_sflag &= ~PS_PROFIL; - if (--profprocs == 0 && stathz != 0) { - s = splstatclock(); - psdiv = pscnt = 1; - setstatclockrate(stathz); - splx(s); - } + if (--profprocs == 0) + cpu_stopprofclock(); } mtx_unlock_spin(&sched_lock); } /* - * Do process and kernel statistics. Most of the statistics are only + * Statistics clock. Grab profile sample, and if divider reaches 0, + * do process and kernel statistics. Most of the statistics are only * used by user-level statistics programs. The main exceptions are - * ke->ke_uticks, p->p_sticks, p->p_iticks, and p->p_estcpu. This function - * should be called by all CPUs in the system for each statistics clock - * interrupt. See the description of hardclock_process for more detail on - * this function's relationship to statclock. + * ke->ke_uticks, p->p_sticks, p->p_iticks, and p->p_estcpu. + * This should be called by all active processors. */ void -statclock_process(ke, pc, user) - struct kse *ke; - register_t pc; - int user; +statclock(frame) + register struct clockframe *frame; { -#ifdef GPROF - struct gmonparam *g; - int i; -#endif struct pstats *pstats; - long rss; struct rusage *ru; struct vmspace *vm; - struct proc *p = ke->ke_proc; - struct thread *td = ke->ke_thread; /* current thread */ + struct thread *td; + struct kse *ke; + struct proc *p; + long rss; - KASSERT(ke == curthread->td_kse, ("statclock_process: td != curthread")); - mtx_assert(&sched_lock, MA_OWNED); - if (user) { - /* - * Came from user mode; CPU was in user state. - * If this process is being profiled, record the tick. - */ - if (p->p_sflag & PS_PROFIL) - addupc_intr(ke, pc, 1); - if (pscnt < psdiv) - return; + td = curthread; + ke = td->td_kse; + p = td->td_proc; + + mtx_lock_spin_flags(&sched_lock, MTX_QUIET); + if (CLKF_USERMODE(frame)) { /* * Charge the time as appropriate. */ @@ -401,21 +372,6 @@ else cp_time[CP_USER]++; } else { -#ifdef GPROF - /* - * Kernel statistics are just like addupc_intr, only easier. - */ - g = &_gmonparam; - if (g->state == GMON_PROF_ON) { - i = pc - g->lowpc; - if (i < g->textsize) { - i /= HISTFRACTION * sizeof(*g->kcount); - g->kcount[i]++; - } - } -#endif - if (pscnt < psdiv) - return; /* * Came from kernel mode, so we were: * - handling an interrupt, @@ -455,25 +411,43 @@ if (ru->ru_maxrss < rss) ru->ru_maxrss = rss; } + mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); } -/* - * Statistics clock. Grab profile sample, and if divider reaches 0, - * do process and kernel statistics. Most of the statistics are only - * used by user-level statistics programs. The main exceptions are - * ke->ke_uticks, p->p_sticks, p->p_iticks, and p->p_estcpu. - */ void -statclock(frame) +profclock(frame) register struct clockframe *frame; { + struct thread *td; +#ifdef GPROF + struct gmonparam *g; + int i; +#endif - CTR0(KTR_CLK, "statclock fired"); - mtx_lock_spin_flags(&sched_lock, MTX_QUIET); - if (--pscnt == 0) - pscnt = psdiv; - statclock_process(curthread->td_kse, CLKF_PC(frame), CLKF_USERMODE(frame)); - mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); + if (CLKF_USERMODE(frame)) { + /* + * Came from user mode; CPU was in user state. + * If this process is being profiled, record the tick. + */ + td = curthread; + if (td->td_proc->p_sflag & PS_PROFIL) + addupc_intr(td->td_kse, CLKF_PC(frame), 1); + } +#ifdef GPROF + else { + /* + * Kernel statistics are just like addupc_intr, only easier. + */ + g = &_gmonparam; + if (g->state == GMON_PROF_ON) { + i = CLKF_PC(frame) - g->lowpc; + if (i < g->textsize) { + i /= HISTFRACTION * sizeof(*g->kcount); + g->kcount[i]++; + } + } + } +#endif } /* Index: pc98/pc98/clock.c =================================================================== RCS file: /home/ncvs/src/sys/pc98/pc98/clock.c,v retrieving revision 1.118 diff -u -r1.118 clock.c --- pc98/pc98/clock.c 30 Jan 2003 13:23:18 -0000 1.118 +++ pc98/pc98/clock.c 1 Feb 2003 17:36:24 -0000 @@ -140,6 +140,8 @@ int adjkerntz; /* local offset from GMT in seconds */ int clkintr_pending; int disable_rtc_set; /* disable resettodr() if != 0 */ +int pscnt = 1; +int psdiv = 1; int statclock_disable; #ifndef TIMER_FREQ #ifdef PC98 @@ -441,7 +443,13 @@ rtcintr(struct clockframe frame) { while (rtcin(RTC_INTR) & RTCIR_PERIOD) { - statclock(&frame); + if (profprocs != 0) { + if (--pscnt == 0) + pscnt = psdiv; + profclock(&frame); + } + if (pscnt == psdiv) + statclock(&frame); #ifdef SMP forward_statclock(); #endif @@ -1518,7 +1526,7 @@ #endif void -setstatclockrate(int newhz) +cpu_startprofclock(void) { #ifndef PC98 if (newhz == RTC_PROFRATE) @@ -1527,6 +1535,11 @@ rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF; writertc(RTC_STATUSA, rtc_statusa); #endif +} + +void +cpu_stopprofclock(void) +{ } static int Index: powerpc/powerpc/clock.c =================================================================== RCS file: /home/ncvs/src/sys/powerpc/powerpc/clock.c,v retrieving revision 1.10 diff -u -r1.10 clock.c --- powerpc/powerpc/clock.c 8 Jan 2003 12:17:44 -0000 1.10 +++ powerpc/powerpc/clock.c 1 Feb 2003 17:36:24 -0000 @@ -319,8 +319,13 @@ * Nothing to do. */ void -setstatclockrate(int arg) +cpu_startprofclock(void) { /* Do nothing */ +} + +void +cpu_stopprofclock(void) +{ } Index: sparc64/sparc64/clock.c =================================================================== RCS file: /home/ncvs/src/sys/sparc64/sparc64/clock.c,v retrieving revision 1.9 diff -u -r1.9 clock.c --- sparc64/sparc64/clock.c 22 Oct 2002 07:10:15 -0000 1.9 +++ sparc64/sparc64/clock.c 1 Feb 2003 17:40:21 -0000 @@ -48,9 +48,13 @@ } void -setstatclockrate(int newhz) +cpu_startprofclock(void) +{ +} + +void +cpu_stopprofclock(void) { - /* TODO; */ } int Index: sparc64/sparc64/tick.c =================================================================== RCS file: /home/ncvs/src/sys/sparc64/sparc64/tick.c,v retrieving revision 1.10 diff -u -r1.10 tick.c --- sparc64/sparc64/tick.c 1 Feb 2003 12:17:08 -0000 1.10 +++ sparc64/sparc64/tick.c 1 Feb 2003 17:47:17 -0000 @@ -57,6 +57,7 @@ void cpu_initclocks(void) { + stathz = hz; tick_start(tick_hardclock); } @@ -64,20 +65,13 @@ tick_process(struct clockframe *cf) { -#ifdef SMP if (PCPU_GET(cpuid) == 0) hardclock(cf); - else { - CTR1(KTR_CLK, "tick_process: AP, cpuid=%d", PCPU_GET(cpuid)); - mtx_lock_spin_flags(&sched_lock, MTX_QUIET); - hardclock_process(curthread, CLKF_USERMODE(cf)); - statclock_process(curthread->td_kse, CLKF_PC(cf), - CLKF_USERMODE(cf)); - mtx_unlock_spin_flags(&sched_lock, MTX_QUIET); - } -#else - hardclock(cf); -#endif + else + hardclock_process(cf); + if (profprocs != 0) + profclock(cf); + statclock(cf); } void Index: sys/kernel.h =================================================================== RCS file: /home/ncvs/src/sys/sys/kernel.h,v retrieving revision 1.107 diff -u -r1.107 kernel.h --- sys/kernel.h 20 Oct 2002 08:17:39 -0000 1.107 +++ sys/kernel.h 1 Feb 2003 17:36:24 -0000 @@ -75,6 +75,7 @@ extern int psratio; /* ratio: prof / stat */ extern int stathz; /* statistics clock's frequency */ extern int profhz; /* profiling clock's frequency */ +extern int profprocs; /* number of process's profiling */ extern int ticks; extern int lbolt; /* once a second sleep address */ Index: sys/systm.h =================================================================== RCS file: /home/ncvs/src/sys/sys/systm.h,v retrieving revision 1.187 diff -u -r1.187 systm.h --- sys/systm.h 1 Feb 2003 12:17:09 -0000 1.187 +++ sys/systm.h 1 Feb 2003 17:36:24 -0000 @@ -199,14 +199,15 @@ void realitexpire(void *); void hardclock(struct clockframe *frame); -void hardclock_process(struct thread *td, int user); +void hardclock_process(struct clockframe *frame); void softclock(void *); void statclock(struct clockframe *frame); -void statclock_process(struct kse *ke, register_t pc, int user); +void profclock(struct clockframe *frame); void startprofclock(struct proc *); void stopprofclock(struct proc *); -void setstatclockrate(int hzrate); +void cpu_startprofclock(void); +void cpu_stopprofclock(void); /* flags for suser() and suser_cred() */ #define PRISON_ROOT 1