Skip to content

Commit 891d2ee

Browse files
committed
perf cpumap: Reduce transitive dependencies on libperf MAX_NR_CPUS
JIRA: https://issues.redhat.com/browse/RHEL-73893 upstream ======== commit 02b5ed8 Author: Ian Rogers <irogers@google.com> Date: Thu Dec 5 20:40:29 2024 -0800 description =========== 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> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent a68652d commit 891d2ee

File tree

8 files changed

+8
-0
lines changed

8 files changed

+8
-0
lines changed

tools/perf/builtin-annotate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* a histogram of results, along various sorting keys.
88
*/
99
#include "builtin.h"
10+
#include "perf.h"
1011

1112
#include "util/color.h"
1213
#include <linux/list.h>

tools/perf/builtin-diff.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* DSOs and symbol information, sort them and produce a diff.
77
*/
88
#include "builtin.h"
9+
#include "perf.h"
910

1011
#include "util/debug.h"
1112
#include "util/event.h"

tools/perf/builtin-kwork.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#include "builtin.h"
9+
#include "perf.h"
910

1011
#include "util/data.h"
1112
#include "util/evlist.h"

tools/perf/builtin-mem.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <sys/stat.h>
55
#include <unistd.h>
66
#include "builtin.h"
7+
#include "perf.h"
78

89
#include <subcmd/parse-options.h>
910
#include "util/auxtrace.h"

tools/perf/builtin-sched.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include "builtin.h"
3+
#include "perf.h"
34
#include "perf-sys.h"
45

56
#include "util/cpumap.h"

tools/perf/util/kwork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef PERF_UTIL_KWORK_H
22
#define PERF_UTIL_KWORK_H
33

4+
#include "perf.h"
45
#include "util/tool.h"
56
#include "util/time-utils.h"
67

tools/perf/util/session.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "arch/common.h"
3838
#include "units.h"
3939
#include "annotate.h"
40+
#include "perf.h"
4041
#include <internal/lib.h>
4142

4243
static int perf_session__deliver_event(struct perf_session *session,

tools/perf/util/svghelper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <perf/cpumap.h>
2222

2323
#include "env.h"
24+
#include "perf.h"
2425
#include "svghelper.h"
2526

2627
static u64 first_time, last_time;

0 commit comments

Comments
 (0)