diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-04-24 23:31:35 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-04-24 23:31:35 +0200 |
commit | fd7647979a3948dae4fc6f25dbbdf9ba269bed78 (patch) | |
tree | 3564d53e2242beb9616ad050a6142de689cf814a /tools/perf/tests | |
parent | e720c19e0d5412f45736d62258d21dc7b056c4ad (diff) | |
parent | 9d43f5e8df6804ae271407500af9062e9278167a (diff) |
Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Fix display of data source snoop indication in 'perf mem' (Andi Kleen)
- Fix the code to strip command name from /proc/PID/stat (Jiri Olsa)
Infrastructure changes:
- Continue the disentanglement of headers, specially util.h (Arnaldo Carvalho de Melo)
- Synchronize some header files with the kernel (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests')
32 files changed, 77 insertions, 4 deletions
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c index 88dc51f4c27b..0dd77494bb58 100644 --- a/tools/perf/tests/attr.c +++ b/tools/perf/tests/attr.c @@ -18,10 +18,16 @@ * permissions. All the event text files are stored there. */ +#include <errno.h> +#include <inttypes.h> #include <stdlib.h> #include <stdio.h> #include <linux/types.h> #include <linux/kernel.h> +#include <sys/param.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> #include "../perf.h" #include "util.h" #include <subcmd/exec-cmd.h> diff --git a/tools/perf/tests/backward-ring-buffer.c b/tools/perf/tests/backward-ring-buffer.c index 42e892b1e979..50f6d7afee58 100644 --- a/tools/perf/tests/backward-ring-buffer.c +++ b/tools/perf/tests/backward-ring-buffer.c @@ -8,6 +8,7 @@ #include <sys/prctl.h> #include "tests.h" #include "debug.h" +#include <errno.h> #define NR_ITERS 111 diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c index 1a04fe77487d..5876da126b58 100644 --- a/tools/perf/tests/bpf.c +++ b/tools/perf/tests/bpf.c @@ -1,10 +1,14 @@ +#include <errno.h> #include <stdio.h> #include <sys/epoll.h> +#include <sys/types.h> +#include <sys/stat.h> #include <util/util.h> #include <util/bpf-loader.h> #include <util/evlist.h> #include <linux/bpf.h> #include <linux/filter.h> +#include <linux/kernel.h> #include <api/fs/fs.h> #include <bpf/bpf.h> #include "tests.h" diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index e6d7876c94c2..9e08d297f1a9 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -3,8 +3,10 @@ * * Builtin regression testing command: ever growing number of sanity tests */ +#include <errno.h> #include <unistd.h> #include <string.h> +#include <sys/wait.h> #include "builtin.h" #include "hist.h" #include "intlist.h" @@ -13,6 +15,7 @@ #include "color.h" #include <subcmd/parse-options.h> #include "symbol.h" +#include <linux/kernel.h> static bool dont_fork; diff --git a/tools/perf/tests/clang.c b/tools/perf/tests/clang.c index f853e242a86c..c5bb2203f5a9 100644 --- a/tools/perf/tests/clang.c +++ b/tools/perf/tests/clang.c @@ -2,6 +2,7 @@ #include "debug.h" #include "util.h" #include "c++/clang-c.h" +#include <linux/kernel.h> static struct { int (*func)(void); diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c index d1f693041324..1f14e7612cbb 100644 --- a/tools/perf/tests/code-reading.c +++ b/tools/perf/tests/code-reading.c @@ -1,9 +1,12 @@ +#include <errno.h> +#include <linux/kernel.h> #include <linux/types.h> +#include <inttypes.h> #include <stdlib.h> #include <unistd.h> #include <stdio.h> -#include <ctype.h> #include <string.h> +#include <sys/param.h> #include "parse-events.h" #include "evlist.h" @@ -16,6 +19,8 @@ #include "tests.h" +#include "sane_ctype.h" + #define BUFSZ 1024 #define READLEN 128 diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index 13725e09ba22..8f08df5861cb 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c @@ -1,4 +1,6 @@ +#include <dirent.h> #include <stdlib.h> +#include <linux/kernel.h> #include <linux/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/tools/perf/tests/dwarf-unwind.c b/tools/perf/tests/dwarf-unwind.c index 1046491de4b2..dfe5c89e2049 100644 --- a/tools/perf/tests/dwarf-unwind.c +++ b/tools/perf/tests/dwarf-unwind.c @@ -1,5 +1,6 @@ #include <linux/compiler.h> #include <linux/types.h> +#include <inttypes.h> #include <unistd.h> #include "tests.h" #include "debug.h" diff --git a/tools/perf/tests/event-times.c b/tools/perf/tests/event-times.c index 19ef77bd6eb4..634f20c631d8 100644 --- a/tools/perf/tests/event-times.c +++ b/tools/perf/tests/event-times.c @@ -1,5 +1,8 @@ #include <linux/compiler.h> +#include <errno.h> +#include <inttypes.h> #include <string.h> +#include <sys/wait.h> #include "tests.h" #include "evlist.h" #include "evsel.h" diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c index 60926a1f6fd7..d2bea6f780f8 100644 --- a/tools/perf/tests/evsel-roundtrip-name.c +++ b/tools/perf/tests/evsel-roundtrip-name.c @@ -3,6 +3,8 @@ #include "parse-events.h" #include "tests.h" #include "debug.h" +#include <errno.h> +#include <linux/kernel.h> static int perf_evsel__roundtrip_cache_name_test(void) { diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c index 6b21746d6eec..00b8dc50f3db 100644 --- a/tools/perf/tests/hists_common.c +++ b/tools/perf/tests/hists_common.c @@ -1,3 +1,4 @@ +#include <inttypes.h> #include "perf.h" #include "util/debug.h" #include "util/symbol.h" @@ -7,6 +8,7 @@ #include "util/machine.h" #include "util/thread.h" #include "tests/hists_common.h" +#include <linux/kernel.h> static struct { u32 pid; diff --git a/tools/perf/tests/hists_cumulate.c b/tools/perf/tests/hists_cumulate.c index 9fd54b79a788..70918b986568 100644 --- a/tools/perf/tests/hists_cumulate.c +++ b/tools/perf/tests/hists_cumulate.c @@ -9,6 +9,7 @@ #include "util/parse-events.h" #include "tests/tests.h" #include "tests/hists_common.h" +#include <linux/kernel.h> struct sample { u32 pid; diff --git a/tools/perf/tests/hists_filter.c b/tools/perf/tests/hists_filter.c index 62efb14f3a5a..f171b2da4899 100644 --- a/tools/perf/tests/hists_filter.c +++ b/tools/perf/tests/hists_filter.c @@ -9,6 +9,7 @@ #include "util/parse-events.h" #include "tests/tests.h" #include "tests/hists_common.h" +#include <linux/kernel.h> struct sample { u32 pid; diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index eddc7407ff8a..a26cbb79e988 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c @@ -9,6 +9,8 @@ #include "thread.h" #include "parse-events.h" #include "hists_common.h" +#include <errno.h> +#include <linux/kernel.h> struct sample { u32 pid; diff --git a/tools/perf/tests/hists_output.c b/tools/perf/tests/hists_output.c index 63c5efaba1b5..cdf0dde5fe97 100644 --- a/tools/perf/tests/hists_output.c +++ b/tools/perf/tests/hists_output.c @@ -9,6 +9,7 @@ #include "util/parse-events.h" #include "tests/tests.h" #include "tests/hists_common.h" +#include <linux/kernel.h> struct sample { u32 cpu; diff --git a/tools/perf/tests/is_printable_array.c b/tools/perf/tests/is_printable_array.c index 42e13393e502..a5192f6a20d7 100644 --- a/tools/perf/tests/is_printable_array.c +++ b/tools/perf/tests/is_printable_array.c @@ -1,7 +1,8 @@ #include <linux/compiler.h> +#include <linux/kernel.h> #include "tests.h" #include "debug.h" -#include "util.h" +#include "print_binary.h" int test__is_printable_array(int subtest __maybe_unused) { diff --git a/tools/perf/tests/mmap-basic.c b/tools/perf/tests/mmap-basic.c index 634bce9caebd..15c770856aac 100644 --- a/tools/perf/tests/mmap-basic.c +++ b/tools/perf/tests/mmap-basic.c @@ -1,3 +1,5 @@ +#include <errno.h> +#include <inttypes.h> /* For the CLR_() macros */ #include <pthread.h> @@ -7,6 +9,7 @@ #include "cpumap.h" #include "tests.h" #include <linux/err.h> +#include <linux/kernel.h> /* * This test will generate random numbers of calls to some getpid syscalls, diff --git a/tools/perf/tests/mmap-thread-lookup.c b/tools/perf/tests/mmap-thread-lookup.c index 0c5ce44f723f..6ea4d8a5d26b 100644 --- a/tools/perf/tests/mmap-thread-lookup.c +++ b/tools/perf/tests/mmap-thread-lookup.c @@ -1,3 +1,4 @@ +#include <inttypes.h> #include <unistd.h> #include <sys/syscall.h> #include <sys/types.h> @@ -11,6 +12,7 @@ #include "thread_map.h" #include "symbol.h" #include "thread.h" +#include "util.h" #define THREADS 4 diff --git a/tools/perf/tests/openat-syscall-all-cpus.c b/tools/perf/tests/openat-syscall-all-cpus.c index c8d9592eb142..1a74dd9fd067 100644 --- a/tools/perf/tests/openat-syscall-all-cpus.c +++ b/tools/perf/tests/openat-syscall-all-cpus.c @@ -1,8 +1,14 @@ +#include <errno.h> +#include <inttypes.h> /* For the CPU_* macros */ #include <pthread.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #include <api/fs/fs.h> #include <linux/err.h> +#include <api/fs/tracing_path.h> #include "evsel.h" #include "tests.h" #include "thread_map.h" diff --git a/tools/perf/tests/openat-syscall-tp-fields.c b/tools/perf/tests/openat-syscall-tp-fields.c index f52239fed361..9788fac91095 100644 --- a/tools/perf/tests/openat-syscall-tp-fields.c +++ b/tools/perf/tests/openat-syscall-tp-fields.c @@ -5,6 +5,7 @@ #include "thread_map.h" #include "tests.h" #include "debug.h" +#include <errno.h> #ifndef O_DIRECTORY #define O_DIRECTORY 00200000 diff --git a/tools/perf/tests/openat-syscall.c b/tools/perf/tests/openat-syscall.c index d7414128d7fe..e44506e21ee7 100644 --- a/tools/perf/tests/openat-syscall.c +++ b/tools/perf/tests/openat-syscall.c @@ -1,5 +1,10 @@ +#include <errno.h> +#include <inttypes.h> #include <api/fs/tracing_path.h> #include <linux/err.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> #include "thread_map.h" #include "evsel.h" #include "debug.h" diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 1dc838014422..7fad885491c5 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -1,4 +1,3 @@ - #include "parse-events.h" #include "evsel.h" #include "evlist.h" @@ -6,8 +5,15 @@ #include "tests.h" #include "debug.h" #include "util.h" +#include <dirent.h> +#include <errno.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#include <linux/kernel.h> #include <linux/hw_breakpoint.h> #include <api/fs/fs.h> +#include <api/fs/tracing_path.h> #define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME | \ PERF_SAMPLE_CPU | PERF_SAMPLE_PERIOD) diff --git a/tools/perf/tests/parse-no-sample-id-all.c b/tools/perf/tests/parse-no-sample-id-all.c index 65dcf48a92fb..c6207db09f12 100644 --- a/tools/perf/tests/parse-no-sample-id-all.c +++ b/tools/perf/tests/parse-no-sample-id-all.c @@ -1,3 +1,4 @@ +#include <linux/kernel.h> #include <linux/types.h> #include <stddef.h> diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c index 87893f3ba5f1..d37cd9588cc0 100644 --- a/tools/perf/tests/perf-record.c +++ b/tools/perf/tests/perf-record.c @@ -1,3 +1,5 @@ +#include <errno.h> +#include <inttypes.h> /* For the CLR_() macros */ #include <pthread.h> diff --git a/tools/perf/tests/pmu.c b/tools/perf/tests/pmu.c index 1e2ba2602930..a6d7aef30030 100644 --- a/tools/perf/tests/pmu.c +++ b/tools/perf/tests/pmu.c @@ -2,6 +2,8 @@ #include "pmu.h" #include "util.h" #include "tests.h" +#include <errno.h> +#include <linux/kernel.h> /* Simulated format definitions. */ static struct test_format { diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c index 5f23710b9fee..bac5c3885b3b 100644 --- a/tools/perf/tests/sample-parsing.c +++ b/tools/perf/tests/sample-parsing.c @@ -1,4 +1,6 @@ #include <stdbool.h> +#include <inttypes.h> +#include <linux/kernel.h> #include <linux/types.h> #include "util.h" diff --git a/tools/perf/tests/sdt.c b/tools/perf/tests/sdt.c index 26e5b7a0b839..f73b3c5e125d 100644 --- a/tools/perf/tests/sdt.c +++ b/tools/perf/tests/sdt.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <stdio.h> #include <sys/epoll.h> #include <util/util.h> diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c index 4c9fd046d57b..828494db4a19 100644 --- a/tools/perf/tests/sw-clock.c +++ b/tools/perf/tests/sw-clock.c @@ -1,3 +1,5 @@ +#include <errno.h> +#include <inttypes.h> #include <unistd.h> #include <stdlib.h> #include <signal.h> diff --git a/tools/perf/tests/switch-tracking.c b/tools/perf/tests/switch-tracking.c index 7ddbe267d0ac..65474fd80da7 100644 --- a/tools/perf/tests/switch-tracking.c +++ b/tools/perf/tests/switch-tracking.c @@ -1,5 +1,6 @@ #include <sys/time.h> #include <sys/prctl.h> +#include <errno.h> #include <time.h> #include <stdlib.h> diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 01a5ba2788c6..32873ec91a4e 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -4,6 +4,7 @@ #include "cpumap.h" #include "tests.h" +#include <errno.h> #include <signal.h> static int exited; diff --git a/tools/perf/tests/unit_number__scnprintf.c b/tools/perf/tests/unit_number__scnprintf.c index 623c2aa53c4a..44589de084b8 100644 --- a/tools/perf/tests/unit_number__scnprintf.c +++ b/tools/perf/tests/unit_number__scnprintf.c @@ -1,7 +1,8 @@ +#include <inttypes.h> #include <linux/compiler.h> #include <linux/types.h> #include "tests.h" -#include "util.h" +#include "units.h" #include "debug.h" int test__unit_number__scnprint(int subtest __maybe_unused) diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c index 862b043e5924..8456175fc234 100644 --- a/tools/perf/tests/vmlinux-kallsyms.c +++ b/tools/perf/tests/vmlinux-kallsyms.c @@ -1,5 +1,6 @@ #include <linux/compiler.h> #include <linux/rbtree.h> +#include <inttypes.h> #include <string.h> #include "map.h" #include "symbol.h" |