X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Foprofile%2Ftimer_int.c;h=710a45f0d734430871c21a8731108c483e07f2c5;hb=12b6c928ddb4b094b3a6b11e22c3debddccf1dfb;hp=543d2cb5f242fddf5cc50f09827e9dc4681f125d;hpb=433e2af4175021d339b067f6e7ee0a4e4c4f7e2d;p=linux-2.6.git diff --git a/drivers/oprofile/timer_int.c b/drivers/oprofile/timer_int.c index 543d2cb5f..710a45f0d 100644 --- a/drivers/oprofile/timer_int.c +++ b/drivers/oprofile/timer_int.c @@ -14,13 +14,12 @@ #include #include #include - + +#include "oprof.h" + static int timer_notify(struct pt_regs *regs) { - int cpu = smp_processor_id(); - unsigned long eip = profile_pc(regs); - - oprofile_add_sample(eip, !user_mode(regs), 0, cpu); + oprofile_add_sample(regs, 0); return 0; } @@ -36,15 +35,12 @@ static void timer_stop(void) } -static struct oprofile_operations timer_ops = { - .start = timer_start, - .stop = timer_stop, - .cpu_type = "timer" -}; - - -void __init timer_init(struct oprofile_operations ** ops) +void __init oprofile_timer_init(struct oprofile_operations * ops) { - *ops = &timer_ops; - printk(KERN_INFO "oprofile: using timer interrupt.\n"); + ops->create_files = NULL; + ops->setup = NULL; + ops->shutdown = NULL; + ops->start = timer_start; + ops->stop = timer_stop; + ops->cpu_type = "timer"; }