linux-stable/tools/perf
Yang Jihong 5676dba708 perf annotate: Fix sample events lost in stdio mode
In hist__find_annotations(), since different 'struct hist_entry' entries
may point to same symbol, we free notes->src to signal already processed
this symbol in stdio mode; when annotate, entry will skipped if
notes->src is NULL to avoid repeated output.

However, there is a problem, for example, run the following command:

 # perf record -e branch-misses -e branch-instructions -a sleep 1

perf.data file contains different types of sample event.

If the same IP sample event exists in branch-misses and branch-instructions,
this event uses the same symbol. When annotate branch-misses events, notes->src
corresponding to this event is set to null, as a result, when annotate
branch-instructions events, this event is skipped and no annotate is output.

Solution of this patch is to remove zfree in hists__find_annotations and
change sort order to "dso,symbol" to avoid duplicate output when different
processes correspond to the same symbol.

Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin Liška <mliska@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: zhangjinhao2@huawei.com
Link: http://lore.kernel.org/lkml/20210319123527.173883-1-yangjihong1@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-04-14 09:23:54 -03:00
..
arch perf pmu: Add pmu_events_map__find() function to find the common PMU map for the system 2021-04-08 14:24:14 -03:00
bench perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
Documentation perf annotate: Add --demangle and --demangle-kernel 2021-03-31 10:39:48 -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 amd: Add Zen3 events 2021-04-08 14:24:39 -03:00
python tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
scripts perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
tests perf pmu: Add pmu_events_map__find() function to find the common PMU map for the system 2021-04-08 14:24:14 -03:00
trace perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
ui perf tools: Fix various typos in comments 2021-03-23 17:13:43 -03:00
util Merge remote-tracking branch 'torvalds/master' into perf/core 2021-04-13 15:14:37 -03:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Build perf daemon: Add daemon command 2021-02-09 15:42:57 -03:00
builtin-annotate.c perf annotate: Fix sample events lost in stdio mode 2021-04-14 09:23:54 -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: Add support for mmap2's buildid events 2020-12-28 12:23:09 -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 support to store time of day in CTF data conversion 2020-08-06 09:43:37 -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 evlist: Use the right prefix for 'struct evlist' create maps methods 2020-11-30 14:56:52 -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 perf probe: Do not show the skipped events 2020-05-28 10:03:24 -03:00
builtin-record.c perf auxtrace: Automatically group aux-output events 2021-02-18 16:11:19 -03:00
builtin-report.c perf report: Create option to disable raw event ordering 2021-03-03 12:59:27 -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: Align CSV output for summary mode 2021-03-24 10:21:49 -03:00
builtin-timechart.c perf tools: Replace zero-length array with flexible-array 2020-05-28 10:03:27 -03:00
builtin-top.c perf tools: Fix various typos in comments 2021-03-23 17:13:43 -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: Generate mips syscalls_n64.c syscall table 2021-03-01 14:49:28 -03:00
command-list.txt perf daemon: Add daemon command 2021-02-09 15:42:57 -03:00
CREDITS
design.txt perf tools: Support CAP_PERFMON capability 2020-04-16 12:19:08 -03:00
Makefile
Makefile.config perf tools: Generate mips syscalls_n64.c syscall table 2021-03-01 14:49:28 -03:00
Makefile.perf perf stat: Introduce 'bperf' to share hardware PMCs with BPF 2021-03-23 17:46:44 -03:00
MANIFEST
perf-archive.sh perf archive: Fix filtering of empty build-ids 2021-03-06 16:54:31 -03:00
perf-completion.sh
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 daemon: Add daemon command 2021-02-09 15:42:57 -03:00
perf.h