diff options
author | He Kuang <hekuang@huawei.com> | 2016-05-10 03:40:32 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-05-11 11:24:58 -0400 |
commit | f9be7eefcce9de7323c922bea6b45183eb9ef5f0 (patch) | |
tree | 5abd4bd3cf645b5a45a0ccc08ad3eb4b1266376f | |
parent | b1d960000ca12508c25776f1fd375ee81578ae1f (diff) |
perf build: Add build-test for debug-frame on arm/arm64
Debug-frame for remote platforms is not related to the host platform, so
we should test each platform separately.
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 <masami.hiramatsu.pt@hitachi.com>
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-5-git-send-email-hekuang@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/build/Makefile.feature | 4 | ||||
-rw-r--r-- | tools/build/feature/Makefile | 7 | ||||
-rw-r--r-- | tools/build/feature/test-libunwind-debug-frame-aarch64.c | 16 | ||||
-rw-r--r-- | tools/build/feature/test-libunwind-debug-frame-arm.c | 16 |
4 files changed, 42 insertions, 1 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 7e36e91ef6d4..57c8f98874e8 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature | |||
@@ -73,7 +73,9 @@ FEATURE_TESTS_EXTRA := \ | |||
73 | libbabeltrace \ | 73 | libbabeltrace \ |
74 | liberty \ | 74 | liberty \ |
75 | liberty-z \ | 75 | liberty-z \ |
76 | libunwind-debug-frame | 76 | libunwind-debug-frame \ |
77 | libunwind-debug-frame-arm \ | ||
78 | libunwind-debug-frame-aarch64 | ||
77 | 79 | ||
78 | FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) | 80 | FEATURE_TESTS ?= $(FEATURE_TESTS_BASIC) |
79 | 81 | ||
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index f4fe3bc59b60..3d88f09e188b 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile | |||
@@ -31,6 +31,8 @@ FILES= \ | |||
31 | test-libunwind-x86_64.bin \ | 31 | test-libunwind-x86_64.bin \ |
32 | test-libunwind-arm.bin \ | 32 | test-libunwind-arm.bin \ |
33 | test-libunwind-aarch64.bin \ | 33 | test-libunwind-aarch64.bin \ |
34 | test-libunwind-debug-frame-arm.bin \ | ||
35 | test-libunwind-debug-frame-aarch64.bin \ | ||
34 | test-pthread-attr-setaffinity-np.bin \ | 36 | test-pthread-attr-setaffinity-np.bin \ |
35 | test-stackprotector-all.bin \ | 37 | test-stackprotector-all.bin \ |
36 | test-timerfd.bin \ | 38 | test-timerfd.bin \ |
@@ -119,6 +121,11 @@ $(OUTPUT)test-libunwind-arm.bin: | |||
119 | $(OUTPUT)test-libunwind-aarch64.bin: | 121 | $(OUTPUT)test-libunwind-aarch64.bin: |
120 | $(BUILD) -lelf -lunwind-aarch64 | 122 | $(BUILD) -lelf -lunwind-aarch64 |
121 | 123 | ||
124 | $(OUTPUT)test-libunwind-debug-frame-arm.bin: | ||
125 | $(BUILD) -lelf -lunwind-arm | ||
126 | |||
127 | $(OUTPUT)test-libunwind-debug-frame-aarch64.bin: | ||
128 | $(BUILD) -lelf -lunwind-aarch64 | ||
122 | 129 | ||
123 | $(OUTPUT)test-libaudit.bin: | 130 | $(OUTPUT)test-libaudit.bin: |
124 | $(BUILD) -laudit | 131 | $(BUILD) -laudit |
diff --git a/tools/build/feature/test-libunwind-debug-frame-aarch64.c b/tools/build/feature/test-libunwind-debug-frame-aarch64.c new file mode 100644 index 000000000000..22844673fc26 --- /dev/null +++ b/tools/build/feature/test-libunwind-debug-frame-aarch64.c | |||
@@ -0,0 +1,16 @@ | |||
1 | #include <libunwind-aarch64.h> | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | extern int | ||
5 | UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug, | ||
6 | unw_word_t ip, unw_word_t segbase, | ||
7 | const char *obj_name, unw_word_t start, | ||
8 | unw_word_t end); | ||
9 | |||
10 | #define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame) | ||
11 | |||
12 | int main(void) | ||
13 | { | ||
14 | dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0); | ||
15 | return 0; | ||
16 | } | ||
diff --git a/tools/build/feature/test-libunwind-debug-frame-arm.c b/tools/build/feature/test-libunwind-debug-frame-arm.c new file mode 100644 index 000000000000..f98859684fee --- /dev/null +++ b/tools/build/feature/test-libunwind-debug-frame-arm.c | |||
@@ -0,0 +1,16 @@ | |||
1 | #include <libunwind-arm.h> | ||
2 | #include <stdlib.h> | ||
3 | |||
4 | extern int | ||
5 | UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug, | ||
6 | unw_word_t ip, unw_word_t segbase, | ||
7 | const char *obj_name, unw_word_t start, | ||
8 | unw_word_t end); | ||
9 | |||
10 | #define dwarf_find_debug_frame UNW_OBJ(dwarf_find_debug_frame) | ||
11 | |||
12 | int main(void) | ||
13 | { | ||
14 | dwarf_find_debug_frame(0, NULL, 0, 0, NULL, 0, 0); | ||
15 | return 0; | ||
16 | } | ||