linux/tools/perf
Arnaldo Carvalho de Melo 3995614d9b perf annotate: Fix fallback to unparsed disassembler line
When annotating source/disasm lines the perf tools parse the output of
objdump, trying to provide augmented output that allows navigating
jumps, calls, etc.

But when a line output by objdump can't be parsed the annotation code
falls back to just presenting the unparsed line.

When fixing a leak in the 0fb9f2aab7 commit ("perf annotate: Fix
memory leaks in LOCK handling") we failed to take that into account and
instead tried to free one of the data structures that should be freed
only when successfully allocated, oops, segfault.

There was a change in the way the objdump output for lock prefixed
instructions is formatted that lead the relevant parser to fail to grok
it.

At least RHEL7 works ok, but Fedora 20 segfaults.

Fix it by making the ins__delete() destructor work like the most basic
destructor: free().

Namely make it accept a NULL pointer and when handling it just do
nothing.

Further investigation is needed to figure out the nature of the objdump
output change so as to make the parser grok it.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rabin Vincent <rabin@rab.in>
Link: http://lkml.kernel.org/n/tip-7wsy0zo292pif0yjoqpfryrz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-03-05 15:27:28 -03:00
..
arch
bench perf bench: Fix order of arguments to memcpy_alloc_mem 2015-02-22 23:10:56 -03:00
config perf tools: Make sparc64 arch point to sparc 2015-02-25 17:39:17 -03:00
Documentation Merge branch 'perf/hw_breakpoints' into perf/core 2015-01-28 15:48:59 +01:00
python
scripts
tests Merge branch 'perf/hw_breakpoints' into perf/core 2015-01-28 15:48:59 +01:00
ui
util perf annotate: Fix fallback to unparsed disassembler line 2015-03-05 15:27:28 -03:00
.gitignore
builtin-annotate.c
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-diff.c
builtin-evlist.c
builtin-help.c
builtin-inject.c perf tools: Use perf_data_file__fd() consistently 2015-01-29 16:58:24 -03:00
builtin-kmem.c
builtin-kvm.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf tools: Use perf_data_file__fd() consistently 2015-01-29 16:58:24 -03:00
builtin-report.c
builtin-sched.c
builtin-script.c
builtin-stat.c
builtin-timechart.c
builtin-top.c
builtin-trace.c
builtin.h
command-list.txt
CREDITS
design.txt
Makefile
Makefile.perf
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c
perf-sys.h
perf-with-kcore.sh
perf.c
perf.h