From: tip-bot for Rabin Vincent <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jolsa@kernel.org,
tglx@linutronix.de, hpa@zytor.com, rabinv@axis.com,
acme@redhat.com, a.p.zijlstra@chello.nl, rabin.vincent@axis.com,
mingo@kernel.org
Subject: [tip:perf/core] perf callchain: Use debug_frame if eh_frame is unusable
Date: Wed, 14 Oct 2015 06:13:45 -0700 [thread overview]
Message-ID: <tip-8eac1d5e9256260b9cc3bfcdd9b8b995990950f5@git.kernel.org> (raw)
In-Reply-To: <1443379079-29133-3-git-send-email-rabin.vincent@axis.com>
Commit-ID: 8eac1d5e9256260b9cc3bfcdd9b8b995990950f5
Gitweb: http://git.kernel.org/tip/8eac1d5e9256260b9cc3bfcdd9b8b995990950f5
Author: Rabin Vincent <rabin.vincent@axis.com>
AuthorDate: Sun, 27 Sep 2015 20:37:57 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 12 Oct 2015 23:25:25 -0300
perf callchain: Use debug_frame if eh_frame is unusable
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 4c00507..ea993f6 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,
next prev parent reply other threads:[~2015-10-14 13:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-27 18:37 [PATCH 1/5] perf: unwind: fix unw_word_t pointer casts Rabin Vincent
2015-09-27 18:37 ` [PATCH 2/5] perf: unwind: pass symbol source to libunwind Rabin Vincent
2015-10-12 11:24 ` Jiri Olsa
2015-10-12 12:35 ` Namhyung Kim
2015-10-13 10:51 ` Rabin Vincent
2015-09-27 18:37 ` [PATCH 3/5] perf: unwind: use debug_frame if eh_frame is unusable Rabin Vincent
2015-10-12 11:28 ` Jiri Olsa
2015-10-14 13:13 ` tip-bot for Rabin Vincent [this message]
2015-09-27 18:37 ` [PATCH 4/5] tools: build: fix libiberty feature detection Rabin Vincent
2015-10-12 11:35 ` Jiri Olsa
2015-10-13 11:00 ` Rabin Vincent
2015-09-27 18:37 ` [PATCH 5/5] perf: add Makefile.deps for easier cross compiling Rabin Vincent
2015-10-12 11:42 ` Jiri Olsa
2015-10-13 10:50 ` Rabin Vincent
2015-10-13 11:52 ` Jiri Olsa
2015-10-10 15:49 ` [PATCH 1/5] perf: unwind: fix unw_word_t pointer casts Rabin Vincent
2015-10-10 23:34 ` Arnaldo Carvalho de Melo
2015-10-12 8:38 ` Jiri Olsa
2015-10-14 13:14 ` [tip:perf/core] perf callchains: Fix " tip-bot for Rabin Vincent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-8eac1d5e9256260b9cc3bfcdd9b8b995990950f5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rabin.vincent@axis.com \
--cc=rabinv@axis.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome