perf event: Remove needless include directives from event.h
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 4cb3c6d546aa5493a960d05eb73bad8e69a58574 Gitweb: https://git.kernel.org/tip/4cb3c6d546aa5493a960d05eb73bad8e69a58574 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 29 Aug 2019 17:19:02 -03:00 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Sat, 31 Aug 2019 22:19:24 -03:00
perf event: Remove needless include directives from event.h
bpf.h and build-id.h are not needed at all in event.h, remove them.
And fixup the fallout of files that were getting needed stuff from this now pruned include.
Cc Adrian Hunter <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/powerpc/util/unwind-libdw.c | 1 + tools/perf/arch/x86/util/perf_regs.c | 1 + tools/perf/perf.c | 1 + tools/perf/util/bpf-event.h | 1 + tools/perf/util/callchain.h | 1 + tools/perf/util/config.c | 2 ++ tools/perf/util/debug.c | 1 + tools/perf/util/event.h | 18 ++++++++++++------ 8 files changed, 20 insertions(+), 6 deletions(-)
tools/perf/arch/powerpc/util/unwind-libdw.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <elfutils/libdwfl.h> +#include <linux/kernel.h> #include "../../util/unwind-libdw.h" #include "../../util/perf_regs.h" #include "../../util/event.h"
tools/perf/arch/x86/util/perf_regs.c +1 -0
@@ -2,6 +2,7 @@#include <errno.h> #include <string.h> #include <regex.h> +#include <linux/kernel.h> #include <linux/zalloc.h> #include "../../perf-sys.h"
tools/perf/perf.c +1 -0
@@ -10,6 +10,7 @@#include "builtin.h" #include "perf.h" +#include "util/build-id.h" #include "util/cache.h" #include "util/env.h" #include <subcmd/exec-cmd.h>
tools/perf/util/bpf-event.h +1 -0
@@ -13,6 +13,7 @@ struct machine;union perf_event ;struct perf_env ;struct perf_sample ; +struct perf_session ;struct record_opts ;struct evlist ;struct target ;
tools/perf/util/callchain.h +1 -0
@@ -8,6 +8,7 @@#include "map_symbol.h" #include "branch.h" +struct evsel ;struct map ;#define HELP_PAD "\t\t\t\t"
tools/perf/util/config.c +2 -0
@@ -17,6 +17,8 @@#include "util/event.h" /* proc_map_timeout */ #include "util/hist.h" /* perf_hist_config */ #include "util/llvm-utils.h" /* perf_llvm_config */ +#include "build-id.h" +#include "debug.h" #include "config.h" #include "debug.h" #include <sys/types.h>
tools/perf/util/debug.c +1 -0
@@ -8,6 +8,7 @@#include <stdlib.h> #include <sys/wait.h> #include <api/debug.h> +#include <linux/kernel.h> #include <linux/time64.h> #ifdef HAVE_BACKTRACE_SUPPORT #include <execinfo.h>
tools/perf/util/event.h +12 -6
@@ -1,17 +1,23 @@/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __PERF_RECORD_H#define __PERF_RECORD_H - -#include <limits.h> +/* +* The linux/stddef.h isn't need here, but is needed for __always_inline used +* in files included from uapi/linux/perf_event.h such as +* /usr/include/linux/swab.h and /usr/include/linux/byteorder/little_endian.h, +* detected in at least musl libc, used in Alpine Linux. -acme +*/ #include <stdio.h> -#include <linux/kernel.h> -#include <linux/bpf.h> -#include <linux/perf_event.h> +#include <linux/stddef.h> #include <perf/event.h> +#include <linux/types.h> -#include "build-id.h" #include "perf_regs.h" +struct dso ; +struct machine ; +struct perf_event_attr ; +#ifdef __LP64__/* * /usr/include/inttypes.h uses just 'lu' for PRIu64, but we end up defining