aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/ftrace.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-05-19 08:02:22 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-21 05:37:56 -0400
commit1c024eca51fdc965290acf342ae16a476c2189d0 (patch)
tree28dc160cc70a20eeb8b8825d6d52ea88a6188413 /include/trace/ftrace.h
parentb7e2ecef92d2e7785e6d76b41e5ba8bcbc45259d (diff)
perf, trace: Optimize tracepoints by using per-tracepoint-per-cpu hlist to track events
Avoid the swevent hash-table by using per-tracepoint hlists. Also, avoid conditionals on the fast path by ordering with probe unregister so that we should never get on the callback path without the data being there. 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: <20100521090710.473188012@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r--include/trace/ftrace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index f282885057dd..4eb2148f1321 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -768,6 +768,7 @@ 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 struct hlist_head *head; \
771 int __entry_size; \ 772 int __entry_size; \
772 int __data_size; \ 773 int __data_size; \
773 int rctx; \ 774 int rctx; \
@@ -790,8 +791,9 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
790 \ 791 \
791 { assign; } \ 792 { assign; } \
792 \ 793 \
794 head = per_cpu_ptr(event_call->perf_events, smp_processor_id());\
793 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 795 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
794 __count, __regs, event_call->perf_data); \ 796 __count, __regs, head); \
795} 797}
796 798
797#undef DEFINE_EVENT 799#undef DEFINE_EVENT