Subject: [PATCH 01/35] perf, bpf: Consider events with attr.bpf_event as side-band events

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Thu, 7 Mar 2019 14:43:59 -0300

From: Song Liu <[email-masked]>

Events with attr.bpf_event set should be considered as side-band events,
as they carry information about BPF programs.

Signed-off-by: Song Liu <[email-masked]>
Cc: Alexei Starovoitov <[email-masked]>
Cc: Daniel Borkmann <[email-masked]>
Cc: Jiri Olsa <[email-masked]>
Cc: Namhyung Kim <[email-masked]>
Cc: Peter Zijlstra <[email-masked]>
Cc: [email-masked]
Cc: [email-masked]
Fixes: 6ee52e2a3fe4 ("perf, bpf: Introduce PERF_RECORD_BPF_EVENT")
Link: http://lkml.kernel.org/r/[email-masked]
Signed-off-by: Arnaldo Carvalho de Melo <[email-masked]>
---
 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 5f59d848171e..dd9698ad3d66 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.20.1