--- linux/arch/i386/kernel/process.c Fri Oct 12 22:22:20 2001 +++ linux/arch/i386/kernel/process.c Fri Oct 12 22:23:30 2001 @@ -516,7 +516,9 @@ */ void exit_thread(void) { +#ifdef CONFIG_KPERFCTR perfctr_exit_thread(¤t->thread); +#endif } void flush_thread(void) @@ -598,7 +600,9 @@ unlazy_fpu(current); struct_cpy(&p->thread.i387, ¤t->thread.i387); +#ifdef CONFIG_KPERFCTR perfctr_copy_thread(&p->thread); +#endif return 0; } @@ -682,7 +686,9 @@ *next = &next_p->thread; struct tss_struct *tss = init_tss + smp_processor_id(); +#ifdef CONFIG_KPERFCTR perfctr_suspend_thread(prev); +#endif unlazy_fpu(prev_p); @@ -740,7 +746,9 @@ tss->bitmap = INVALID_IO_BITMAP_OFFSET; } +#ifdef CONFIG_KPERFCTR perfctr_resume_thread(next); +#endif } asmlinkage int sys_fork(struct pt_regs regs)