Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1246084
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/8] perf callchain: Use debug_frame if eh_frame is unusable |
| Date | 2015-10-13 21:50 +0200 |
| Message-ID | <qjdKa-80D-37@gated-at.bofh.it> (permalink) |
| References | <qjdK9-80D-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Rabin Vincent <rabin.vincent@axis.com>
When NO_LIBUNWIND_DEBUG_FRAME=0, use the .debug_frame if the .eh_frame
doesn't contain the approprate unwind tables.
Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rabin Vincent <rabinv@axis.com>
Link: http://lkml.kernel.org/r/1443379079-29133-3-git-send-email-rabin.vincent@axis.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/unwind-libunwind.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index 4c00507ee3fd..ea993f6c7e0c 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -330,6 +330,7 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
struct map *map;
unw_dyn_info_t di;
u64 table_data, segbase, fde_count;
+ int ret = -EINVAL;
map = find_map(ip, ui);
if (!map || !map->dso)
@@ -348,13 +349,14 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
di.u.rti.table_data = map->start + table_data;
di.u.rti.table_len = fde_count * sizeof(struct table_entry)
/ sizeof(unw_word_t);
- return dwarf_search_unwind_table(as, ip, &di, pi,
- need_unwind_info, arg);
+ ret = dwarf_search_unwind_table(as, ip, &di, pi,
+ need_unwind_info, arg);
}
#ifndef NO_LIBUNWIND_DEBUG_FRAME
/* Check the .debug_frame section for unwinding info */
- if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
+ if (ret < 0 &&
+ !read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
int fd = dso__data_get_fd(map->dso, ui->machine);
int is_exec = elf_is_exec(fd, map->dso->name);
unw_word_t base = is_exec ? 0 : map->start;
@@ -370,7 +372,7 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
}
#endif
- return -EINVAL;
+ return ret;
}
static int access_fpreg(unw_addr_space_t __maybe_unused as,
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 0/8] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 6/8] perf hists browser: Add 'm' key for context menu display Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 2/8] perf ui browsers: Remove help messages about use of right and arrow keys Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 4/8] perf callchain: Use debug_frame if eh_frame is unusable Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 5/8] perf callchains: Fix unw_word_t pointer casts Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 7/8] tools include: Fix strict-aliasing rules breakage Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 [PATCH 3/8] perf hists browser: Inform how to reset the symbol filter Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-13 21:50 +0200 Re: [GIT PULL 0/8] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-10-14 15:10 +0200
csiph-web