perf cpumap: Remove needless includes from cpumap.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 22 Aug 2019 13:48:31 +0000 (10:48 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 22 Aug 2019 20:16:57 +0000 (17:16 -0300)
The util/cpumap.h file doesn't use anything in refcount.h not in
debug.h, it needs just a forward reference to 'struct cpu_map_data',
that is defined in util/event.h and cpumap.h was getting indirectly via,
of all things, debug.h

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-mtjww98yptt4ppo6g2blavg5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/x86/util/header.c
tools/perf/tests/mem2node.c
tools/perf/util/cpumap.c
tools/perf/util/cpumap.h
tools/perf/util/cputopo.c
tools/perf/util/env.c
tools/perf/util/mem2node.c
tools/perf/util/pmu.c
tools/perf/util/svghelper.c

index af9a9f2600be44217b60762043503ce9185d2fa3..662ecf84a421b1d79273851eef806049c13fc2f4 100644 (file)
@@ -6,6 +6,7 @@
 #include <string.h>
 #include <regex.h>
 
+#include "../../util/debug.h"
 #include "../../util/header.h"
 
 static inline void
index 5ec193f7968ddbb089a8f84ce371a1ffb5947c4e..73b2855acaf4274c78ce6f2236eeaef35b63e0ea 100644 (file)
@@ -4,6 +4,7 @@
 #include <linux/zalloc.h>
 #include <perf/cpumap.h>
 #include "cpumap.h"
+#include "debug.h"
 #include "mem2node.h"
 #include "tests.h"
 
index 8e6c2cbffedce353333595ceb36f039193b5aa76..f5c21184e1fc9a39318aa3edc8ccc308e8d8057d 100644 (file)
@@ -2,6 +2,8 @@
 #include <api/fs/fs.h>
 #include "../perf.h"
 #include "cpumap.h"
+#include "debug.h"
+#include "event.h"
 #include <assert.h>
 #include <dirent.h>
 #include <stdio.h>
index 8dbedda7af45788b337e390a686938d05954ec2d..d0c5bbfd91af80227ef38734bff794446571f8fc 100644 (file)
@@ -4,12 +4,12 @@
 
 #include <stdio.h>
 #include <stdbool.h>
-#include <linux/refcount.h>
 #include <internal/cpumap.h>
 #include <perf/cpumap.h>
 
 #include "perf.h"
-#include "util/debug.h"
+
+struct cpu_map_data;
 
 struct perf_cpu_map *perf_cpu_map__empty_new(int nr);
 struct perf_cpu_map *cpu_map__new_data(struct cpu_map_data *data);
index 4f70155eaf83be67033f85511b0f7f3bf0de388d..1b52402a892307d9bb32188580f4e84faf938fb2 100644 (file)
@@ -3,12 +3,14 @@
 #include <sys/utsname.h>
 #include <inttypes.h>
 #include <stdlib.h>
+#include <string.h>
 #include <api/fs/fs.h>
 #include <linux/zalloc.h>
 #include <perf/cpumap.h>
 
 #include "cputopo.h"
 #include "cpumap.h"
+#include "debug.h"
 #include "env.h"
 
 #define CORE_SIB_FMT \
index d77912b2b5e725ab64de2634794eed82a9908cb0..571efb4f03513b4ee81b70bad077787dfcda19a5 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "cpumap.h"
+#include "debug.h"
 #include "env.h"
 #include <linux/ctype.h>
 #include <linux/zalloc.h>
index cacc2fc4dcbd7699977da5a23e89f2d4a0d8dad8..14fb9e72aeeb4c14e9a14e43985a0e2439b4015a 100644 (file)
@@ -2,6 +2,7 @@
 #include <inttypes.h>
 #include <linux/bitmap.h>
 #include <linux/zalloc.h>
+#include "debug.h"
 #include "mem2node.h"
 
 struct phys_entry {
index b7da21a7d6278f6b2843d3472a172f3b62860206..9807be6f09bb381bb0aaec6382f98e40208cd87e 100644 (file)
@@ -16,6 +16,7 @@
 #include <locale.h>
 #include <regex.h>
 #include <perf/cpumap.h>
+#include "debug.h"
 #include "pmu.h"
 #include "parse-events.h"
 #include "cpumap.h"
index ae6a534a7a8087114e031494f3635a40b92577eb..bbdd8716328513ef29da44aa0735db3b22445331 100644 (file)
@@ -14,6 +14,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <linux/bitmap.h>
+#include <linux/string.h>
 #include <linux/time64.h>
 #include <linux/zalloc.h>
 #include <perf/cpumap.h>