Skip to content

Commit b6b5574

Browse files
committed
perf env: Remove env.h from other headers where just a fwd decl is needed
And fixup the fallout of c files not building due to now missing headers. 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-sw8k3kpla98pr3rqypbjk9hf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 8520a98 commit b6b5574

5 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎tools/perf/arch/common.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
#ifndef ARCH_PERF_COMMON_H
33
#define ARCH_PERF_COMMON_H
44

5-
#include "../util/env.h"
5+
#include <stdbool.h>
6+
7+
struct perf_env;
68

79
int perf_env__lookup_objdump(struct perf_env *env, const char **path);
810
bool perf_env__single_address_space(struct perf_env *env);

‎tools/perf/tests/mem2node.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/compiler.h>
33
#include <linux/bitmap.h>
4+
#include <linux/kernel.h>
45
#include <linux/zalloc.h>
56
#include <perf/cpumap.h>
67
#include "cpumap.h"
78
#include "debug.h"
9+
#include "env.h"
810
#include "mem2node.h"
911
#include "tests.h"
1012

‎tools/perf/util/cputopo.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#define __PERF_CPUTOPO_H
44

55
#include <linux/types.h>
6-
#include "env.h"
76

87
struct cpu_topology {
98
u32 core_sib;

‎tools/perf/util/mem2node.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#include <errno.h>
22
#include <inttypes.h>
33
#include <linux/bitmap.h>
4+
#include <linux/kernel.h>
45
#include <linux/zalloc.h>
56
#include "debug.h"
7+
#include "env.h"
68
#include "mem2node.h"
79

810
struct phys_entry {

‎tools/perf/util/mem2node.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#define __MEM2NODE_H
33

44
#include <linux/rbtree.h>
5-
#include "env.h"
5+
#include <linux/types.h>
66

7+
struct perf_env;
78
struct phys_entry;
89

910
struct mem2node {

0 commit comments

Comments
 (0)