perf, trace: Optimize tracepoints by removing IRQ-disable from perf/tracepoint interaction
Improves performance. Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1274259525.5605.10352.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
1c34bde13a
commit
b7e2ecef92
@@ -1343,7 +1343,6 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp,
|
||||
struct kprobe_trace_entry_head *entry;
|
||||
u8 *data;
|
||||
int size, __size, i;
|
||||
unsigned long irq_flags;
|
||||
int rctx;
|
||||
|
||||
__size = sizeof(*entry) + tp->size;
|
||||
@@ -1353,7 +1352,7 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp,
|
||||
"profile buffer not large enough"))
|
||||
return;
|
||||
|
||||
entry = perf_trace_buf_prepare(size, call->id, &rctx, &irq_flags);
|
||||
entry = perf_trace_buf_prepare(size, call->id, regs, &rctx);
|
||||
if (!entry)
|
||||
return;
|
||||
|
||||
@@ -1362,7 +1361,7 @@ static __kprobes void kprobe_perf_func(struct kprobe *kp,
|
||||
for (i = 0; i < tp->nr_args; i++)
|
||||
call_fetch(&tp->args[i].fetch, regs, data + tp->args[i].offset);
|
||||
|
||||
perf_trace_buf_submit(entry, size, rctx, entry->ip, 1, irq_flags, regs, call->perf_data);
|
||||
perf_trace_buf_submit(entry, size, rctx, entry->ip, 1, regs, call->perf_data);
|
||||
}
|
||||
|
||||
/* Kretprobe profile handler */
|
||||
@@ -1374,7 +1373,6 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri,
|
||||
struct kretprobe_trace_entry_head *entry;
|
||||
u8 *data;
|
||||
int size, __size, i;
|
||||
unsigned long irq_flags;
|
||||
int rctx;
|
||||
|
||||
__size = sizeof(*entry) + tp->size;
|
||||
@@ -1384,7 +1382,7 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri,
|
||||
"profile buffer not large enough"))
|
||||
return;
|
||||
|
||||
entry = perf_trace_buf_prepare(size, call->id, &rctx, &irq_flags);
|
||||
entry = perf_trace_buf_prepare(size, call->id, regs, &rctx);
|
||||
if (!entry)
|
||||
return;
|
||||
|
||||
@@ -1395,7 +1393,7 @@ static __kprobes void kretprobe_perf_func(struct kretprobe_instance *ri,
|
||||
call_fetch(&tp->args[i].fetch, regs, data + tp->args[i].offset);
|
||||
|
||||
perf_trace_buf_submit(entry, size, rctx, entry->ret_ip, 1,
|
||||
irq_flags, regs, call->perf_data);
|
||||
regs, call->perf_data);
|
||||
}
|
||||
|
||||
static int probe_perf_enable(struct ftrace_event_call *call)
|
||||
|
||||
Reference in New Issue
Block a user