perf tools: Add missing headers, mostly stdlib.h
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 215a0d305c5651928eb67c96bcedd0a6c297dfce Gitweb: https://git.kernel.org/tip/215a0d305c5651928eb67c96bcedd0a6c297dfce Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 4 Jul 2019 11:21:24 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 9 Jul 2019 10:13:22 -0300
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 <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/common.c | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 2 ++ tools/perf/arch/s390/util/header.c | 1 + tools/perf/builtin-config.c | 1 + tools/perf/builtin-help.c | 1 + tools/perf/tests/llvm.c | 1 + tools/perf/tests/sample-parsing.c | 1 + tools/perf/tests/vmlinux-kallsyms.c | 1 + tools/perf/ui/browser.h | 1 + tools/perf/ui/browsers/map.c | 1 + tools/perf/ui/tui/setup.c | 1 + tools/perf/ui/tui/util.c | 2 +- tools/perf/util/cputopo.c | 1 + tools/perf/util/db-export.c | 1 + tools/perf/util/debug.c | 1 + tools/perf/util/demangle-java.c | 3 ++- tools/perf/util/dwarf-aux.c | 2 +- tools/perf/util/env.c | 1 + tools/perf/util/parse-branch-options.c | 2 +- tools/perf/util/parse-regs-options.c | 8 ++++++-- tools/perf/util/strbuf.c | 1 + tools/perf/util/symbol-elf.c | 1 + tools/perf/util/symbol-minimal.c | 1 + tools/perf/util/target.c | 2 +- tools/perf/util/thread-stack.c | 1 + tools/perf/util/usage.c | 3 +++ 26 files changed, 35 insertions(+), 7 deletions(-)
tools/perf/arch/common.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> +#include <stdlib.h> #include "common.h" #include "../util/env.h" #include "../util/util.h"
tools/perf/arch/powerpc/util/perf_regs.c +2 -0
@@ -8,6 +8,8 @@#include "../../util/perf_regs.h" #include "../../util/debug.h" +#include <linux/kernel.h> +const struct sample_reg sample_reg_masks[] = {SMPL_REG (r0,PERF_REG_POWERPC_R0 ),SMPL_REG (r1,PERF_REG_POWERPC_R1 ),
tools/perf/arch/s390/util/header.c +1 -0
@@ -12,6 +12,7 @@#include <stdio.h> #include <string.h> #include <linux/ctype.h> +#include <linux/kernel.h> #include "../../util/header.h" #include "../../util/util.h"
tools/perf/builtin-config.c +1 -0
@@ -15,6 +15,7 @@#include "util/debug.h" #include "util/config.h" #include <linux/string.h> +#include <stdlib.h> static bool use_system_config, use_user_config;
tools/perf/builtin-help.c +1 -0
@@ -16,6 +16,7 @@#include <linux/kernel.h> #include <errno.h> #include <stdio.h> +#include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h>
tools/perf/tests/llvm.c +1 -0
@@ -1,5 +1,6 @@// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> +#include <stdlib.h> #include <bpf/libbpf.h> #include <util/llvm-utils.h> #include <util/cache.h>
tools/perf/tests/sample-parsing.c +1 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <stdbool.h> #include <inttypes.h> +#include <stdlib.h> #include <linux/bitops.h> #include <linux/kernel.h> #include <linux/types.h>
tools/perf/tests/vmlinux-kallsyms.c +1 -0
@@ -3,6 +3,7 @@#include <linux/rbtree.h> #include <inttypes.h> #include <string.h> +#include <stdlib.h> #include "map.h" #include "symbol.h" #include "util.h"
tools/perf/ui/browser.h +1 -0
@@ -4,6 +4,7 @@#include <linux/types.h> #include <stdarg.h> +#include <sys/types.h> #define HE_COLORSET_TOP 50#define HE_COLORSET_MEDIUM 51
tools/perf/ui/browsers/map.c +1 -0
@@ -2,6 +2,7 @@#include <elf.h> #include <inttypes.h> #include <sys/ttydefaults.h> +#include <stdlib.h> #include <string.h> #include <linux/bitops.h> #include "../../util/util.h"
tools/perf/ui/tui/setup.c +1 -0
@@ -2,6 +2,7 @@#include <errno.h> #include <signal.h> #include <stdbool.h> +#include <stdlib.h> #include <linux/kernel.h> #ifdef HAVE_BACKTRACE_SUPPORT #include <execinfo.h>
tools/perf/ui/tui/util.c +1 -1
@@ -1,8 +1,8 @@// SPDX-License-Identifier: GPL-2.0 -#include "../../util/util.h" #include <signal.h> #include <stdbool.h> #include <string.h> +#include <stdlib.h> #include <sys/ttydefaults.h> #include "../../util/cache.h"
tools/perf/util/cputopo.c +1 -0
@@ -2,6 +2,7 @@#include <sys/param.h> #include <sys/utsname.h> #include <inttypes.h> +#include <stdlib.h> #include <api/fs/fs.h> #include "cputopo.h"
tools/perf/util/db-export.c +1 -0
@@ -5,6 +5,7 @@*/ #include <errno.h> +#include <stdlib.h> #include "evsel.h" #include "machine.h"
tools/perf/util/debug.c +1 -0
@@ -7,6 +7,7 @@#include <string.h> #include <stdarg.h> #include <stdio.h> +#include <stdlib.h> #include <sys/wait.h> #include <api/debug.h> #include <linux/time64.h>
tools/perf/util/demangle-java.c +2 -1
@@ -1,14 +1,15 @@// SPDX-License-Identifier: GPL-2.0 #include <sys/types.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> -#include "util.h" #include "debug.h" #include "symbol.h" #include "demangle-java.h" #include <linux/ctype.h> +#include <linux/kernel.h> enum {MODE_PREFIX =0 ,
tools/perf/util/dwarf-aux.c +1 -1
@@ -6,7 +6,7 @@#include <errno.h> #include <inttypes.h> #include <stdbool.h> -#include "util.h" +#include <stdlib.h> #include "debug.h" #include "dwarf-aux.h" #include "string2.h"
tools/perf/util/env.c +1 -0
@@ -7,6 +7,7 @@#include <errno.h> #include <sys/utsname.h> #include <bpf/libbpf.h> +#include <stdlib.h> struct perf_env perf_env;
tools/perf/util/parse-branch-options.c +1 -1
@@ -1,9 +1,9 @@// SPDX-License-Identifier: GPL-2.0 #include "perf.h" -#include "util/util.h" #include "util/debug.h" #include <subcmd/parse-options.h> #include "util/parse-branch-options.h" +#include <stdlib.h> #define BRANCH_OPT (n, m) \ { .name = n, .mode = (m) }
tools/perf/util/parse-regs-options.c +6 -2
@@ -1,8 +1,12 @@// SPDX-License-Identifier: GPL-2.0 -#include "perf.h" -#include "util/util.h" +#include <stdbool.h> +#include <stdlib.h> +#include <stdint.h> +#include <string.h> +#include <stdio.h> #include "util/debug.h" #include <subcmd/parse-options.h> +#include "util/perf_regs.h" #include "util/parse-regs-options.h" static int
tools/perf/util/strbuf.c +1 -0
@@ -3,6 +3,7 @@#include "util.h" #include <linux/kernel.h> #include <errno.h> +#include <stdlib.h> /* * Used as the default ->buf value, so that people can always assume
tools/perf/util/symbol-elf.c +1 -0
@@ -2,6 +2,7 @@#include <fcntl.h> #include <stdio.h> #include <errno.h> +#include <stdlib.h> #include <string.h> #include <unistd.h> #include <inttypes.h>
tools/perf/util/symbol-minimal.c +1 -0
@@ -7,6 +7,7 @@#include <stdio.h> #include <fcntl.h> #include <string.h> +#include <stdlib.h> #include <byteswap.h> #include <sys/stat.h>
tools/perf/util/target.c +1 -1
@@ -10,9 +10,9 @@#include "debug.h" #include <pwd.h> +#include <stdlib.h> #include <string.h> -enum target_errno target__validate (struct target *target) {enum target_errno ret =TARGET_ERRNO__SUCCESS ;
tools/perf/util/thread-stack.c +1 -0
@@ -8,6 +8,7 @@#include <linux/list.h> #include <linux/log2.h> #include <errno.h> +#include <stdlib.h> #include "thread.h" #include "event.h" #include "machine.h"
tools/perf/util/usage.c +3 -0
@@ -9,6 +9,9 @@*/ #include "util.h" #include "debug.h" +#include <stdio.h> +#include <stdlib.h> +#include <linux/compiler.h> static __noreturn void usage_builtin (const char *err) {