acrn-kernel/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
..
Documentation perf docs: Update the documentation for the save_type filter 2022-08-27 11:55:17 -03:00
arch perf pmu-events: Hide the pmu_events 2022-08-13 15:02:08 -03:00
bench
dlfilters perf dlfilter dlfilter-show-cycles: Fix types for print format 2022-09-08 12:17:45 -03:00
examples/bpf
include
jvmti
pmu-events perf vendor events: Update events for snowridgex 2022-08-13 15:08:31 -03:00
python
scripts
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
CREDITS
MANIFEST
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
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
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
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-kwork.c
builtin-list.c
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
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
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
check-headers.sh
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c
perf.h