linux-stable/tools/perf
Ravi Bangoria e0560ba6d9 perf annotate: Fix segfault with source toggle
While rendering annotate browser from perf report tui, we keep track
of total number of lines(asm + source) in annotation->nr_entries and
total number of asm lines in annotation->nr_asm_entries. But we don't
reset them before starting. Thus if user annotates same function
multiple times, we restart incrementing these fields with old values.

This causes a segfault when user tries to toggle source code after
annotating same function multiple times. Fix it.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Link: http://lore.kernel.org/lkml/20200204045233.474937-5-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-02-27 11:47:23 -03:00
..
Documentation perf config: Document missing config options 2020-02-27 10:45:19 -03:00
arch perf arch powerpc: Sync powerpc syscall.tbl with the kernel sources 2020-02-18 13:36:57 -03:00
bench perf env: Remove needless cpumap.h header 2019-09-20 09:19:21 -03:00
examples/bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
include/bpf perf bpf: Remove bpf/ subdir from bpf.h headers used to build bpf events 2020-02-18 10:13:28 -03:00
jvmti perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy() 2019-10-15 11:47:38 -03:00
pmu-events perf vendor events s390: Remove name from L1D_RO_EXCL_WRITES description 2019-12-16 13:40:26 -03:00
python
scripts perf scripts python: exported-sql-viewer.py: Fix use of TRUE with SQLite 2019-11-13 09:13:16 -03:00
tests perf test: Fix test trace+probe_vfs_getname.sh on s390 2020-02-18 10:13:28 -03:00
trace perf beauty prctl: Export the 'options' strarray 2020-02-11 16:41:50 -03:00
ui perf annotate: Remove privsize from symbol__annotate() args 2020-02-27 11:06:14 -03:00
util perf annotate: Fix segfault with source toggle 2020-02-27 11:47:23 -03:00
.gitignore perf: Update .gitignore file 2019-08-31 22:27:52 -03:00
Build
CREDITS
MANIFEST libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
Makefile
Makefile.config libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
Makefile.perf libperf: Move to tools/lib/perf 2020-01-06 11:46:09 -03:00
builtin-annotate.c perf annotate: Prefer cmdline option over default config 2020-02-27 10:45:08 -03:00
builtin-bench.c perf tools: Remove perf.h from source files not needing it 2019-08-29 17:38:32 -03:00
builtin-buildid-cache.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-buildid-list.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-c2c.c perf c2c: Fix return type for histogram sorting comparision functions 2020-01-14 13:29:21 -03:00
builtin-config.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
builtin-data.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
builtin-diff.c perf diff: Use llabs() with 64-bit values 2019-11-28 08:08:38 -03:00
builtin-evlist.c perf evsel: Introduce evsel_fprintf.h 2019-09-25 16:26:34 -03:00
builtin-ftrace.c perf auxtrace: Uninline functions that touch perf_session 2019-08-31 22:24:10 -03:00
builtin-help.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
builtin-inject.c perf inject: Fix processing of ID index for injected instruction tracing 2019-12-04 12:39:53 -03:00
builtin-kallsyms.c perf dsos: Move the dsos struct and its methods to separate source files 2019-08-31 22:24:10 -03:00
builtin-kmem.c perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node' 2019-11-12 08:20:53 -03:00
builtin-kvm.c perf kvm: Use evlist layer api when possible 2019-11-06 15:43:05 -03:00
builtin-list.c perf list: Hide deprecated events by default 2019-10-19 15:35:01 -03:00
builtin-lock.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-mem.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-probe.c perf probe: Check return value of strlist__add() for -ENOMEM 2020-02-27 11:03:13 -03:00
builtin-record.c perf record: Adapt affinity to machines with #CPUs > 1K 2020-01-06 11:46:09 -03:00
builtin-report.c perf annotate: Make perf config effective 2020-02-27 10:44:59 -03:00
builtin-sched.c perf sched timehist: Add support for filtering on CPU 2020-01-06 11:46:09 -03:00
builtin-script.c perf script: Fix invalid LBR/binary mismatch error 2019-11-28 08:08:38 -03:00
builtin-stat.c perf stat: Use affinity for reading 2019-11-29 12:20:45 -03:00
builtin-timechart.c perf session: Return error code for perf_session__new() function on failure 2019-09-20 15:58:11 -03:00
builtin-top.c perf annotate: Remove privsize from symbol__annotate() args 2020-02-27 11:06:14 -03:00
builtin-trace.c perf trace: Resolve prctl's 'option' arg strings to numbers 2020-02-11 16:41:50 -03:00
builtin-version.c perf symbols: Move mem_info and branch_info out of symbol.h 2019-08-31 22:27:48 -03:00
builtin.h
check-headers.sh tools include UAPI: Sync x86's syscalls_64.tbl, generic unistd.h and fcntl.h to pick up openat2 and pidfd_getfd 2020-02-11 16:41:06 -03:00
command-list.txt
design.txt
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h perf tools: Make usage of test_attr__* optional for perf-sys.h 2019-10-31 21:38:41 +01:00
perf-with-kcore.sh
perf.c libperf: Merge libperf_set_print() into libperf_init() 2019-09-25 09:51:49 -03:00
perf.h perf time-utils: Adopt rdclock() from perf.h 2019-08-29 17:38:32 -03:00