linux/tools/perf
Ilkka Koskinen e934a35e3c perf cs-etm: Fix the assert() to handle captured and unprocessed cpu trace
If one builds perf with DEBUG=1, captures data on multiple CPUs and
finally runs 'perf report -C <cpu>' for only one of the cpus, assert()
aborts the program. This happens because there are empty queues with
format set.

This patch changes the condition to abort only if a queue is not empty
and if the format is unset.

  $ make -C tools/perf DEBUG=1 CORESIGHT=1 CSLIBS=/usr/lib CSINCLUDES=/usr/include install
  $ perf record -o kcore --kcore -e cs_etm/timestamp/k -s -C 0-1 dd if=/dev/zero of=/dev/null bs=1M count=1
  $ perf report --input kcore/data --vmlinux=/home/ikoskine/projects/linux/vmlinux -C 1
  Aborted (core dumped)

Fixes: 57880a7966 ("perf: cs-etm: Allocate queues for all CPUs")
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240924233930.5193-1-ilkka@os.amperecomputing.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2024-10-02 18:21:49 -03:00
..
arch perf tools: Build x86 32-bit syscall table from arch/x86/entry/syscalls/syscall_32.tbl 2024-09-02 11:13:40 -03:00
bench perf tool: Constify tool pointers 2024-08-12 18:05:14 -03:00
check-header_ignore_hunks/lib perf tools: Cope with differences for lib/list_sort.c copy from the kernel 2024-10-02 15:07:32 -03:00
dlfilters
Documentation perf check: Fix inconsistencies in feature names 2024-09-04 16:19:53 -03:00
include/perf
jvmti
pmu-events perf jevents: Ignore sys when determining a model directory 2024-09-06 11:44:46 -03:00
python
scripts perf scripts python cs-etm: Restore first sample log in verbose mode 2024-07-31 16:58:18 -03:00
tests perf pmus: Fake PMU clean up 2024-09-11 11:27:42 -03:00
trace perf beauty: Update copy of linux/socket.h with the kernel sources 2024-09-30 17:23:38 -03:00
ui perf tools: Print lost samples due to BPF filter 2024-08-28 18:07:20 -03:00
util perf cs-etm: Fix the assert() to handle captured and unprocessed cpu trace 2024-10-02 18:21:49 -03:00
.gitignore perf build: Shellcheck support for OUTPUT directory 2023-12-05 15:46:43 -03:00
Build perf check: Introduce 'check' subcommand 2024-09-04 09:56:05 -03:00
builtin-annotate.c perf annotate: Display the branch counter histogram 2024-08-14 10:20:40 -03:00
builtin-bench.c perf bench uprobe: Add uretprobe variant of uprobe benchmarks 2024-04-12 17:54:02 -03:00
builtin-buildid-cache.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-buildid-list.c perf buildid-list: Use perf_tool__init 2024-08-12 18:07:10 -03:00
builtin-c2c.c perf mem: Fix missed p-core mem events on ADL and RPL 2024-09-06 11:45:17 -03:00
builtin-check.c perf check: Fix inconsistencies in feature names 2024-09-04 16:19:53 -03:00
builtin-config.c
builtin-daemon.c perf daemon: Fix the build on more 32-bit architectures 2024-08-19 21:44:30 -03:00
builtin-data.c
builtin-diff.c perf report: Display the branch counter histogram 2024-08-14 10:20:40 -03:00
builtin-evlist.c perf evlist: Print hint for group 2024-09-11 13:08:45 -03:00
builtin-ftrace.c perf ftrace: Detect whether ftrace is enabled on system 2024-09-11 09:35:35 -03:00
builtin-help.c perf help: Fix a typo ("bellow") 2024-09-11 11:24:12 -03:00
builtin-inject.c perf callchain: Allow symbols to be optional when resolving a callchain 2024-09-10 17:32:47 -03:00
builtin-kallsyms.c perf dso: Add reference count checking and accessor functions 2024-05-06 15:28:49 -03:00
builtin-kmem.c libsubcmd: Don't free the usage string 2024-09-04 09:54:24 -03:00
builtin-kvm.c libsubcmd: Don't free the usage string 2024-09-04 09:54:24 -03:00
builtin-kwork.c libsubcmd: Don't free the usage string 2024-09-04 09:54:24 -03:00
builtin-list.c perf list: Avoid potential out of bounds memory read 2024-09-11 11:26:27 -03:00
builtin-lock.c libsubcmd: Don't free the usage string 2024-09-04 09:54:24 -03:00
builtin-mem.c perf mem: Fix the wrong reference in parse_record_events() 2024-09-06 11:45:28 -03:00
builtin-probe.c perf probe: Use zfree() to avoid possibly accessing dangling pointers 2024-05-07 12:44:02 -03:00
builtin-record.c perf record: Fix sample cgroup & namespace tracking 2024-08-19 16:32:05 -03:00
builtin-report.c perf report: Name events in stats for pipe mode 2024-08-28 18:07:21 -03:00
builtin-sched.c libsubcmd: Don't free the usage string 2024-09-04 09:54:24 -03:00
builtin-script.c perf env: Find correct branch counter info on hybrid 2024-09-11 13:08:46 -03:00
builtin-stat.c perf evsel: Add accessor for tool_event 2024-09-11 11:28:27 -03:00
builtin-timechart.c perf timechart: Use perf_tool__init() 2024-08-12 18:12:06 -03:00
builtin-top.c perf map: API clean up 2024-08-19 14:49:53 -03:00
builtin-trace.c perf trace: Mark the 'head' arg in the set_robust_list syscall as coming from user space 2024-09-11 17:25:45 -03:00
builtin-version.c perf version: Update --build-options to use 'supported_features' array 2024-09-04 16:19:29 -03:00
builtin.h perf check: Introduce 'check' subcommand 2024-09-04 09:56:05 -03:00
check-headers.sh perf tools: Cope with differences for lib/list_sort.c copy from the kernel 2024-10-02 15:07:32 -03:00
command-list.txt
CREDITS
design.txt
Makefile perf tools: Fix wrong message when running "make JOBS=1" 2024-08-01 12:11:33 -03:00
Makefile.config perf build: Fix build feature-dwarf_getlocations fail for old libdw 2024-10-02 18:21:49 -03:00
Makefile.perf perf testsuite: Install perf-report tests in the 'make install-tests -C tools/perf' target 2024-08-28 18:07:21 -03:00
MANIFEST tools perf: Add arm64 sysreg files to MANIFEST 2023-11-22 11:17:53 -08:00
perf-archive.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-completion.sh perf build: Add shellcheck to tools/perf scripts 2024-04-12 17:54:02 -03:00
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf check: Introduce 'check' subcommand 2024-09-04 09:56:05 -03:00
perf.h