linux-stable/tools/perf
Yu Kuai d3fddc355a perf stat: Fix error return code in bperf__load()
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.

Committer notes:

Added the missing {} for the now multiline 'if' block, fixing this error:

    CC      /tmp/build/perf/util/bpf_counter.o
  util/bpf_counter.c: In function ‘bperf__load’:
  util/bpf_counter.c:523:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
    523 |         if (evsel->bperf_leader_link_fd < 0 &&
        |         ^~
  util/bpf_counter.c:526:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    526 |                 goto out;
        |                 ^~~~
  cc1: all warnings being treated as errors

Fixes: 7fac83aaf2 ("perf stat: Introduce 'bperf' to share hardware PMCs with BPF")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Zhang Yi <yi.zhang@huawei.com>
Link: http://lore.kernel.org/lkml/20210517081254.1561564-1-yukuai3@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-06-01 10:56:27 -03:00
..
Documentation perf script: Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit 2021-05-21 16:41:37 -03:00
arch tools headers UAPI: Sync files changed by the quotactl_path unwiring 2021-05-21 16:14:00 -03:00
bench perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
examples/bpf perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
include/bpf
jvmti perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
pmu-events perf vendor events powerpc: Fix eventcode of power10 JSON events 2021-05-28 09:22:24 -03:00
python tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
scripts perf scripts python: exported-sql-viewer.py: Fix warning display 2021-05-21 16:31:07 -03:00
tests perf test: Fix libpfm4 support (63) test error for nested event groups 2021-05-19 10:30:37 -03:00
trace perf tools changes for v5.13: 1st batch 2021-05-01 12:22:38 -07:00
ui perf report: Print percentage of each event statistics 2021-04-29 10:30:59 -03:00
util perf stat: Fix error return code in bperf__load() 2021-06-01 10:56:27 -03:00
.gitignore perf: Update .gitignore file 2021-04-20 08:40:20 -03:00
Build perf daemon: Add daemon command 2021-02-09 15:42:57 -03:00
CREDITS
MANIFEST scripts/bpf: Abstract eBPF API target parameter 2021-03-04 18:39:45 -08:00
Makefile perf tools: Add a build-test variant to use in builds from a tarball 2021-04-20 08:43:58 -03:00
Makefile.config perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS 2021-06-01 10:07:46 -03:00
Makefile.perf perf tools: Enable libtraceevent dynamic linking 2021-04-29 10:31:00 -03:00
builtin-annotate.c perf report: Add --skip-empty option to suppress 0 event stat 2021-04-29 10:30:59 -03:00
builtin-bench.c perf bench: Add build-id injection benchmark 2020-10-13 10:59:42 -03:00
builtin-buildid-cache.c perf buildid-cache: Add --debuginfod option to specify a server to fetch debug files 2020-12-28 12:20:39 -03:00
builtin-buildid-list.c perf buildid-list: Initialize zstd_data 2021-05-17 20:39:17 -03:00
builtin-c2c.c perf c2c: Support data block and addr block 2021-02-08 16:25:00 -03:00
builtin-config.c
builtin-daemon.c Merge remote-tracking branch 'torvalds/master' into perf/core 2021-03-29 10:39:10 -03:00
builtin-data.c perf data: Add JSON export 2021-04-29 10:30:58 -03:00
builtin-diff.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-evlist.c perf evlist: Support pipe mode display 2020-12-17 14:36:17 -03:00
builtin-ftrace.c perf ftrace: Fix access to pid in array when setting a pid filter 2021-04-23 15:58:10 -03:00
builtin-help.c
builtin-inject.c perf inject: Fix repipe usage 2021-04-05 10:15:51 -03:00
builtin-kallsyms.c
builtin-kmem.c perf evlist: Use the right prefix for 'struct evlist' 'find' methods 2020-11-30 09:48:07 -03:00
builtin-kvm.c perf evlist: Use the right prefix for 'struct evlist' mmap pages parsing method 2020-11-30 15:15:30 -03:00
builtin-list.c perf list: Remove dead code in argument check 2020-09-09 11:12:10 -03:00
builtin-lock.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-mem.c perf tools: Support data block and addr block 2021-02-08 16:25:00 -03:00
builtin-probe.c
builtin-record.c perf record: Move probing cgroup sampling support 2021-06-01 10:32:00 -03:00
builtin-report.c perf report: Make --skip-empty as default 2021-04-29 10:30:59 -03:00
builtin-sched.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-script.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
builtin-stat.c perf stat: Skip evlist__[enable|disable] when all events uses BPF 2021-05-21 16:50:17 -03:00
builtin-timechart.c
builtin-top.c perf top: Use evlist->events_stat to count events 2021-04-29 10:30:58 -03:00
builtin-trace.c perf trace: Fix race in signal handling 2021-03-06 16:54:32 -03:00
builtin-version.c perf version: Add a feature for libpfm4 2020-11-04 09:42:40 -03:00
builtin.h perf daemon: Add daemon command 2021-02-09 15:42:57 -03:00
check-headers.sh perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS 2021-06-01 10:07:46 -03:00
command-list.txt perf stat: Enable iostat mode for x86 platforms 2021-04-20 08:40:20 -03:00
design.txt
perf-archive.sh perf archive: Fix filtering of empty build-ids 2021-03-06 16:54:31 -03:00
perf-completion.sh
perf-iostat.sh perf stat: Enable iostat mode for x86 platforms 2021-04-20 08:40:20 -03:00
perf-read-vdso.c
perf-sys.h perf tests: Call test_attr__open() directly 2020-09-10 11:55:37 -03:00
perf-with-kcore.sh
perf.c perf debug: Move debug initialization earlier 2021-05-27 13:24:22 -03:00
perf.h