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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-qqxan6tfsl6qx3l0v3nwgjvk@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 8607c1ee
......@@ -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>
......
......@@ -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;
......
......@@ -20,6 +20,7 @@
#include "util/debug.h"
#include <linux/kernel.h>
#include <linux/rbtree.h>
#include <linux/string.h>
#include <locale.h>
......
......@@ -24,6 +24,7 @@
#include <sys/timerfd.h>
#endif
#include <linux/kernel.h>
#include <linux/time64.h>
#include <termios.h>
#include <semaphore.h>
......
......@@ -26,6 +26,7 @@
#include <linux/list.h>
#include <linux/hash.h>
#include <linux/kernel.h>
static struct perf_session *session;
......
......@@ -22,6 +22,7 @@
#include "util/debug.h"
#include <linux/kernel.h>
#include <linux/log2.h>
#include <sys/prctl.h>
#include <sys/resource.h>
......
......@@ -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"
......
......@@ -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"
......
......@@ -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>
......
......@@ -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]";
......
......@@ -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"
......
......@@ -13,6 +13,7 @@
#include "color.h"
#include <subcmd/parse-options.h>
#include "symbol.h"
#include <linux/kernel.h>
static bool dont_fork;
......
......@@ -2,6 +2,7 @@
#include "debug.h"
#include "util.h"
#include "c++/clang-c.h"
#include <linux/kernel.h>
static struct {
int (*func)(void);
......
#include <linux/kernel.h>
#include <linux/types.h>
#include <stdlib.h>
#include <unistd.h>
......
#include <stdlib.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <sys/stat.h>
#include <fcntl.h>
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -9,6 +9,7 @@
#include "thread.h"
#include "parse-events.h"
#include "hists_common.h"
#include <linux/kernel.h>
struct sample {
u32 pid;
......
......@@ -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;
......
#include <linux/compiler.h>
#include <linux/kernel.h>
#include "tests.h"
#include "debug.h"
#include "util.h"
......
......@@ -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,
......
#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>
......
#include <linux/kernel.h>
#include <linux/types.h>
#include <stddef.h>
......
......@@ -2,6 +2,7 @@
#include "pmu.h"
#include "util.h"
#include "tests.h"
#include <linux/kernel.h>
/* Simulated format definitions. */
static struct test_format {
......
#include <stdbool.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include "util.h"
......
......@@ -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;
......
#include <errno.h>
#include <signal.h>
#include <stdbool.h>
#include <linux/kernel.h>
#ifdef HAVE_BACKTRACE_SUPPORT
#include <execinfo.h>
#endif
......
......@@ -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;
......
......@@ -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"
......
......@@ -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>
......
#include <asm/bug.h>
#include <linux/kernel.h>
#include <sys/time.h>
#include <sys/resource.h>
#include "symbol.h"
......
......@@ -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 */
......
#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>
......
#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>
......
......@@ -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"
......
......@@ -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"
......
......@@ -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>
......
......@@ -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";
......
......@@ -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>
......
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment