perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 877a7a11050ee4d465364c57f8fbf78f6b1a2559 Gitweb: http://git.kernel.org/tip/877a7a11050ee4d465364c57f8fbf78f6b1a2559 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Mon, 17 Apr 2017 11:39:06 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 19 Apr 2017 13:01:44 -0300
perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used
To pave the way for further cleanups where linux/kernel.h may stop being included in some header.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/bench/numa.c | 1 + tools/perf/builtin-help.c | 1 + tools/perf/builtin-kmem.c | 1 + tools/perf/builtin-kvm.c | 1 + tools/perf/builtin-lock.c | 1 + tools/perf/builtin-sched.c | 1 + tools/perf/builtin-script.c | 1 + tools/perf/builtin-timechart.c | 1 + tools/perf/builtin-trace.c | 1 + tools/perf/perf.c | 1 + tools/perf/tests/bpf.c | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/clang.c | 1 + tools/perf/tests/code-reading.c | 1 + tools/perf/tests/dso-data.c | 1 + tools/perf/tests/evsel-roundtrip-name.c | 1 + tools/perf/tests/hists_common.c | 1 + tools/perf/tests/hists_cumulate.c | 1 + tools/perf/tests/hists_filter.c | 1 + tools/perf/tests/hists_link.c | 1 + tools/perf/tests/hists_output.c | 1 + tools/perf/tests/is_printable_array.c | 1 + tools/perf/tests/mmap-basic.c | 1 + tools/perf/tests/parse-events.c | 2 +- tools/perf/tests/parse-no-sample-id-all.c | 1 + tools/perf/tests/pmu.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/ui/browsers/annotate.c | 1 + tools/perf/ui/tui/setup.c | 1 + tools/perf/util/annotate.c | 1 + tools/perf/util/bpf-loader.c | 1 + tools/perf/util/data-convert-bt.c | 1 + tools/perf/util/dso.c | 1 + tools/perf/util/dwarf-regs.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/evlist.h | 1 + tools/perf/util/mem-events.c | 1 + tools/perf/util/perf-hooks.c | 1 + tools/perf/util/session.h | 1 + tools/perf/util/sort.c | 1 + tools/perf/util/symbol.c | 1 + tools/perf/util/thread.c | 1 + 42 files changed, 42 insertions(+), 1 deletion(-)
tools/perf/bench/numa.c +1 -0
@@ -30,6 +30,7 @@#include <sys/wait.h> #include <sys/prctl.h> #include <sys/types.h> +#include <linux/kernel.h> #include <linux/time64.h> #include <numa.h>
tools/perf/builtin-help.c +1 -0
@@ -12,6 +12,7 @@#include <subcmd/run-command.h> #include <subcmd/help.h> #include "util/debug.h" +#include <linux/kernel.h> static struct man_viewer_list { struct man_viewer_list *next;
tools/perf/builtin-kmem.c +1 -0
@@ -20,6 +20,7 @@#include "util/debug.h" +#include <linux/kernel.h> #include <linux/rbtree.h> #include <linux/string.h> #include <locale.h>
tools/perf/builtin-kvm.c +1 -0
@@ -24,6 +24,7 @@#include <sys/timerfd.h> #endif +#include <linux/kernel.h> #include <linux/time64.h> #include <termios.h> #include <semaphore.h>
tools/perf/builtin-lock.c +1 -0
@@ -26,6 +26,7 @@#include <linux/list.h> #include <linux/hash.h> +#include <linux/kernel.h> static struct perf_session *session;
tools/perf/builtin-sched.c +1 -0
@@ -22,6 +22,7 @@#include "util/debug.h" +#include <linux/kernel.h> #include <linux/log2.h> #include <sys/prctl.h> #include <sys/resource.h>
tools/perf/builtin-script.c +1 -0
@@ -24,6 +24,7 @@#include "util/thread-stack.h" #include "util/time-utils.h" #include <linux/bitmap.h> +#include <linux/kernel.h> #include <linux/stringify.h> #include <linux/time64.h> #include "asm/bug.h"
tools/perf/builtin-timechart.c +1 -0
@@ -23,6 +23,7 @@#include "util/cache.h" #include "util/evlist.h" #include "util/evsel.h" +#include <linux/kernel.h> #include <linux/rbtree.h> #include <linux/time64.h> #include "util/symbol.h"
tools/perf/builtin-trace.c +1 -0
@@ -45,6 +45,7 @@#include <linux/err.h> #include <linux/filter.h> #include <linux/audit.h> +#include <linux/kernel.h> #include <linux/random.h> #include <linux/stringify.h> #include <linux/time64.h>
tools/perf/perf.c +1 -0
@@ -22,6 +22,7 @@#include <pthread.h> #include <stdlib.h> #include <time.h> +#include <linux/kernel.h> const char perf_usage_string[] ="perf [--version] [--help] [OPTIONS] COMMAND [ARGS]" ;
tools/perf/tests/bpf.c +1 -0
@@ -5,6 +5,7 @@#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"
tools/perf/tests/builtin-test.c +1 -0
@@ -13,6 +13,7 @@#include "color.h" #include <subcmd/parse-options.h> #include "symbol.h" +#include <linux/kernel.h> static bool dont_fork;
tools/perf/tests/clang.c +1 -0
@@ -2,6 +2,7 @@#include "debug.h" #include "util.h" #include "c++/clang-c.h" +#include <linux/kernel.h> static struct { int (*func)(void);
tools/perf/tests/code-reading.c +1 -0
@@ -1,3 +1,4 @@ +#include <linux/kernel.h> #include <linux/types.h> #include <stdlib.h> #include <unistd.h>
tools/perf/tests/dso-data.c +1 -0
@@ -1,4 +1,5 @@#include <stdlib.h> +#include <linux/kernel.h> #include <linux/types.h> #include <sys/stat.h> #include <fcntl.h>
tools/perf/tests/evsel-roundtrip-name.c +1 -0
@@ -3,6 +3,7 @@#include "parse-events.h" #include "tests.h" #include "debug.h" +#include <linux/kernel.h> static int perf_evsel__roundtrip_cache_name_test (void ) {
tools/perf/tests/hists_common.c +1 -0
@@ -7,6 +7,7 @@#include "util/machine.h" #include "util/thread.h" #include "tests/hists_common.h" +#include <linux/kernel.h> static struct { u32 pid;
tools/perf/tests/hists_cumulate.c +1 -0
@@ -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;
tools/perf/tests/hists_filter.c +1 -0
@@ -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;
tools/perf/tests/hists_link.c +1 -0
@@ -9,6 +9,7 @@#include "thread.h" #include "parse-events.h" #include "hists_common.h" +#include <linux/kernel.h> struct sample {u32 pid;
tools/perf/tests/hists_output.c +1 -0
@@ -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;
tools/perf/tests/is_printable_array.c +1 -0
@@ -1,4 +1,5 @@#include <linux/compiler.h> +#include <linux/kernel.h> #include "tests.h" #include "debug.h" #include "util.h"
tools/perf/tests/mmap-basic.c +1 -0
@@ -7,6 +7,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,
tools/perf/tests/parse-events.c +1 -1
@@ -1,4 +1,3 @@ -#include "parse-events.h" #include "evsel.h" #include "evlist.h"
@@ -6,6 +5,7 @@#include "tests.h" #include "debug.h" #include "util.h" +#include <linux/kernel.h> #include <linux/hw_breakpoint.h> #include <api/fs/fs.h>
tools/perf/tests/parse-no-sample-id-all.c +1 -0
@@ -1,3 +1,4 @@ +#include <linux/kernel.h> #include <linux/types.h> #include <stddef.h>
tools/perf/tests/pmu.c +1 -0
@@ -2,6 +2,7 @@#include "pmu.h" #include "util.h" #include "tests.h" +#include <linux/kernel.h> /* Simulated format definitions. */ static struct test_format {
tools/perf/tests/sample-parsing.c +1 -0
@@ -1,4 +1,5 @@#include <stdbool.h> +#include <linux/kernel.h> #include <linux/types.h> #include "util.h"
tools/perf/ui/browsers/annotate.c +1 -0
@@ -10,6 +10,7 @@#include "../../util/evsel.h" #include "../../util/config.h" #include <pthread.h> +#include <linux/kernel.h> struct disasm_line_samples {double percent;
tools/perf/ui/tui/setup.c +1 -0
@@ -1,6 +1,7 @@#include <errno.h> #include <signal.h> #include <stdbool.h> +#include <linux/kernel.h> #ifdef HAVE_BACKTRACE_SUPPORT #include <execinfo.h> #endif
tools/perf/util/annotate.c +1 -0
@@ -22,6 +22,7 @@#include <regex.h> #include <pthread.h> #include <linux/bitops.h> +#include <linux/kernel.h> #include <sys/utsname.h> const char *disassembler_style;
tools/perf/util/bpf-loader.c +1 -0
@@ -9,6 +9,7 @@#include <bpf/libbpf.h> #include <bpf/bpf.h> #include <linux/err.h> +#include <linux/kernel.h> #include <linux/string.h> #include "perf.h" #include "debug.h"
tools/perf/util/data-convert-bt.c +1 -0
@@ -8,6 +8,7 @@*/ #include <linux/compiler.h> +#include <linux/kernel.h> #include <babeltrace/ctf-writer/writer.h> #include <babeltrace/ctf-writer/clock.h> #include <babeltrace/ctf-writer/stream.h>
tools/perf/util/dso.c +1 -0
@@ -1,4 +1,5 @@#include <asm/bug.h> +#include <linux/kernel.h> #include <sys/time.h> #include <sys/resource.h> #include "symbol.h"
tools/perf/util/dwarf-regs.c +1 -0
@@ -8,6 +8,7 @@#include <debug.h> #include <dwarf-regs.h> #include <elf.h> +#include <linux/kernel.h> #ifndef EM_AARCH64 #define EM_AARCH64 183/* ARM 64 bit */
tools/perf/util/event.c +1 -0
@@ -1,3 +1,4 @@ +#include <linux/kernel.h> #include <linux/types.h> #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ #include <api/fs/fs.h>
tools/perf/util/evlist.h +1 -0
@@ -1,6 +1,7 @@#ifndef __PERF_EVLIST_H#define __PERF_EVLIST_H 1 +#include <linux/kernel.h> #include <linux/refcount.h> #include <linux/list.h> #include <api/fd/array.h>
tools/perf/util/mem-events.c +1 -0
@@ -6,6 +6,7 @@#include <sys/stat.h> #include <unistd.h> #include <api/fs/fs.h> +#include <linux/kernel.h> #include "mem-events.h" #include "debug.h" #include "symbol.h"
tools/perf/util/perf-hooks.c +1 -0
@@ -9,6 +9,7 @@#include <stdlib.h> #include <setjmp.h> #include <linux/err.h> +#include <linux/kernel.h> #include "util/util.h" #include "util/debug.h" #include "util/perf-hooks.h"
tools/perf/util/session.h +1 -0
@@ -9,6 +9,7 @@#include "thread.h" #include "data.h" #include "ordered-events.h" +#include <linux/kernel.h> #include <linux/rbtree.h> #include <linux/perf_event.h>
tools/perf/util/sort.c +1 -0
@@ -7,6 +7,7 @@#include "evlist.h" #include <traceevent/event-parse.h> #include "mem-events.h" +#include <linux/kernel.h> regex_t parent_regex;const char default_parent_pattern[] ="^sys_|^do_page_fault" ;
tools/perf/util/symbol.c +1 -0
@@ -3,6 +3,7 @@#include <stdlib.h> #include <stdio.h> #include <string.h> +#include <linux/kernel.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/param.h>
tools/perf/util/thread.c +1 -0
@@ -2,6 +2,7 @@#include <stdlib.h> #include <stdio.h> #include <string.h> +#include <linux/kernel.h> #include "session.h" #include "thread.h" #include "thread-stack.h"