]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS
authorIan Rogers <irogers@google.com>
Fri, 6 Dec 2024 04:40:29 +0000 (20:40 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 9 Dec 2024 20:52:41 +0000 (17:52 -0300)
libperf exposes MAX_NR_CPUS via tools/lib/perf/include/internal/cpumap.h
which is internal.

The preferred dependency should be the definition in tools/perf/perf.h.

Add the includes of perf.h so that MAX_NR_CPUS can be hidden in libperf.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ben Gainey <ben.gainey@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Kyle Meyer <kyle.meyer@hpe.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20241206044035.1062032-3-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-annotate.c
tools/perf/builtin-diff.c
tools/perf/builtin-kwork.c
tools/perf/builtin-mem.c
tools/perf/builtin-sched.c
tools/perf/util/kwork.h
tools/perf/util/session.c
tools/perf/util/svghelper.c

index bb87e6e7687dc12feffef9960a2b115ec755eb9d..836ae0122dabd0eae970f8dce38f87a88ccfe29b 100644 (file)
@@ -7,6 +7,7 @@
  * a histogram of results, along various sorting keys.
  */
 #include "builtin.h"
+#include "perf.h"
 
 #include "util/color.h"
 #include <linux/list.h>
index 82fb7773e03e62eadeb9f596446e3e34c11db040..196969538e58cc0e3ccfd5bafe2822928358d617 100644 (file)
@@ -6,6 +6,7 @@
  * DSOs and symbol information, sort them and produce a diff.
  */
 #include "builtin.h"
+#include "perf.h"
 
 #include "util/debug.h"
 #include "util/event.h"
index 8234410cba4c88b3f9596cfea7b3a70b78cf9b43..233ca3c3895c8b7d2858e31c4288dddfbd0296d8 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "builtin.h"
+#include "perf.h"
 
 #include "util/data.h"
 #include "util/evlist.h"
index 651188c1d825984201f00a801d75413adced6927..99d5e1491a288a987646148094177ba6bf04c1c5 100644 (file)
@@ -4,6 +4,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include "builtin.h"
+#include "perf.h"
 
 #include <subcmd/parse-options.h>
 #include "util/auxtrace.h"
index 7049c60ebf77c6b121ada6d05c2cb84459864487..26ece6e9bfd167b3bc9357cfe8048af9b1c372e5 100644 (file)
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #include "builtin.h"
+#include "perf.h"
 #include "perf-sys.h"
 
 #include "util/cpumap.h"
index 76fe2a821bcfd70c7afc2ff93249179fb60e7038..596595946a060c38e7f75f79529c84a3a0d00de4 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef PERF_UTIL_KWORK_H
 #define PERF_UTIL_KWORK_H
 
+#include "perf.h"
 #include "util/tool.h"
 #include "util/time-utils.h"
 
index 507e6cba95458c7de8e0f037b9ef50d9ec4544b2..c06e3020a976959c7c0f29ea7ac0cfd3c8216892 100644 (file)
@@ -37,6 +37,7 @@
 #include "arch/common.h"
 #include "units.h"
 #include "annotate.h"
+#include "perf.h"
 #include <internal/lib.h>
 
 static int perf_session__deliver_event(struct perf_session *session,
index 2b04f47f4db0f04866bfd7c6b09b13bd75fd02e9..b1d259f590e9859d3a0a187e75f0a59c5777d094 100644 (file)
@@ -21,6 +21,7 @@
 #include <perf/cpumap.h>
 
 #include "env.h"
+#include "perf.h"
 #include "svghelper.h"
 
 static u64 first_time, last_time;