From: jean.pihet@linaro.org (Jean Pihet)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] perf tools: Check libunwind for availability of dwarf parsing feature
Date: Thu, 26 Sep 2013 13:36:37 +0200 [thread overview]
Message-ID: <1380195398-4402-4-git-send-email-jean.pihet@linaro.org> (raw)
In-Reply-To: <1380195398-4402-1-git-send-email-jean.pihet@linaro.org>
The newly added dwarf unwinding feature [1] requires:
. a recent version (>= 1.1) of libunwind,
. libunwind to be configured with --enable-debug-frame.
[1] http://www.spinics.net/lists/kernel/msg1598951.html
Add the corresponding API tests in the feature check list.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
---
tools/perf/config/Makefile | 6 +++++-
tools/perf/config/feature-tests.mak | 21 ++++++++++++++++++++-
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 4b65710..bbaeb04 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -223,9 +223,13 @@ endif
FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(CFLAGS) $(LIBUNWIND_LDFLAGS) $(LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS)
ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
- msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
+ msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1);
NO_LIBUNWIND := 1
endif # Libunwind support
+ifneq ($(call try-cc,$(SOURCE_LIBUNWIND_DEBUG_FRAME),$(FLAGS_UNWIND),libunwind debug_frame),y)
+ msg := $(warning No debug_frame support found in libunwind);
+CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
+endif # debug_frame support in libunwind
endif # NO_LIBUNWIND
ifndef NO_LIBUNWIND
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak
index 708fb8e..cde75f5 100644
--- a/tools/perf/config/feature-tests.mak
+++ b/tools/perf/config/feature-tests.mak
@@ -176,7 +176,6 @@ extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
unw_proc_info_t *pi,
int need_unwind_info, void *arg);
-
#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
int main(void)
@@ -188,6 +187,26 @@ int main(void)
return 0;
}
endef
+
+define SOURCE_LIBUNWIND_DEBUG_FRAME
+#include <libunwind.h>
+#include <stdlib.h>
+
+extern int
+UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug,
+ unw_word_t ip, unw_word_t segbase,
+ const char *obj_name, unw_word_t start,
+ unw_word_t end);
+
+#define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame)
+
+int main(void)
+{
+ dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0);
+ return 0;
+}
+endef
+
endif
ifndef NO_BACKTRACE
--
1.7.11.7
next prev parent reply other threads:[~2013-09-26 11:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 11:36 [PATCH v3 0/4] perf: parse the dwarf backtrace info from .debug_frame section Jean Pihet
2013-09-26 11:36 ` [PATCH 1/4] ARM: perf: add support for perf registers API Jean Pihet
2013-09-26 11:36 ` [PATCH 2/4] ARM: perf: wire up perf_regs and unwind support for ARM Jean Pihet
2013-09-26 11:36 ` Jean Pihet [this message]
2013-09-26 12:48 ` [PATCH 3/4] perf tools: Check libunwind for availability of dwarf parsing feature Jiri Olsa
2013-10-08 10:44 ` Jean Pihet
2013-10-08 10:47 ` Peter Zijlstra
2013-10-08 14:15 ` Jean Pihet
2013-10-08 14:28 ` Arnaldo Carvalho de Melo
2013-10-08 14:31 ` Will Deacon
2013-09-26 11:36 ` [PATCH 4/4] perf: parse the .debug_frame section in case .eh_frame is not present Jean Pihet
2013-09-26 12:49 ` Jiri Olsa
2013-10-08 10:44 ` Jean Pihet
-- strict thread matches above, loose matches on Subject: below --
2013-09-16 9:17 [PATCH v2 0/4] perf: parse the dwarf backtrace info from .debug_frame section Jean Pihet
2013-09-16 9:17 ` [PATCH 3/4] perf tools: Check libunwind for availability of dwarf parsing feature Jean Pihet
2013-09-17 10:29 ` Will Deacon
2013-09-24 8:55 ` Jean Pihet
2013-09-24 9:34 ` Jiri Olsa
2013-09-24 10:06 ` Will Deacon
2013-09-24 12:03 ` Jean Pihet
2013-09-24 17:43 ` Jiri Olsa
2013-09-25 6:53 ` Jean Pihet
2013-09-25 7:31 ` Jiri Olsa
2013-09-26 11:39 ` Jean Pihet
2013-09-24 17:12 ` Arnaldo Carvalho de Melo
2013-09-30 16:01 ` Will Deacon
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=1380195398-4402-4-git-send-email-jean.pihet@linaro.org \
--to=jean.pihet@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).