Re: [RFC PATCH v3 33/37] perf bpf: Probe at kprobe points

From: Alexei Starovoitov
Date: Mon May 18 2015 - 15:25:24 EST


On 5/17/15 3:56 AM, Wang Nan wrote:
In this patch, kprobe points are created using add_perf_probe_events.
Since all events are already grouped together in an array, calling
add_perf_probe_events() once creates all of them.

To ensure recover the system when existing, a bpf_unprobe() is also
provided and hooked to atexit(). Because all of events are in group
"perf_bpf_probe" (PERF_BPF_PROBE_GROUP), use 'perf_bpf_probe:*' string
to remove all of them should be a simple method. However, this also
introduces a constrain that only one instance of 'perf bpf' is allowed
to be active.

perf bits look ok to me, but I'm not a perf codebase expert.
The above restriction also looks fine for now.
We can relax it later if it really becomes a problem.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/