Skip to content

Commit 215a0d3

Browse files
committed
perf tools: Add missing headers, mostly stdlib.h
Part of the erosion of util/util.h, that will lose its include stdlib.h, we need to add it to places where it is needed but was getting it indirectly. 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-1imnqezw99ahc07fjeb51qby@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent fc50e0b commit 215a0d3

26 files changed

Lines changed: 35 additions & 7 deletions

‎tools/perf/arch/common.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 <stdio.h>
3+
#include <stdlib.h>
34
#include "common.h"
45
#include "../util/env.h"
56
#include "../util/util.h"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "../../util/perf_regs.h"
99
#include "../../util/debug.h"
1010

11+
#include <linux/kernel.h>
12+
1113
const struct sample_reg sample_reg_masks[] = {
1214
SMPL_REG(r0, PERF_REG_POWERPC_R0),
1315
SMPL_REG(r1, PERF_REG_POWERPC_R1),

‎tools/perf/arch/s390/util/header.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <stdio.h>
1313
#include <string.h>
1414
#include <linux/ctype.h>
15+
#include <linux/kernel.h>
1516

1617
#include "../../util/header.h"
1718
#include "../../util/util.h"

‎tools/perf/builtin-config.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "util/debug.h"
1616
#include "util/config.h"
1717
#include <linux/string.h>
18+
#include <stdlib.h>
1819

1920
static bool use_system_config, use_user_config;
2021

‎tools/perf/builtin-help.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/kernel.h>
1717
#include <errno.h>
1818
#include <stdio.h>
19+
#include <stdlib.h>
1920
#include <sys/types.h>
2021
#include <sys/stat.h>
2122
#include <unistd.h>

‎tools/perf/tests/llvm.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 <stdio.h>
3+
#include <stdlib.h>
34
#include <bpf/libbpf.h>
45
#include <util/llvm-utils.h>
56
#include <util/cache.h>

‎tools/perf/tests/sample-parsing.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <stdbool.h>
33
#include <inttypes.h>
4+
#include <stdlib.h>
45
#include <linux/bitops.h>
56
#include <linux/kernel.h>
67
#include <linux/types.h>

‎tools/perf/tests/vmlinux-kallsyms.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <linux/rbtree.h>
44
#include <inttypes.h>
55
#include <string.h>
6+
#include <stdlib.h>
67
#include "map.h"
78
#include "symbol.h"
89
#include "util.h"

‎tools/perf/ui/browser.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <linux/types.h>
66
#include <stdarg.h>
7+
#include <sys/types.h>
78

89
#define HE_COLORSET_TOP 50
910
#define HE_COLORSET_MEDIUM 51

‎tools/perf/ui/browsers/map.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <elf.h>
33
#include <inttypes.h>
44
#include <sys/ttydefaults.h>
5+
#include <stdlib.h>
56
#include <string.h>
67
#include <linux/bitops.h>
78
#include "../../util/util.h"

0 commit comments

Comments
 (0)