From: Jean Pihet <jean.pihet@linaro.org>
To: linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org,
Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
Arnaldo <acme@ghostprotocols.net>
Cc: patches@linaro.org, Will Deacon <will.deacon@arm.com>,
Jean Pihet <jean.pihet@linaro.org>
Subject: [PATCH] perf: unwind: use the dwarf info only if loaded
Date: Mon, 16 Dec 2013 17:43:14 +0100 [thread overview]
Message-ID: <1387212194-8028-1-git-send-email-jean.pihet@linaro.org> (raw)
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>
---
tools/perf/util/unwind.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c
index 0efd539..416f22b 100644
--- a/tools/perf/util/unwind.c
+++ b/tools/perf/util/unwind.c
@@ -340,10 +340,10 @@ 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 */
if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
memset(&di, 0, sizeof(di));
- dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
- map->start, map->end);
- return dwarf_search_unwind_table(as, ip, &di, pi,
- need_unwind_info, arg);
+ if (dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
+ map->start, map->end))
+ return dwarf_search_unwind_table(as, ip, &di, pi,
+ need_unwind_info, arg);
}
#endif
--
1.7.11.7
next reply other threads:[~2013-12-16 16:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 16:43 Jean Pihet [this message]
2013-12-18 14:44 ` Jiri Olsa
2014-01-14 16:41 ` [tip:perf/core] perf tools: Use the DWARF unwind " tip-bot for Jean Pihet
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=1387212194-8028-1-git-send-email-jean.pihet@linaro.org \
--to=jean.pihet@linaro.org \
--cc=acme@ghostprotocols.net \
--cc=jolsa@redhat.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=patches@linaro.org \
--cc=will.deacon@arm.com \
/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
all inboxes | Powered by JetHome®