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>
This commit is contained in:
Ian Rogers 2024-12-05 20:40:29 -08:00 committed by Arnaldo Carvalho de Melo
parent 9a1e106550
commit 02b5ed8a6a
8 changed files with 8 additions and 0 deletions

View 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>

View 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"

View File

@ -6,6 +6,7 @@
*/
#include "builtin.h"
#include "perf.h"
#include "util/data.h"
#include "util/evlist.h"

View 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"

View 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"

View 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"

View 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,

View File

@ -21,6 +21,7 @@
#include <perf/cpumap.h>
#include "env.h"
#include "perf.h"
#include "svghelper.h"
static u64 first_time, last_time;