]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
perf env: Remove needless cpumap.h header
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 10 Sep 2019 15:29:02 +0000 (16:29 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 20 Sep 2019 12:19:21 +0000 (09:19 -0300)
Only a 'struct perf_cmp_map' forward allocation is necessary, fix the
places that need the header but were getting it indirectly, by luck,
from env.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-3sj3n534zghxhk7ygzeaqlx9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
37 files changed:
tools/perf/arch/arm64/util/header.c
tools/perf/arch/x86/tests/perf-time-to-tsc.c
tools/perf/bench/epoll-ctl.c
tools/perf/bench/epoll-wait.c
tools/perf/bench/futex-hash.c
tools/perf/bench/futex-lock-pi.c
tools/perf/bench/futex-requeue.c
tools/perf/bench/futex-wake-parallel.c
tools/perf/bench/futex-wake.c
tools/perf/builtin-c2c.c
tools/perf/builtin-sched.c
tools/perf/tests/bitmap.c
tools/perf/tests/code-reading.c
tools/perf/tests/event_update.c
tools/perf/tests/keep-tracking.c
tools/perf/tests/mem2node.c
tools/perf/tests/mmap-basic.c
tools/perf/tests/openat-syscall-all-cpus.c
tools/perf/tests/switch-tracking.c
tools/perf/tests/task-exit.c
tools/perf/tests/topology.c
tools/perf/util/arm-spe.c
tools/perf/util/auxtrace.c
tools/perf/util/env.h
tools/perf/util/event.c
tools/perf/util/evsel.c
tools/perf/util/intel-bts.c
tools/perf/util/parse-events.c
tools/perf/util/pmu.c
tools/perf/util/python.c
tools/perf/util/record.c
tools/perf/util/s390-cpumsf.c
tools/perf/util/scripting-engines/trace-event-python.c
tools/perf/util/session.c
tools/perf/util/stat.c
tools/perf/util/svghelper.c
tools/perf/util/top.c

index e41defaaa2e686bebb5a6e3d5441e101de0459bd..a32e4b72a98f0f615fa6cc237e681e2ee0776441 100644 (file)
@@ -1,5 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <perf/cpumap.h>
+#include <internal/cpumap.h>
 #include <api/fs/fs.h>
 #include "debug.h"
 #include "header.h"
@@ -29,7 +31,7 @@ char *get_cpuid_str(struct perf_pmu *pmu)
 
        /* read midr from list of cpus mapped to this pmu */
        cpus = perf_cpu_map__get(pmu->cpus);
-       for (cpu = 0; cpu < cpus->nr; cpu++) {
+       for (cpu = 0; cpu < perf_cpu_map__nr(cpus); cpu++) {
                scnprintf(path, PATH_MAX, "%s/devices/system/cpu/cpu%d"MIDR,
                                sysfs, cpus->map[cpu]);
 
index eb3635941c2b905da1bf7e0e4b86b66d31e77d66..0a4570b340fa214c4778f195e8af6771dfaa210b 100644 (file)
@@ -15,7 +15,6 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "record.h"
 #include "tsc.h"
 #include "tests/tests.h"
index d1caa4a0a12a46dbdcc57fc3a216c079763ce15d..bb617e56884129ce83bf4f7db4f79fb0c7f1a95a 100644 (file)
 #include <sys/resource.h>
 #include <sys/epoll.h>
 #include <sys/eventfd.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 
 #include "../util/stat.h"
 #include <subcmd/parse-options.h>
 #include "bench.h"
-#include "cpumap.h"
 
 #include <err.h>
 
index f6b4472847d2713f8ae6cdcb56db36cea2867bf0..7af694437f4ead2adce1cb9079291bd2d134dfcc 100644 (file)
 #include <sys/epoll.h>
 #include <sys/eventfd.h>
 #include <sys/types.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 
 #include "../util/stat.h"
 #include <subcmd/parse-options.h>
 #include "bench.h"
-#include "cpumap.h"
 
 #include <err.h>
 
index 80e138904c66df5942c8a595bda9c7c756e93dc6..8ba0c3330a9a2af7a3483d2ad13e85d71350e046 100644 (file)
 #include <linux/kernel.h>
 #include <linux/zalloc.h>
 #include <sys/time.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 
 #include "../util/stat.h"
 #include <subcmd/parse-options.h>
 #include "bench.h"
 #include "futex.h"
-#include "cpumap.h"
 
 #include <err.h>
 
index c5d6d0abbaa9f7edc1bc6bc458f09de9ee7df9ff..d0cae8125423f69a76f2435c6c8ee01e926f69ea 100644 (file)
 #include <linux/kernel.h>
 #include <linux/zalloc.h>
 #include <errno.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 #include "bench.h"
 #include "futex.h"
-#include "cpumap.h"
 
 #include <err.h>
 #include <stdlib.h>
index 75d3418c1a8843ca52158db70dab92d7f76d4c90..a00a6891447ab3dcf3595f82b5526c6cea64ee7c 100644 (file)
 #include <linux/kernel.h>
 #include <linux/time64.h>
 #include <errno.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 #include "bench.h"
 #include "futex.h"
-#include "cpumap.h"
 
 #include <err.h>
 #include <stdlib.h>
index 163fe16c275a07eb210f58880543d8ab1e945a74..a053cf2b703974353ce0456e5c1e2a3a5b454259 100644 (file)
@@ -29,7 +29,8 @@ int bench_futex_wake_parallel(int argc __maybe_unused, const char **argv __maybe
 #include <linux/time64.h>
 #include <errno.h>
 #include "futex.h"
-#include "cpumap.h"
+#include <internal/cpumap.h>
+#include <perf/cpumap.h>
 
 #include <err.h>
 #include <stdlib.h>
index 77dcdc13618a601f5d48c58b519dda844e8ef138..df810096abfef9f9173818f8eaa052f3769d9a35 100644 (file)
 #include <linux/kernel.h>
 #include <linux/time64.h>
 #include <errno.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 #include "bench.h"
 #include "futex.h"
-#include "cpumap.h"
 
 #include <err.h>
 #include <stdlib.h>
index b09b12e0976b20fcc14fe829d6c328f54e22178e..61aaacc2aedd8f5c9054f5b15228c642ee379b1b 100644 (file)
@@ -20,6 +20,7 @@
 #include <sys/param.h>
 #include "debug.h"
 #include "builtin.h"
+#include <perf/cpumap.h>
 #include <subcmd/pager.h>
 #include <subcmd/parse-options.h>
 #include "map_symbol.h"
index ec96d64aec6995cbb484a77823b7e13f51a36a88..511e19a7aafa85850005480920c59a0bf86cb9eb 100644 (file)
@@ -3,6 +3,7 @@
 #include "perf.h"
 #include "perf-sys.h"
 
+#include "util/cpumap.h"
 #include "util/evlist.h"
 #include "util/evsel.h"
 #include "util/symbol.h"
@@ -36,6 +37,7 @@
 #include <pthread.h>
 #include <math.h>
 #include <api/fs/fs.h>
+#include <perf/cpumap.h>
 #include <linux/time64.h>
 
 #include <linux/ctype.h>
index db2aadff370898d849155144dfb8ec27f34da140..96c137360918fc90cac5cafe42f45c335d1f371f 100644 (file)
@@ -2,8 +2,8 @@
 #include <linux/compiler.h>
 #include <linux/bitmap.h>
 #include <perf/cpumap.h>
+#include <internal/cpumap.h>
 #include "tests.h"
-#include "cpumap.h"
 #include "debug.h"
 
 #define NBITS 100
index c1c29e08e7fb26738390043ab945963eaa4e69df..8d9020c46ca97698baec3f8c041e30a7d4dca8bd 100644 (file)
@@ -19,7 +19,6 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "machine.h"
 #include "map.h"
 #include "symbol.h"
index cac4290e233ac347980fbe4ed39db4a4fb905704..317eb8c5ccd49de132c18e2f8517cb2699dd6262 100644 (file)
@@ -2,6 +2,7 @@
 #include <linux/compiler.h>
 #include <perf/cpumap.h>
 #include <string.h>
+#include "cpumap.h"
 #include "evlist.h"
 #include "evsel.h"
 #include "header.h"
index 9f0762d987fa4c45897d2d8e88fabd133fd9d22e..df0fd5a44e04f43f3f1574fc5c2eccf6cd8ae197 100644 (file)
@@ -12,7 +12,6 @@
 #include "evsel.h"
 #include "record.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "tests.h"
 
 #define CHECK__(x) {                           \
@@ -143,7 +142,7 @@ int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_un
 
        found = find_comm(evlist, comm);
        if (found != 1) {
-               pr_debug("Seconf time, failed to find tracking event.\n");
+               pr_debug("Second time, failed to find tracking event.\n");
                goto out_err;
        }
 
index 7672ade70f201227a988b54a4f32908143fc5bc8..a258bd51f1a4134b970919f3ec351300b73039f7 100644 (file)
@@ -4,7 +4,7 @@
 #include <linux/kernel.h>
 #include <linux/zalloc.h>
 #include <perf/cpumap.h>
-#include "cpumap.h"
+#include <internal/cpumap.h>
 #include "debug.h"
 #include "env.h"
 #include "mem2node.h"
index 85e1d7337dc050c27e51fdbaeeb49f5bb23e3ccf..042757629e907191dd2f980d09205a723fdf8eaa 100644 (file)
@@ -10,7 +10,6 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "tests.h"
 #include <linux/err.h>
 #include <linux/kernel.h>
@@ -53,7 +52,7 @@ int test__basic_mmap(struct test *test __maybe_unused, int subtest __maybe_unuse
 
        cpus = perf_cpu_map__new(NULL);
        if (cpus == NULL) {
-               pr_debug("cpu_map__new\n");
+               pr_debug("perf_cpu_map__new\n");
                goto out_free_threads;
        }
 
index 9171f77cd9cdea57042f7635fef5afc86c7e4456..93c176523e385d8a97a837ab8bc76fcbda5479e1 100644 (file)
@@ -14,7 +14,8 @@
 #include "evsel.h"
 #include "tests.h"
 #include "thread_map.h"
-#include "cpumap.h"
+#include <perf/cpumap.h>
+#include <internal/cpumap.h>
 #include "debug.h"
 #include "stat.h"
 #include "util/counts.h"
@@ -37,7 +38,7 @@ int test__openat_syscall_event_on_all_cpus(struct test *test __maybe_unused, int
 
        cpus = perf_cpu_map__new(NULL);
        if (cpus == NULL) {
-               pr_debug("cpu_map__new\n");
+               pr_debug("perf_cpu_map__new\n");
                goto out_thread_map_delete;
        }
 
index 1a60fa1219f55e26291fa751c14de4fcfaf401db..3fb1ff7b8a2f8138bc4d48b45fb251bca6be0892 100644 (file)
@@ -14,7 +14,6 @@
 #include "evlist.h"
 #include "evsel.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "record.h"
 #include "tests.h"
 
index f610e8c0a0836231ca995dd1515f8a9fb4e01a66..088c7708b03a3abdc609d65f9b6294654d6892dc 100644 (file)
@@ -4,12 +4,12 @@
 #include "evsel.h"
 #include "target.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "tests.h"
 
 #include <errno.h>
 #include <signal.h>
 #include <linux/string.h>
+#include <perf/cpumap.h>
 #include <perf/evlist.h>
 
 static int exited;
index c963f301d15eb09227fc555df53b15b5174d391b..7d845d913d7d2363bc3cca6caca234fe66cbe715 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <perf/cpumap.h>
+#include "cpumap.h"
 #include "tests.h"
 #include "session.h"
 #include "evlist.h"
index 8a7340f6a2a2a242ecfa72e4bfb26d94d41a17c7..53be12b23ff406cc74d67e36f9f311e3b84f732b 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/log2.h>
 #include <linux/zalloc.h>
 
-#include "cpumap.h"
 #include "color.h"
 #include "evsel.h"
 #include "machine.h"
index 7ec0a6caa6cdd72f48794a175e73013b9820b1fe..1c0ff5acff8391b81fb9a6543d6abfba6f06e79f 100644 (file)
@@ -31,7 +31,6 @@
 #include "map.h"
 #include "pmu.h"
 #include "evsel.h"
-#include "cpumap.h"
 #include "symbol.h"
 #include "thread_map.h"
 #include "asm/bug.h"
index d8e083d426105d59880cc902e381d48833fb9682..db40906e29373e40804f6aa140610345afb75277 100644 (file)
@@ -4,9 +4,10 @@
 
 #include <linux/types.h>
 #include <linux/rbtree.h>
-#include "cpumap.h"
 #include "rwsem.h"
 
+struct perf_cpu_map;
+
 struct cpu_topology_map {
        int     socket_id;
        int     die_id;
index f4afbb858ebbe18f2383d5fb85df48907e76bf2c..d65ae7cf9316d6a8c2c7117bf4260511d2165f9a 100644 (file)
@@ -4,6 +4,7 @@
 #include <inttypes.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
+#include <perf/cpumap.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -11,6 +12,7 @@
 #include <api/fs/fs.h>
 #include <linux/perf_event.h>
 #include <linux/zalloc.h>
+#include "cpumap.h"
 #include "dso.h"
 #include "event.h"
 #include "debug.h"
index c194ec787f967487df7390a8aabc1de226792775..5b40b840624c184d6062e0170385319bff73bf1e 100644 (file)
@@ -31,7 +31,7 @@
 #include "event.h"
 #include "evsel.h"
 #include "evlist.h"
-#include "cpumap.h"
+#include <perf/cpumap.h>
 #include "thread_map.h"
 #include "target.h"
 #include "perf_regs.h"
index aacffa2b0362a20c0573a43d4aa94ddb36cf550d..15f87a09f4fe1ff4189f824c208ab8b16cce4203 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/log2.h>
 #include <linux/zalloc.h>
 
-#include "cpumap.h"
 #include "color.h"
 #include "evsel.h"
 #include "evlist.h"
index 5ec21d21113c9c19f79c1cb3b222a93ee4ec01a9..a33a1d5059a27ddf341aa496881a458ed9a78491 100644 (file)
@@ -30,7 +30,6 @@
 #include "parse-events-flex.h"
 #include "pmu.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "probe-file.h"
 #include "asm/bug.h"
 #include "util/parse-branch-options.h"
index fb597fa94234cbd7062e06e563eb35c99606303d..5608da82ad2398e88e27167f25eaa96ca8e489da 100644 (file)
@@ -20,7 +20,6 @@
 #include "debug.h"
 #include "pmu.h"
 #include "parse-events.h"
-#include "cpumap.h"
 #include "header.h"
 #include "pmu-events/pmu-events.h"
 #include "string2.h"
index 07ca4535e6f740726a31693fbd3919547d53a0cb..96dd3333c9110fcd792093db9801fe24e309053d 100644 (file)
@@ -11,7 +11,6 @@
 #include "callchain.h"
 #include "evsel.h"
 #include "event.h"
-#include "cpumap.h"
 #include "print_binary.h"
 #include "thread_map.h"
 #include "trace-event.h"
index 860c48895ab6b08d6d12eaca60a1c79c47fc3123..8a015fc0aba0a7893b73f84dc865c548356f86ed 100644 (file)
@@ -2,7 +2,6 @@
 #include "debug.h"
 #include "evlist.h"
 #include "evsel.h"
-#include "cpumap.h"
 #include "parse-events.h"
 #include <errno.h>
 #include <limits.h>
index 24a99909d8b3f81ce6e860596e2e63bb00fe20e5..6785cd87aa4db6dacaca94918bbda80f810f4377 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 
-#include "cpumap.h"
 #include "color.h"
 #include "evsel.h"
 #include "evlist.h"
index bb6828532741ad687cf0241ba15b95b62609bc7b..5d341efc3237d6d5f423b5a9adf8b930ded91a58 100644 (file)
@@ -48,7 +48,6 @@
 #include "map.h"
 #include "symbol.h"
 #include "thread_map.h"
-#include "cpumap.h"
 #include "print_binary.h"
 #include "stat.h"
 #include "mem-events.h"
index 2b133bc22caadd93ff2c94afdf7b0d48b22c2cd1..2b583e6adb493df54db8f7964b1f7d7a907bb1ae 100644 (file)
@@ -22,7 +22,6 @@
 #include "symbol.h"
 #include "session.h"
 #include "tool.h"
-#include "cpumap.h"
 #include "perf_regs.h"
 #include "asm/bug.h"
 #include "auxtrace.h"
index 8f1ea27f976f232acc19af0597e9ce291edf9617..d309c1cc13db3b2ec50d7dad71d98eee6176148b 100644 (file)
@@ -4,6 +4,7 @@
 #include <math.h>
 #include <string.h>
 #include "counts.h"
+#include "cpumap.h"
 #include "debug.h"
 #include "header.h"
 #include "stat.h"
index 582f4a69cd48dc3ede8bb99e2fbf8fa3915ef7e4..96f941e0168190f05ed76d4115aff098ddece16a 100644 (file)
 #include <linux/string.h>
 #include <linux/time64.h>
 #include <linux/zalloc.h>
+#include <internal/cpumap.h>
 #include <perf/cpumap.h>
 
 #include "env.h"
 #include "svghelper.h"
-#include "cpumap.h"
 
 static u64 first_time, last_time;
 static u64 turbo_frequency, max_freq;
index 51fb574998bb9a7d0fbe20fe5c77d34aee3174c4..ef96e3dd6902a701dd881ec4926143dd81b2600d 100644 (file)
@@ -5,7 +5,6 @@
  * Refactored from builtin-top.c, see that files for further copyright notes.
  */
 
-#include "cpumap.h"
 #include "event.h"
 #include "evlist.h"
 #include "evsel.h"