perf tools: Use the DWARF unwind info only if loaded

Use the info only if it has been found in the .debug_frame section of
the ELF binary.

Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linaro-kernel@lists.linaro.org
Cc: patches@linaro.org
Link: http://lkml.kernel.org/r/1387212194-8028-1-git-send-email-jean.pihet@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Jean Pihet 2013-12-16 17:43:14 +01:00 committed by Arnaldo Carvalho de Melo
parent 4887805384
commit d11416e76b
1 changed files with 4 additions and 4 deletions

View File

@ -340,8 +340,8 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
/* Check the .debug_frame section for unwinding info */ /* Check the .debug_frame section for unwinding info */
if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) { if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
memset(&di, 0, sizeof(di)); memset(&di, 0, sizeof(di));
dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name, if (dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
map->start, map->end); map->start, map->end))
return dwarf_search_unwind_table(as, ip, &di, pi, return dwarf_search_unwind_table(as, ip, &di, pi,
need_unwind_info, arg); need_unwind_info, arg);
} }