perf/ftrace: Fix function trace events
authorPeter Zijlstra <peterz@infradead.org>
Tue, 10 Oct 2017 15:15:47 +0000 (17:15 +0200)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 16 Oct 2017 22:12:21 +0000 (18:12 -0400)
commit466c81c45b650deca213fda3d0ec4761667379a9
tree3bb3aa06a9adfb347d8026a1ce5339775545b7c8
parent8fd0fbbe8888f295eb34172a7e47bf7d3a0a4687
perf/ftrace: Fix function trace events

The function-trace <-> perf interface is a tad messed up. Where all
the other trace <-> perf interfaces use a single trace hook
registration and use per-cpu RCU based hlist to iterate the events,
function-trace actually needs multiple hook registrations in order to
minimize function entry patching when filters are present.

The end result is that we iterate events both on the trace hook and on
the hlist, which results in reporting events multiple times.

Since function-trace cannot use the regular scheme, fix it the other
way around, use singleton hlists.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/trace_events.h
kernel/trace/trace_event_perf.c