Re: [PATCH] bpf: Put perf_events check ahead of bpf prog

2015-06-27 Thread Masami Hiramatsu
On 2015/06/27 15:44, He Kuang wrote: > When we add a kprobe point and record events by perf, the execution path > of all threads on each cpu will enter this point, but perf may only > record events on a particular thread or cpu at this kprobe point, a > check on call->perf_events list filters out

Re: [PATCH] bpf: Put perf_events check ahead of bpf prog

2015-06-27 Thread Alexei Starovoitov
On 6/26/15 11:44 PM, He Kuang wrote: @@ -1141,13 +1141,13 @@ kprobe_perf_func(struct trace_kprobe *tk, struct pt_regs *regs) int size, __size, dsize; int rctx; - if (prog && !trace_call_bpf(prog, regs)) - return; - head =

[PATCH] bpf: Put perf_events check ahead of bpf prog

2015-06-27 Thread He Kuang
When we add a kprobe point and record events by perf, the execution path of all threads on each cpu will enter this point, but perf may only record events on a particular thread or cpu at this kprobe point, a check on call->perf_events list filters out the threads which perf is not recording.

[PATCH] bpf: Put perf_events check ahead of bpf prog

2015-06-27 Thread He Kuang
When we add a kprobe point and record events by perf, the execution path of all threads on each cpu will enter this point, but perf may only record events on a particular thread or cpu at this kprobe point, a check on call-perf_events list filters out the threads which perf is not recording.

Re: [PATCH] bpf: Put perf_events check ahead of bpf prog

2015-06-27 Thread Masami Hiramatsu
On 2015/06/27 15:44, He Kuang wrote: When we add a kprobe point and record events by perf, the execution path of all threads on each cpu will enter this point, but perf may only record events on a particular thread or cpu at this kprobe point, a check on call-perf_events list filters out the

Re: [PATCH] bpf: Put perf_events check ahead of bpf prog

2015-06-27 Thread Alexei Starovoitov
On 6/26/15 11:44 PM, He Kuang wrote: @@ -1141,13 +1141,13 @@ kprobe_perf_func(struct trace_kprobe *tk, struct pt_regs *regs) int size, __size, dsize; int rctx; - if (prog !trace_call_bpf(prog, regs)) - return; - head =