From 34782b425dcc74ecc363fdba5465a51502334b06 Mon Sep 17 00:00:00 2001 From: Stefan Moll <stefan@stefaus.de> Date: Tue, 27 Sep 2022 16:03:41 +0200 Subject: [PATCH] remove perf overflow handler --- kernel/sched/perf_error_detection.c | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/kernel/sched/perf_error_detection.c b/kernel/sched/perf_error_detection.c index e9a37a0922d2..35996db6c40a 100644 --- a/kernel/sched/perf_error_detection.c +++ b/kernel/sched/perf_error_detection.c @@ -61,25 +61,25 @@ u64 terminate_perf_event(struct perf_event *pevent) } -/* - * handle the perf overflow event -> task needed more instructions than planed - */ -void overflow_handler( - struct perf_event *event, - struct perf_sample_data *data, - struct pt_regs *regs) -{ - struct pb_rq *pb_rq; - int cpu; - - cpu = smp_processor_id(); - pb_rq = &cpu_rq(cpu)->pb; - - // if(pb_rq->is_initialized) - // printk(KERN_WARNING "OH: PB TASK %llu RAN TOO LONG\n",pb_rq->plan[pb_rq->c_entry].task_id); - // else - // printk(KERN_WARNING "OH: PB TASK RAN TOO LONG\n"); -} +// /* +// * handle the perf overflow event -> task needed more instructions than planed +// */ +// void overflow_handler( +// struct perf_event *event, +// struct perf_sample_data *data, +// struct pt_regs *regs) +// { +// struct pb_rq *pb_rq; +// int cpu; + +// cpu = smp_processor_id(); +// pb_rq = &cpu_rq(cpu)->pb; + +// if(pb_rq->is_initialized) +// printk(KERN_WARNING "OH: PB TASK %llu RAN TOO LONG\n",pb_rq->plan[pb_rq->c_entry].task_id); +// else +// printk(KERN_WARNING "OH: PB TASK RAN TOO LONG\n"); +// } struct perf_event* perf_event_create(struct perf_event_attr *hw_event_uptr, int cpu, struct task_struct *task_struct) { @@ -87,6 +87,6 @@ struct perf_event* perf_event_create(struct perf_event_attr *hw_event_uptr, int hw_event_uptr, cpu, task_struct, - &overflow_handler, - NULL /* What's meant by context? 'oprofile' uses NULL */); + NULL, /* &overflow_handler disabled, because we count within the scheduler */ + NULL); } -- GitLab