Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS

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>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
02b5ed8a 9a1e1065

+8
+1
tools/perf/builtin-annotate.c
··· 7 7 * a histogram of results, along various sorting keys. 8 8 */ 9 9 #include "builtin.h" 10 + #include "perf.h" 10 11 11 12 #include "util/color.h" 12 13 #include <linux/list.h>
+1
tools/perf/builtin-diff.c
··· 6 6 * DSOs and symbol information, sort them and produce a diff. 7 7 */ 8 8 #include "builtin.h" 9 + #include "perf.h" 9 10 10 11 #include "util/debug.h" 11 12 #include "util/event.h"
+1
tools/perf/builtin-kwork.c
··· 6 6 */ 7 7 8 8 #include "builtin.h" 9 + #include "perf.h" 9 10 10 11 #include "util/data.h" 11 12 #include "util/evlist.h"
+1
tools/perf/builtin-mem.c
··· 4 4 #include <sys/stat.h> 5 5 #include <unistd.h> 6 6 #include "builtin.h" 7 + #include "perf.h" 7 8 8 9 #include <subcmd/parse-options.h> 9 10 #include "util/auxtrace.h"
+1
tools/perf/builtin-sched.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include "builtin.h" 3 + #include "perf.h" 3 4 #include "perf-sys.h" 4 5 5 6 #include "util/cpumap.h"
+1
tools/perf/util/kwork.h
··· 1 1 #ifndef PERF_UTIL_KWORK_H 2 2 #define PERF_UTIL_KWORK_H 3 3 4 + #include "perf.h" 4 5 #include "util/tool.h" 5 6 #include "util/time-utils.h" 6 7
+1
tools/perf/util/session.c
··· 37 37 #include "arch/common.h" 38 38 #include "units.h" 39 39 #include "annotate.h" 40 + #include "perf.h" 40 41 #include <internal/lib.h> 41 42 42 43 static int perf_session__deliver_event(struct perf_session *session,
+1
tools/perf/util/svghelper.c
··· 21 21 #include <perf/cpumap.h> 22 22 23 23 #include "env.h" 24 + #include "perf.h" 24 25 #include "svghelper.h" 25 26 26 27 static u64 first_time, last_time;