linux/tools/perf/tests
Milian Wolff df90cc41d6 perf tests: Fix compile when libunwind's unwind.h is available
When cross compiling perf and I want to link against a self-compiled
libunwind, I usually make the custom path where the libunwind headers
exist visible by adding the libunwind prefix to the include path when
compiling perf, i.e.:

~~~~~
$ ls $HOME/projects/compiled/other/include/
libunwind-coredump.h  libunwind.h         libunwind-x86_64.h
libunwind-common.h  libunwind-dynamic.h   libunwind-ptrace.h
unwind.h
$ make EXTRA_CFLAGS="-I$HOME/projects/compiled/other/include/
~~~~~~

Note the `unwind.h` header from libunwind which leads to compile
errors when compiling tests/dwarf-unwind.c, since it shadows perf's
util/unwind.h:

~~~~~
tests/dwarf-unwind.c:41:32: error: ‘struct unwind_entry’ declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
 static int unwind_entry(struct unwind_entry *entry, void *arg)
                                ^~~~~~~~~~~~
tests/dwarf-unwind.c: In function ‘unwind_entry’:
tests/dwarf-unwind.c:44:22: error: dereferencing pointer to incomplete type ‘struct unwind_entry’
  char *symbol = entry->sym ? entry->sym->name : NULL;
                      ^~
tests/dwarf-unwind.c: In function ‘unwind_thread’:
tests/dwarf-unwind.c:92:8: error: implicit declaration of function ‘unwind__get_entries’; did you mean ‘unwind_entry’? [-Werror=implicit-function-declaration]
  err = unwind__get_entries(unwind_entry, &cnt, thread,
        ^~~~~~~~~~~~~~~~~~~
        unwind_entry
tests/dwarf-unwind.c:92:8: error: nested extern declaration of ‘unwind__get_entries’ [-Werror=nested-externs]
~~~~~~

Fix this compile error by specificing an explicit include of perf's
unwind.h in the util folder.

Signed-off-by: Milian Wolff <milian.wolff@kdab.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Yao Jin <yao.jin@linux.intel.com>
Link: http://lkml.kernel.org/r/20170906150209.12579-1-milian.wolff@kdab.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-09-12 12:34:02 -03:00
..
attr perf tests attr: Add optional term 2017-07-18 23:14:22 -03:00
shell perf test shell: Replace '|&' with '2>&1 |' to work with more shells 2017-08-16 16:23:26 -03:00
.gitignore perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
attr.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
attr.py perf tests attr: Add optional term 2017-07-18 23:14:22 -03:00
backward-ring-buffer.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bitmap.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bp_signal_overflow.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bp_signal.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
bpf-script-example.c perf tests bpf: Use SyS_epoll_wait alias 2016-08-03 19:40:48 -03:00
bpf-script-test-kbuild.c perf test: Enhance the LLVM tests: add kbuild test 2015-11-06 17:49:50 -03:00
bpf-script-test-prologue.c perf bpf: Fix endianness problem when loading parameters in prologue 2017-08-16 10:31:11 -03:00
bpf-script-test-relocation.c perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
bpf.c perf events parse: Rename parse_events_parse arguments 2017-08-17 16:39:15 -03:00
Build perf test: Add test cases for new data source encoding 2017-08-22 13:23:10 -03:00
builtin-test.c perf test: Add test cases for new data source encoding 2017-08-22 13:23:10 -03:00
clang.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
code-reading.c perf test powerpc: Fix 'Object code reading' test 2017-09-01 14:45:59 -03:00
cpumap.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
dso-data.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
dwarf-unwind.c perf tests: Fix compile when libunwind's unwind.h is available 2017-09-12 12:34:02 -03:00
event_update.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
event-times.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
evsel-roundtrip-name.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
evsel-tp-sched.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
expr.c perf tools: Expression parser enhancements for metrics 2017-08-22 12:15:53 -03:00
fdarray.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_common.c perf tools: Including missing inttypes.h header 2017-04-19 13:01:46 -03:00
hists_common.h perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
hists_cumulate.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_filter.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_link.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
hists_output.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
is_printable_array.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
keep-tracking.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
kmod-path.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
llvm.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
llvm.h perf clang: Update test case to use real BPF script 2016-12-05 15:51:44 -03:00
make Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-12-17 16:24:13 -08:00
mem.c perf test: Add test cases for new data source encoding 2017-08-22 13:23:10 -03:00
mmap-basic.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
mmap-thread-lookup.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
openat-syscall-all-cpus.c perf evsel: Fix buffer overflow while freeing events 2017-08-22 11:51:31 -03:00
openat-syscall-tp-fields.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
openat-syscall.c perf evsel: Fix buffer overflow while freeing events 2017-08-22 11:51:31 -03:00
parse-events.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
parse-no-sample-id-all.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
perf-hooks.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
perf-record.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
perf-targz-src-pkg perf tests: Fix tarpkg build test error output redirection 2016-03-24 12:26:41 -03:00
pmu.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
python-use.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
sample-parsing.c perf test: Add test case for PERF_SAMPLE_PHYS_ADDR 2017-09-01 14:46:34 -03:00
sdt.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
stat.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
sw-clock.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
switch-tracking.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
task-exit.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
tests.h perf test: Add test cases for new data source encoding 2017-08-22 13:23:10 -03:00
thread-map.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
thread-mg-share.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
topology.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
unit_number__scnprintf.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00
vmlinux-kallsyms.c perf test: Add 'struct test *' to the test functions 2017-08-11 10:42:53 -03:00