linux-stable/tools/perf
Adrian Hunter faf59ec8c3 perf record: Fix synthesis failure warnings
Some calls to synthesis functions set err < 0 but only warn about the
failure and continue.  However they do not set err back to zero, relying
on subsequent code to do that.

That changed with the introduction of option --synth. When --synth=no
subsequent functions that set err back to zero are not called.

Fix by setting err = 0 in those cases.

Example:

 Before:

   $ perf record --no-bpf-event --synth=all -o /tmp/huh uname
   Couldn't synthesize bpf events.
   Linux
   [ perf record: Woken up 1 times to write data ]
   [ perf record: Captured and wrote 0.014 MB /tmp/huh (7 samples) ]
   $ perf record --no-bpf-event --synth=no -o /tmp/huh uname
   Couldn't synthesize bpf events.

 After:

   $ perf record --no-bpf-event --synth=no -o /tmp/huh uname
   Couldn't synthesize bpf events.
   Linux
   [ perf record: Woken up 1 times to write data ]
   [ perf record: Captured and wrote 0.014 MB /tmp/huh (7 samples) ]

Fixes: 41b740b6e8 ("perf record: Add --synth option")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220907162458.72817-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-09-08 15:57:37 -03:00
..
arch perf pmu-events: Hide the pmu_events 2022-08-13 15:02:08 -03:00
bench Merge remote-tracking branch 'torvalds/master' into perf/core 2022-05-23 09:32:49 -03:00
dlfilters perf dlfilter dlfilter-show-cycles: Fix types for print format 2022-09-08 12:17:45 -03:00
Documentation perf docs: Update the documentation for the save_type filter 2022-08-27 11:55:17 -03:00
examples/bpf
include perf dlfilter: Add machine_pid and vcpu 2022-07-20 11:08:13 -03:00
jvmti
pmu-events perf vendor events: Update events for snowridgex 2022-08-13 15:08:31 -03:00
python
scripts Merge remote-tracking branch 'torvalds/master' into perf/core 2022-08-01 08:59:31 -03:00
tests perf test: Stat test for repeat with a weak group 2022-08-27 11:55:17 -03:00
trace perf beauty: Update copy of linux/socket.h with the kernel sources 2022-08-19 15:30:33 -03:00
ui
util perf genelf: Switch deprecated openssl MD5_* functions to new EVP API 2022-09-06 09:45:23 -03:00
.gitignore
Build perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
builtin-annotate.c perf gtk: Only support --gtk if compiled in 2022-07-20 11:09:11 -03:00
builtin-bench.c perf bench: Add breakpoint benchmarks 2022-05-13 11:00:38 -03:00
builtin-buildid-cache.c
builtin-buildid-list.c perf buildid-list: Add a "-m" option to show kernel and modules build-ids 2022-07-18 16:35:34 -03:00
builtin-c2c.c perf c2c: Prevent potential memory leak in c2c_he_zalloc() 2022-09-06 09:45:23 -03:00
builtin-config.c
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c perf inject: Fix spelling mistake "theads" -> "threads" 2022-07-26 16:31:54 -03:00
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c perf kvm: Fix subcommand matching error 2022-08-10 10:44:02 -03:00
builtin-kwork.c perf kwork: Implement BPF trace 2022-07-26 16:31:54 -03:00
builtin-list.c perf parse-events: Break out tracepoint and printing 2022-08-02 16:32:26 -03:00
builtin-lock.c perf lock: Remove redundant word 'contention' in help message 2022-09-08 15:23:42 -03:00
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Fix synthesis failure warnings 2022-09-08 15:57:37 -03:00
builtin-report.c perf gtk: Only support --gtk if compiled in 2022-07-20 11:09:11 -03:00
builtin-sched.c perf sched: Fix memory leaks in __cmd_record detected with -fsanitize=address 2022-08-27 11:55:17 -03:00
builtin-script.c perf script: Fix Cannot print 'iregs' field for hybrid systems 2022-09-08 15:27:39 -03:00
builtin-stat.c perf stat: Fix L2 Topdown metrics disappear for raw events 2022-09-02 13:52:18 -03:00
builtin-timechart.c perf parse-events: Break out tracepoint and printing 2022-08-02 16:32:26 -03:00
builtin-top.c
builtin-trace.c perf trace: Fix double word in comments 2022-08-12 16:44:56 -03:00
builtin-version.c
builtin.h perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
check-headers.sh
command-list.txt perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
CREDITS
design.txt
Makefile
Makefile.config perf python: Fix build when PYTHON_CONFIG is user supplied 2022-08-27 11:55:16 -03:00
Makefile.perf perf tools: Don't install data files with x permissions 2022-09-08 15:55:56 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue) 2022-07-26 16:01:24 -03:00
perf.h