-
Notifications
You must be signed in to change notification settings - Fork 54.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
6 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |