From: tip-bot for He Kuang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jpoimboe@redhat.com, tumanova@linux.vnet.ibm.com,
alexander.shishkin@linux.intel.com, dsahern@gmail.com,
ak@linux.intel.com, peterz@infradead.org, hekuang@huawei.com,
eranian@google.com, sukadev@linux.vnet.ibm.com,
namhyung@kernel.org, acme@redhat.com, jolsa@kernel.org,
penberg@kernel.org, mhiramat@kernel.org, hpa@zytor.com,
wangnan0@huawei.com, mingo@kernel.org, tglx@linutronix.de,
adrian.hunter@intel.com, linux-kernel@vger.kernel.org,
kan.liang@intel.com
Subject: [tip:perf/core] perf build: Add build-test for libunwind cross-platforms support
Date: Thu, 12 May 2016 03:23:38 -0700 [thread overview]
Message-ID: <tip-b1d960000ca12508c25776f1fd375ee81578ae1f@git.kernel.org> (raw)
In-Reply-To: <1462866037-30382-4-git-send-email-hekuang@huawei.com>
Commit-ID: b1d960000ca12508c25776f1fd375ee81578ae1f
Gitweb: http://git.kernel.org/tip/b1d960000ca12508c25776f1fd375ee81578ae1f
Author: He Kuang <hekuang@huawei.com>
AuthorDate: Tue, 10 May 2016 07:40:31 +0000
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 11 May 2016 12:24:58 -0300
perf build: Add build-test for libunwind cross-platforms support
Currently only test for local libunwind. We should check all supported
platforms so we can use them to parse perf.data with callchain info on
different machines.
Signed-off-by: He Kuang <hekuang@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1462866037-30382-4-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/build/Makefile.feature | 4 ++++
tools/build/feature/Makefile | 16 ++++++++++++++++
tools/build/feature/test-libunwind-aarch64.c | 26 ++++++++++++++++++++++++++
tools/build/feature/test-libunwind-arm.c | 27 +++++++++++++++++++++++++++
tools/build/feature/test-libunwind-x86.c | 27 +++++++++++++++++++++++++++
tools/build/feature/test-libunwind-x86_64.c | 27 +++++++++++++++++++++++++++
6 files changed, 127 insertions(+)
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 9f87861..7e36e91 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -49,6 +49,10 @@ FEATURE_TESTS_BASIC := \
libslang \
libcrypto \
libunwind \
+ libunwind-x86 \
+ libunwind-x86_64 \
+ libunwind-arm \
+ libunwind-aarch64 \
pthread-attr-setaffinity-np \
stackprotector-all \
timerfd \
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 4ae94db..f4fe3bc 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -27,6 +27,10 @@ FILES= \
test-libcrypto.bin \
test-libunwind.bin \
test-libunwind-debug-frame.bin \
+ test-libunwind-x86.bin \
+ test-libunwind-x86_64.bin \
+ test-libunwind-arm.bin \
+ test-libunwind-aarch64.bin \
test-pthread-attr-setaffinity-np.bin \
test-stackprotector-all.bin \
test-timerfd.bin \
@@ -103,6 +107,18 @@ $(OUTPUT)test-libunwind.bin:
$(OUTPUT)test-libunwind-debug-frame.bin:
$(BUILD) -lelf
+$(OUTPUT)test-libunwind-x86.bin:
+ $(BUILD) -lelf -lunwind-x86
+
+$(OUTPUT)test-libunwind-x86_64.bin:
+ $(BUILD) -lelf -lunwind-x86_64
+
+$(OUTPUT)test-libunwind-arm.bin:
+ $(BUILD) -lelf -lunwind-arm
+
+$(OUTPUT)test-libunwind-aarch64.bin:
+ $(BUILD) -lelf -lunwind-aarch64
+
$(OUTPUT)test-libaudit.bin:
$(BUILD) -laudit
diff --git a/tools/build/feature/test-libunwind-aarch64.c b/tools/build/feature/test-libunwind-aarch64.c
new file mode 100644
index 0000000..fc03fb6
--- /dev/null
+++ b/tools/build/feature/test-libunwind-aarch64.c
@@ -0,0 +1,26 @@
+#include <libunwind-aarch64.h>
+#include <stdlib.h>
+
+extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
+ unw_word_t ip,
+ unw_dyn_info_t *di,
+ unw_proc_info_t *pi,
+ int need_unwind_info, void *arg);
+
+#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
+
+static unw_accessors_t accessors;
+
+int main(void)
+{
+ unw_addr_space_t addr_space;
+
+ addr_space = unw_create_addr_space(&accessors, 0);
+ if (addr_space)
+ return 0;
+
+ unw_init_remote(NULL, addr_space, NULL);
+ dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
+
+ return 0;
+}
diff --git a/tools/build/feature/test-libunwind-arm.c b/tools/build/feature/test-libunwind-arm.c
new file mode 100644
index 0000000..632d95e
--- /dev/null
+++ b/tools/build/feature/test-libunwind-arm.c
@@ -0,0 +1,27 @@
+#include <libunwind-arm.h>
+#include <stdlib.h>
+
+extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
+ unw_word_t ip,
+ unw_dyn_info_t *di,
+ unw_proc_info_t *pi,
+ int need_unwind_info, void *arg);
+
+
+#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
+
+static unw_accessors_t accessors;
+
+int main(void)
+{
+ unw_addr_space_t addr_space;
+
+ addr_space = unw_create_addr_space(&accessors, 0);
+ if (addr_space)
+ return 0;
+
+ unw_init_remote(NULL, addr_space, NULL);
+ dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
+
+ return 0;
+}
diff --git a/tools/build/feature/test-libunwind-x86.c b/tools/build/feature/test-libunwind-x86.c
new file mode 100644
index 0000000..3561edc
--- /dev/null
+++ b/tools/build/feature/test-libunwind-x86.c
@@ -0,0 +1,27 @@
+#include <libunwind-x86.h>
+#include <stdlib.h>
+
+extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
+ unw_word_t ip,
+ unw_dyn_info_t *di,
+ unw_proc_info_t *pi,
+ int need_unwind_info, void *arg);
+
+
+#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
+
+static unw_accessors_t accessors;
+
+int main(void)
+{
+ unw_addr_space_t addr_space;
+
+ addr_space = unw_create_addr_space(&accessors, 0);
+ if (addr_space)
+ return 0;
+
+ unw_init_remote(NULL, addr_space, NULL);
+ dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
+
+ return 0;
+}
diff --git a/tools/build/feature/test-libunwind-x86_64.c b/tools/build/feature/test-libunwind-x86_64.c
new file mode 100644
index 0000000..5add251
--- /dev/null
+++ b/tools/build/feature/test-libunwind-x86_64.c
@@ -0,0 +1,27 @@
+#include <libunwind-x86_64.h>
+#include <stdlib.h>
+
+extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
+ unw_word_t ip,
+ unw_dyn_info_t *di,
+ unw_proc_info_t *pi,
+ int need_unwind_info, void *arg);
+
+
+#define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
+
+static unw_accessors_t accessors;
+
+int main(void)
+{
+ unw_addr_space_t addr_space;
+
+ addr_space = unw_create_addr_space(&accessors, 0);
+ if (addr_space)
+ return 0;
+
+ unw_init_remote(NULL, addr_space, NULL);
+ dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
+
+ return 0;
+}
next prev parent reply other threads:[~2016-05-12 10:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-10 7:40 [PATCH v2 0/9] Add support for remote unwind He Kuang
2016-05-10 7:40 ` [PATCH v2 1/9] perf tools: Omit DWARF judgement when recording dwarf callchain He Kuang
2016-05-10 13:45 ` Arnaldo Carvalho de Melo
2016-05-10 7:40 ` [PATCH v2 2/9] perf script: Add options for custom vdso path He Kuang
2016-05-10 13:44 ` Arnaldo Carvalho de Melo
2016-05-11 1:33 ` Hekuang
2016-05-10 7:40 ` [PATCH v2 3/9] perf build: Add build-test for libunwind cross-platforms support He Kuang
2016-05-11 11:52 ` Jiri Olsa
2016-05-11 13:24 ` Arnaldo Carvalho de Melo
2016-05-12 10:23 ` tip-bot for He Kuang [this message]
2016-05-10 7:40 ` [PATCH v2 4/9] perf build: Add build-test for debug-frame on arm/arm64 He Kuang
2016-05-11 11:58 ` Jiri Olsa
2016-05-11 13:24 ` Arnaldo Carvalho de Melo
2016-05-12 10:24 ` [tip:perf/core] " tip-bot for He Kuang
2016-05-10 7:40 ` [PATCH v2 5/9] perf tools: Add methods to test dso is 64-bit or 32-bit He Kuang
2016-05-10 8:08 ` Adrian Hunter
2016-05-10 9:49 ` Hekuang
2016-05-10 10:34 ` Adrian Hunter
2016-05-10 11:38 ` Hekuang
2016-05-10 11:59 ` Adrian Hunter
2016-05-10 12:29 ` Hekuang
2016-05-10 7:40 ` [PATCH v2 6/9] perf tools: Promote proper messages for cross-platform unwind He Kuang
2016-05-10 7:40 ` [PATCH v2 7/9] perf callchain: Add support " He Kuang
2016-05-10 7:40 ` [PATCH v2 8/9] perf callchain: Support x86 target platform He Kuang
2016-05-10 7:40 ` [PATCH v2 9/9] perf callchain: Support aarch64 cross-platform He Kuang
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-b1d960000ca12508c25776f1fd375ee81578ae1f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=hekuang@huawei.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=sukadev@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=tumanova@linux.vnet.ibm.com \
--cc=wangnan0@huawei.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
Powered by JetHome