diff options
author | Namhyung Kim <namhyung@kernel.org> | 2022-09-09 02:01:50 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-10-04 14:55:22 +0300 |
commit | 187c7723e4aae6d5729e27179542956975624ff8 (patch) | |
tree | c4cfbb3e97a504175188b63312a471060cfbaa98 /tools/perf/scripts/python/stackcollapse.py | |
parent | 165da80296ea6bc996eea4551026e39a0109f71e (diff) | |
download | linux-187c7723e4aae6d5729e27179542956975624ff8.tar.xz |
perf test: Skip sigtrap test on old kernels
If it runs on an old kernel, perf_event_open would fail because of the
new fields sigtrap and sig_data. Just skipping the test could miss an
actual bug in the kernel.
Let's check BTF (when we have libbpf) if it has the sigtrap field in the
perf_event_attr. Otherwise, we can check it with a minimal event config.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com> # Using BTF to check for the struct members
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Marco Elver <elver@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220908230150.4105955-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions