diff mbox series

[v8,perf,bpf,01/15] perf, bpf: consider events with attr.bpf_event as side-band events

Message ID 20190311195555.889995-2-songliubraving@fb.com
State Not Applicable
Delegated to: BPF Maintainers
Headers show
Series perf annotation of BPF programs | expand

Commit Message

Song Liu March 11, 2019, 7:55 p.m. UTC
Events with bpf_event should be considered as side-band event, as they
carry information about BPF programs.

Fixes: 6ee52e2a3fe4 ("perf, bpf: Introduce PERF_RECORD_BPF_EVENT")
Signed-off-by: Song Liu <songliubraving@fb.com>
---
 kernel/events/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Arnaldo Carvalho de Melo March 11, 2019, 8:29 p.m. UTC | #1
Em Mon, Mar 11, 2019 at 12:55:41PM -0700, Song Liu escreveu:
> Events with bpf_event should be considered as side-band event, as they
> carry information about BPF programs.
> 
> Fixes: 6ee52e2a3fe4 ("perf, bpf: Introduce PERF_RECORD_BPF_EVENT")
> Signed-off-by: Song Liu <songliubraving@fb.com>

This patch is also already merged upstream, its in torvalds/master.

- Arnaldo

> ---
>  kernel/events/core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index f1a26c8f15b3..4a59cb9b29ee 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -4238,7 +4238,8 @@ static bool is_sb_event(struct perf_event *event)
>  	if (attr->mmap || attr->mmap_data || attr->mmap2 ||
>  	    attr->comm || attr->comm_exec ||
>  	    attr->task || attr->ksymbol ||
> -	    attr->context_switch)
> +	    attr->context_switch ||
> +	    attr->bpf_event)
>  		return true;
>  	return false;
>  }
> -- 
> 2.17.1
diff mbox series

Patch

diff --git a/kernel/events/core.c b/kernel/events/core.c
index f1a26c8f15b3..4a59cb9b29ee 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4238,7 +4238,8 @@  static bool is_sb_event(struct perf_event *event)
 	if (attr->mmap || attr->mmap_data || attr->mmap2 ||
 	    attr->comm || attr->comm_exec ||
 	    attr->task || attr->ksymbol ||
-	    attr->context_switch)
+	    attr->context_switch ||
+	    attr->bpf_event)
 		return true;
 	return false;
 }