X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fia64%2Foprofile%2Fperfmon.c;h=bc41dd32fec674c418bff10ce2979179a4ee359e;hb=refs%2Fheads%2Fvserver;hp=bfc82ccf543281d9bb00e5842b0539a51677c613;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/arch/ia64/oprofile/perfmon.c b/arch/ia64/oprofile/perfmon.c index bfc82ccf5..bc41dd32f 100644 --- a/arch/ia64/oprofile/perfmon.c +++ b/arch/ia64/oprofile/perfmon.c @@ -8,7 +8,6 @@ */ #include -#include #include #include #include @@ -21,8 +20,6 @@ static int perfmon_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct pt_regs *regs, unsigned long stamp) { - int cpu = smp_processor_id(); - unsigned long eip = instruction_pointer(regs); int event = arg->pmd_eventid; arg->ovfl_ctrl.bits.reset_ovfl_pmds = 1; @@ -31,7 +28,7 @@ perfmon_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, * without perfmon being shutdown (e.g. SIGSEGV) */ if (allow_ints) - oprofile_add_sample(eip, !user_mode(regs), event, cpu); + oprofile_add_sample(regs, event); return 0; } @@ -75,21 +72,18 @@ static char * get_cpu_type(void) /* all the ops are handled via userspace for IA64 perfmon */ -static struct oprofile_operations perfmon_ops = { - .start = perfmon_start, - .stop = perfmon_stop, -}; static int using_perfmon; -int perfmon_init(struct oprofile_operations ** ops) +int perfmon_init(struct oprofile_operations * ops) { int ret = pfm_register_buffer_fmt(&oprofile_fmt); if (ret) return -ENODEV; - perfmon_ops.cpu_type = get_cpu_type(); - *ops = &perfmon_ops; + ops->cpu_type = get_cpu_type(); + ops->start = perfmon_start; + ops->stop = perfmon_stop; using_perfmon = 1; printk(KERN_INFO "oprofile: using perfmon.\n"); return 0;