]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
perf event: Remove needless include directives from event.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Aug 2019 20:19:02 +0000 (17:19 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 1 Sep 2019 01:19:24 +0000 (22:19 -0300)
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 <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-rdm3dgtlrndmmnlc4bafsg3b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/powerpc/util/unwind-libdw.c
tools/perf/arch/x86/util/perf_regs.c
tools/perf/perf.c
tools/perf/util/bpf-event.h
tools/perf/util/callchain.h
tools/perf/util/config.c
tools/perf/util/debug.c
tools/perf/util/event.h

index 7a1f05ef2fc031d5b77268b48b2e3c85ff0ebd48..abf2dbc7f829a966fc0471eb548d47967c4908ad 100644 (file)
@@ -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"
index 99ea60211e16687a822146cceeed7c38eed5cfb1..c218b83e063b52510697a41c047b328d1e17f36f 100644 (file)
@@ -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"
index e0910637a82d8ad164368d08e1895a98e11bdee5..8763b2c0fbfd6e825eec084cea24c8b5f80f6dd6 100644 (file)
@@ -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>
index 417b78835ea09858b34a4f34a900e6f5a0ea9623..a01c2fd68c03b0619d6e3ca42b0562595529eab0 100644 (file)
@@ -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;
index 45b9ed49e2b1db4bc4deb6286348056acb0baef3..b042ceef411436f0cd82f1461540c38f0458b45d 100644 (file)
@@ -8,6 +8,7 @@
 #include "map_symbol.h"
 #include "branch.h"
 
+struct evsel;
 struct map;
 
 #define HELP_PAD "\t\t\t\t"
index eb5308c41ed1983ebf14de4630ee37b507e6e4be..7ebf9e31ae2275817effff80f6f5a0d6a31962de 100644 (file)
@@ -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>
index 522887ee4c025237c2000c586160a2164f9b702e..143d379d4608a168a5f466f6103925245639740e 100644 (file)
@@ -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>
index f56d268f06e30ce12ceb4da5e8d7d10afeb0174d..006aa432be191fbce9da20b13f4da22ded893faf 100644 (file)
@@ -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