diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2019-11-15 13:42:13 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-22 14:43:24 +0100 |
commit | 9bca1a4ef5034f0a82861ac0375eb0272c5ce04e (patch) | |
tree | fc6368693b9d21ca6103d6fa8e1c9cb71b46036a /tools/arch/alpha | |
parent | perf tools: Add kernel AUX area sampling definitions (diff) | |
download | linux-9bca1a4ef5034f0a82861ac0375eb0272c5ce04e.tar.xz linux-9bca1a4ef5034f0a82861ac0375eb0272c5ce04e.zip |
perf record: Add a function to test for kernel support for AUX area sampling
Architectures are expected to know if AUX area sampling is supported by
the hardware. Add a function perf_can_aux_sample() which will determine
whether the kernel supports it.
Committer notes:
I reported that this message was taking place on a kernel without the
required bits:
# perf record --aux-sample -e '{intel_pt//u,branch-misses:u}'
Error:
The sys_perf_event_open() syscall returned with 7 (Argument list too long) for event (branch-misses:u).
/bin/dmesg | grep -i perf may provide additional information.
Adrian sent a patch addressing it, with this explanation:
----
perf_can_aux_sample_size() always returned true because it did not pass
the attribute size to sys_perf_event_open, nor correctly check the
return value and errno.
----
After applying it I get, later in the series, when --aux-sample is
added:
# perf record --aux-sample -e '{intel_pt//u,branch-misses:u}'
AUX area sampling is not supported by kernel
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20191115124225.5247-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/arch/alpha')
0 files changed, 0 insertions, 0 deletions