Skip to content

Commit 8520a98

Browse files
committed
perf debug: Remove needless include directives from debug.h
All we need there is a forward declaration for 'union perf_event', so remove it from there and add missing header directives in places using things from this indirect include. 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-7ftk0ztstqub1tirjj8o8xbl@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent b420902 commit 8520a98

75 files changed

Lines changed: 104 additions & 6 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎tools/perf/arch/arm/util/cs-etm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/coresight-pmu.h>
1212
#include <linux/kernel.h>
1313
#include <linux/log2.h>
14+
#include <linux/string.h>
1415
#include <linux/types.h>
1516
#include <linux/zalloc.h>
1617

‎tools/perf/arch/common.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// SPDX-License-Identifier: GPL-2.0
2+
#include <limits.h>
23
#include <stdio.h>
34
#include <stdlib.h>
5+
#include <string.h>
46
#include <unistd.h>
57
#include "common.h"
68
#include "../util/env.h"

‎tools/perf/arch/x86/tests/bp-modify.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <unistd.h>
88
#include <stdio.h>
99
#include <stdlib.h>
10+
#include <string.h>
1011
#include <sys/ptrace.h>
1112
#include <asm/ptrace.h>
1213
#include <errno.h>

‎tools/perf/arch/x86/tests/insn-x86.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 <linux/types.h>
3+
#include <string.h>
34

45
#include "debug.h"
56
#include "tests/tests.h"

‎tools/perf/arch/x86/tests/rdpmc.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
#include <sys/mman.h>
77
#include <sys/types.h>
88
#include <sys/wait.h>
9+
#include <linux/string.h>
910
#include <linux/types.h>
1011
#include "perf-sys.h"
1112
#include "debug.h"
1213
#include "tests/tests.h"
1314
#include "cloexec.h"
15+
#include "event.h"
1416
#include "util.h"
1517
#include "arch-tests.h"
1618

‎tools/perf/arch/x86/util/perf_regs.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "../../perf-sys.h"
88
#include "../../util/perf_regs.h"
99
#include "../../util/debug.h"
10+
#include "../../util/event.h"
1011

1112
const struct sample_reg sample_reg_masks[] = {
1213
SMPL_REG(AX, PERF_REG_X86_AX),

‎tools/perf/builtin-c2c.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <sys/param.h>
2121
#include "debug.h"
2222
#include "builtin.h"
23+
#include <subcmd/pager.h>
2324
#include <subcmd/parse-options.h>
2425
#include "mem-events.h"
2526
#include "session.h"
@@ -35,6 +36,7 @@
3536
#include "thread.h"
3637
#include "mem2node.h"
3738
#include "symbol.h"
39+
#include "ui/ui.h"
3840
#include "../perf.h"
3941

4042
struct c2c_hists {

‎tools/perf/builtin-config.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "util/debug.h"
1414
#include "util/config.h"
1515
#include <linux/string.h>
16+
#include <stdio.h>
1617
#include <stdlib.h>
1718

1819
static bool use_system_config, use_user_config;

‎tools/perf/builtin-data.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <linux/compiler.h>
3+
#include <stdio.h>
4+
#include <string.h>
35
#include "builtin.h"
46
#include "perf.h"
57
#include "debug.h"

‎tools/perf/builtin-diff.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "util/annotate.h"
2525
#include "util/map.h"
2626
#include <linux/zalloc.h>
27+
#include <subcmd/pager.h>
2728
#include <subcmd/parse-options.h>
2829

2930
#include <errno.h>

0 commit comments

Comments
 (0)