diff options
| author | Athira Rajeev <[email protected]> | 2025-01-10 09:37:30 +0000 |
|---|---|---|
| committer | Namhyung Kim <[email protected]> | 2025-01-17 18:09:54 +0000 |
| commit | 83196dd3499ae032e6cd2afbc663dbad50b3850a (patch) | |
| tree | c101470ea361e473634e230eb89b7663130db571 /drivers/platform/x86/intel/pmt/class.c | |
| parent | perf hist: Fix width calculation in hpp__fmt() (diff) | |
| download | kernel-83196dd3499ae032e6cd2afbc663dbad50b3850a.tar.gz kernel-83196dd3499ae032e6cd2afbc663dbad50b3850a.zip | |
perf lock: Fix return code for functions in __cmd_contention
perf lock contention returns zero exit value even if the lock contention
BPF setup failed.
# ./perf lock con -b true
libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?
libbpf: failed to find '.BTF' ELF section in /lib/modules/6.13.0-rc3+/build/vmlinux
libbpf: failed to find valid kernel BTF
libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?
libbpf: failed to find '.BTF' ELF section in /lib/modules/6.13.0-rc3+/build/vmlinux
libbpf: failed to find valid kernel BTF
libbpf: Error loading vmlinux BTF: -ESRCH
libbpf: failed to load object 'lock_contention_bpf'
libbpf: failed to load BPF skeleton 'lock_contention_bpf': -ESRCH
Failed to load lock-contention BPF skeleton
lock contention BPF setup failed
# echo $?
0
Fix this by saving the return code for lock_contention_prepare
so that command exits with proper return code. Similarly set the
return code properly for two other functions in builtin-lock, namely
setup_output_field() and select_key().
Signed-off-by: Athira Rajeev <[email protected]>
Reviewed-by: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions
