Skip to content
Commit c041d33b authored by Song Liu's avatar Song Liu Committed by Arnaldo Carvalho de Melo
Browse files

perf evsel: Separate bpf_counter_list and bpf_filters, can be used at the same time



'struct evsel' uses a union for the two lists. This turned out to be
error prone.

For example:

  [root@quaco ~]# perf stat --bpf-prog 5246
  Error: cpu-clock event does not have sample flags 66c660
  failed to set filter "(null)" on event cpu-clock with 2 (No such file or directory)
  [root@quaco ~]# perf stat --bpf-prog 5246

Fix this issue by separating the two lists.

Fixes: 56ec9457 ("perf bpf filter: Implement event sample filtering")
Signed-off-by: default avatarSong Liu <song@kernel.org>
Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kernel-team@meta.com
Link: https://lore.kernel.org/r/20230519235757.3613719-1-song@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent c8268a9b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment