aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-05-19 04:52:27 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-21 05:37:56 -0400
commitb7e2ecef92d2e7785e6d76b41e5ba8bcbc45259d (patch)
tree341c3a03743108bbdf82ee0eed9f4c4085f1b694 /include/trace
parent1c34bde13a3cdcd4c7c6322f8052e67c2c91caf1 (diff)
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>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/ftrace.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 1016b2162935..f282885057dd 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -768,7 +768,6 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
768 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 768 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
769 struct ftrace_raw_##call *entry; \ 769 struct ftrace_raw_##call *entry; \
770 u64 __addr = 0, __count = 1; \ 770 u64 __addr = 0, __count = 1; \
771 unsigned long irq_flags; \
772 int __entry_size; \ 771 int __entry_size; \
773 int __data_size; \ 772 int __data_size; \
774 int rctx; \ 773 int rctx; \
@@ -781,17 +780,18 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
781 if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \ 780 if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \
782 "profile buffer not large enough")) \ 781 "profile buffer not large enough")) \
783 return; \ 782 return; \
783 \
784 entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ 784 entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \
785 __entry_size, event_call->id, &rctx, &irq_flags); \ 785 __entry_size, event_call->id, __regs, &rctx); \
786 if (!entry) \ 786 if (!entry) \
787 return; \ 787 return; \
788 \
788 tstruct \ 789 tstruct \
789 \ 790 \
790 { assign; } \ 791 { assign; } \
791 \ 792 \
792 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 793 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
793 __count, irq_flags, __regs, \ 794 __count, __regs, event_call->perf_data); \
794 event_call->perf_data); \
795} 795}
796 796
797#undef DEFINE_EVENT 797#undef DEFINE_EVENT
@@ -799,13 +799,10 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
799static notrace void perf_trace_##call(proto) \ 799static notrace void perf_trace_##call(proto) \
800{ \ 800{ \
801 struct ftrace_event_call *event_call = &event_##call; \ 801 struct ftrace_event_call *event_call = &event_##call; \
802 struct pt_regs *__regs = &get_cpu_var(perf_trace_regs); \ 802 struct pt_regs __regs; \
803 \
804 perf_fetch_caller_regs(__regs, 1); \
805 \
806 perf_trace_templ_##template(event_call, __regs, args); \
807 \ 803 \
808 put_cpu_var(perf_trace_regs); \ 804 perf_fetch_caller_regs(&__regs, 1); \
805 perf_trace_templ_##template(event_call, &__regs, args); \
809} 806}
810 807
811#undef DEFINE_EVENT_PRINT 808#undef DEFINE_EVENT_PRINT