Re: [PATCH tip 0/3] Improvements of scheduler related Tracepoints

From: Peter Zijlstra
Date: Mon Dec 18 2017 - 04:12:16 EST

On Fri, Dec 15, 2017 at 09:09:51AM -0800, Alexei Starovoitov wrote:

> yeah. Currently bpf progs are called at the end of
> perf_trace_##call()
> {
> .. regular tracepoint copy craft
> perf_trace_run_bpf_submit( &copied args )
> }
> from bpf pov we'd rather get access to raw args passed into
> perf_trace_##call.
> Sounds like you're suggesting to let bpf side register its
> progs directly via tracepoint_probe_register() ?
> That would solve the whole thing really nicely indeed.

Not sure I thought that far; but if you want the probe arguments either
grab them from the perf probe you're running in or indeed register your
own, don't play silly buggers and copy them in the trace data.

> How such api would look like ?
> Something like extending kprobe/uprobe fd-based perf_event_open?
> btw could you please apply that set to tip tree
> or you want us to route it via bpf-next -> net-next ?

Oh right, lemme prod Ingo on that.