diff options
| author | Namhyung Kim <[email protected]> | 2023-08-11 02:58:21 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-08-15 19:41:48 +0000 |
| commit | dc7f01f1bceca38839992b3371e0be8a3c9d5acf (patch) | |
| tree | 15992f7260c56de49203a52ce5c7dc67f64d40b1 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
| parent | perf trace: Tidy comments related to BPF + syscall augmentation (diff) | |
| download | kernel-dc7f01f1bceca38839992b3371e0be8a3c9d5acf.tar.gz kernel-dc7f01f1bceca38839992b3371e0be8a3c9d5acf.zip | |
perf bpf-filter: Fix sample flag check with ||
For logical OR operator, the actual sample_flags are in the 'groups'
list so it needs to check entries in the list instead. Otherwise it
would show the following error message.
$ sudo perf record -a -e cycles:p --filter 'period > 100 || weight > 0' sleep 1
Error: cycles:p event does not have sample flags 0
failed to set filter "BPF" on event cycles:p with 2 (No such file or directory)
Actually it should warn on 'weight' is used without WEIGHT flag.
Error: cycles:p event does not have PERF_SAMPLE_WEIGHT
Hint: please add -W option to perf record
failed to set filter "BPF" on event cycles:p with 2 (No such file or directory)
Fixes: 4310551b76e0d676 ("perf bpf filter: Show warning for missing sample flags")
Reviewed-by: Ian Rogers <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions
