lkml.org 
[lkml]   [2019]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: tracing/kprobe: filter kprobe based perf event
On Wed, Sep 18, 2019 at 05:51:10AM +0000, Yonghong Song wrote:
>
> Adding cc to bpf@vger.kernel.org mailing list since this is really
> bpf related.
>
> On 9/17/19 10:24 PM, jinshan.xiong@gmail.com wrote:
> > From: Jinshan Xiong <jinshan.xiong@gmail.com>
> >
> > Invoking bpf program only if kprobe based perf_event has been added into
> > the percpu list. This is essential to make event tracing for cgroup to work
> > properly.
>
> The issue actually exists for bpf programs with kprobe, uprobe,
> tracepoint and trace_syscall_enter/exit.
>
> In all these places, bpf program is called regardless of
> whether there are perf events or not on this cpu.
> This provides bpf programs more opportunities to see
> the events. I guess this is by design.
> Alexei/Daniel, could you clarify?

Yes. It is by design.
When bpf is attached to kprobe it will fire on all cpus.
Per-cpu or per-task or per-cgroup filtering is already done
inside bpf programs.
We cannot make this change now it will break all users.

\
 
 \ /
  Last update: 2019-09-18 16:33    [W:0.109 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site