linux-stable/include/trace
Yonghong Song e87c6bc385 bpf: permit multiple bpf attachments for a single perf event
This patch enables multiple bpf attachments for a
kprobe/uprobe/tracepoint single trace event.
Each trace_event keeps a list of attached perf events.
When an event happens, all attached bpf programs will
be executed based on the order of attachment.

A global bpf_event_mutex lock is introduced to protect
prog_array attaching and detaching. An alternative will
be introduce a mutex lock in every trace_event_call
structure, but it takes a lot of extra memory.
So a global bpf_event_mutex lock is a good compromise.

The bpf prog detachment involves allocation of memory.
If the allocation fails, a dummy do-nothing program
will replace to-be-detached program in-place.

Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-25 10:47:47 +09:00
..
events tcp: add tracepoint trace_tcp_set_state() 2017-10-24 01:21:25 +01:00
define_trace.h tracing: Introduce TRACE_EVENT_FN_COND macro 2015-12-23 14:27:21 -05:00
perf.h bpf: permit multiple bpf attachments for a single perf event 2017-10-25 10:47:47 +09:00
syscall.h tracing: Rename ftrace_event_{call,class} to trace_event_{call,class} 2015-05-13 14:06:10 -04:00
trace_events.h tracing: define TRACE_DEFINE_SIZEOF() macro to map sizeof's to their values 2017-06-13 17:10:57 -04:00