linux-stable/tools/perf
Adrian Hunter 7063f15d2a perf auxtrace: Fix multiple use of --itrace option
commit bb69c912c4 upstream.

If the --itrace option is used more than once, the options are
combined, but "i" and "y" (sub-)options can be corrupted because
itrace_do_parse_synth_opts() incorrectly overwrites the period type and
period with default values.

For example, with:

	--itrace=i0ns --itrace=e

The processing of "--itrace=e", resets the "i" period from 0 nanoseconds
to the default 100 microseconds.

Fix by performing the default setting of period type and period only if
"i" or "y" are present in the currently processed --itrace value.

Fixes: f6986c95af ("perf session: Add instruction tracing options")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240315071334.3478-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-21 14:38:39 +02:00
..
arch perf pmu: Move pmu__find_core_pmu() to pmus.c 2024-06-12 11:12:31 +02:00
bench perf bench internals inject-build-id: Fix trap divide when collecting just one DSO 2024-06-12 11:12:26 +02:00
dlfilters
Documentation perf docs: Document bpf event modifier 2024-06-12 11:12:20 +02:00
include/perf
jvmti
pmu-events perf stat: Do not fail on metrics on s390 z/VM systems 2024-06-12 11:12:15 +02:00
python
scripts
tests perf util: Add a function for replacing characters in a string 2024-06-12 11:13:02 +02:00
trace
ui perf ui browser: Avoid SEGV on title 2024-06-12 11:12:28 +02:00
util perf auxtrace: Fix multiple use of --itrace option 2024-06-21 14:38:39 +02:00
.gitignore
Build
builtin-annotate.c perf annotate: Use global annotation_options 2024-06-12 11:12:16 +02:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c
builtin-config.c
builtin-daemon.c perf daemon: Fix file leak in daemon_session__control 2024-06-12 11:12:30 +02:00
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c
builtin-help.c
builtin-inject.c perf record: Lazy load kernel symbols 2024-06-12 11:12:15 +02:00
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c
builtin-kwork.c perf kwork: Set ordered_events to true in 'struct perf_tool' 2023-11-20 11:59:25 +01:00
builtin-list.c perf list: Fix JSON segfault by setting the used skip_duplicate_pmus callback 2023-12-13 18:45:34 +01:00
builtin-lock.c tools/perf: Update call stack check in builtin-lock.c 2023-11-20 11:59:26 +01:00
builtin-mem.c
builtin-probe.c
builtin-record.c perf record: Fix debug message placement for test consumption 2024-06-12 11:12:18 +02:00
builtin-report.c perf report: Avoid SEGV in report__setup_sample_type() 2024-06-12 11:12:28 +02:00
builtin-sched.c perf sched timehist: Fix -g/--call-graph option failure 2024-06-12 11:13:02 +02:00
builtin-script.c
builtin-stat.c perf stat: Exit perf stat if parse groups fails 2024-01-25 15:35:51 -08:00
builtin-timechart.c
builtin-top.c perf annotate: Use global annotation_options 2024-06-12 11:12:16 +02:00
builtin-trace.c
builtin-version.c
builtin.h
check-headers.sh
command-list.txt
CREDITS
design.txt
Makefile
Makefile.config
Makefile.perf perf bpf: Clean up the generated/copied vmlinux.h 2024-03-26 18:19:45 -04:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c
perf.h