summaryrefslogtreecommitdiffstats
path: root/tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2014-02-19 16:52:56 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-02-24 13:29:36 +0100
commit45757895c785e0a4c10afd5670cdc26cea2bbc97 (patch)
tree1c97c6d8f651a4ab316e124526a1def2e0efafd7 /tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c
parentperf tools: Warn the user about how to enable libunwind support (diff)
downloadlinux-45757895c785e0a4c10afd5670cdc26cea2bbc97.tar.xz
linux-45757895c785e0a4c10afd5670cdc26cea2bbc97.zip
perf tools: Add feature check for libdw dwarf unwind
Adding feature check test code for libdw dwarf unwind. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jean Pihet <jean.pihet@linaro.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1392825179-5228-4-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c')
-rw-r--r--tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c b/tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c
new file mode 100644
index 000000000000..f676a3ff442a
--- /dev/null
+++ b/tools/perf/config/feature-checks/test-libdw-dwarf-unwind.c
@@ -0,0 +1,13 @@
+
+#include <elfutils/libdwfl.h>
+
+int main(void)
+{
+ /*
+ * This function is guarded via: __nonnull_attribute__ (1, 2).
+ * Passing '1' as arguments value. This code is never executed,
+ * only compiled.
+ */
+ dwfl_thread_getframes((void *) 1, (void *) 1, NULL);
+ return 0;
+}