aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-08-22 10:48:31 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-08-22 17:16:57 -0300
commit5e51b0bb245d963f5ce750256c504be95201e38c (patch)
treebc8288220aa4a17951429ce2ae39577c43a9a0d4 /tools/perf/util
parentperf evsel: Switch to libperf's cpumap.h (diff)
downloadlinux-dev-5e51b0bb245d963f5ce750256c504be95201e38c.tar.xz
linux-dev-5e51b0bb245d963f5ce750256c504be95201e38c.zip
perf cpumap: Remove needless includes from cpumap.h
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>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/cpumap.c2
-rw-r--r--tools/perf/util/cpumap.h4
-rw-r--r--tools/perf/util/cputopo.c2
-rw-r--r--tools/perf/util/env.c1
-rw-r--r--tools/perf/util/mem2node.c1
-rw-r--r--tools/perf/util/pmu.c1
-rw-r--r--tools/perf/util/svghelper.c1
7 files changed, 10 insertions, 2 deletions
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 8e6c2cbffedc..f5c21184e1fc 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -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>
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h
index 8dbedda7af45..d0c5bbfd91af 100644
--- a/tools/perf/util/cpumap.h
+++ b/tools/perf/util/cpumap.h
@@ -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);
diff --git a/tools/perf/util/cputopo.c b/tools/perf/util/cputopo.c
index 4f70155eaf83..1b52402a8923 100644
--- a/tools/perf/util/cputopo.c
+++ b/tools/perf/util/cputopo.c
@@ -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 \
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index d77912b2b5e7..571efb4f0351 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -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>
diff --git a/tools/perf/util/mem2node.c b/tools/perf/util/mem2node.c
index cacc2fc4dcbd..14fb9e72aeeb 100644
--- a/tools/perf/util/mem2node.c
+++ b/tools/perf/util/mem2node.c
@@ -2,6 +2,7 @@
#include <inttypes.h>
#include <linux/bitmap.h>
#include <linux/zalloc.h>
+#include "debug.h"
#include "mem2node.h"
struct phys_entry {
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index b7da21a7d627..9807be6f09bb 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -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"
diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c
index ae6a534a7a80..bbdd87163285 100644
--- a/tools/perf/util/svghelper.c
+++ b/tools/perf/util/svghelper.c
@@ -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>