]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf tools: Add missing headers, mostly stdlib.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 4 Jul 2019 14:21:24 +0000 (11:21 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jul 2019 13:13:22 +0000 (10:13 -0300)
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>
26 files changed:
tools/perf/arch/common.c
tools/perf/arch/powerpc/util/perf_regs.c
tools/perf/arch/s390/util/header.c
tools/perf/builtin-config.c
tools/perf/builtin-help.c
tools/perf/tests/llvm.c
tools/perf/tests/sample-parsing.c
tools/perf/tests/vmlinux-kallsyms.c
tools/perf/ui/browser.h
tools/perf/ui/browsers/map.c
tools/perf/ui/tui/setup.c
tools/perf/ui/tui/util.c
tools/perf/util/cputopo.c
tools/perf/util/db-export.c
tools/perf/util/debug.c
tools/perf/util/demangle-java.c
tools/perf/util/dwarf-aux.c
tools/perf/util/env.c
tools/perf/util/parse-branch-options.c
tools/perf/util/parse-regs-options.c
tools/perf/util/strbuf.c
tools/perf/util/symbol-elf.c
tools/perf/util/symbol-minimal.c
tools/perf/util/target.c
tools/perf/util/thread-stack.c
tools/perf/util/usage.c

index f3824ca7c20b29ad6542bece5901d52e891686e0..1bc329412bcffa7ce84041498989e94161535ddb 100644 (file)
@@ -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"
index 34d5134681d96c9716ed1937f835a3b125d6dfa5..64f65c296d3e15416ddc61ba1a903efba4a547ef 100644 (file)
@@ -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),
index a25896135abe8554321fe6d3f93011344cadf5c1..165c51435e72e865d59ff0a57b18c64f1b01e4ce 100644 (file)
@@ -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"
index d76f831f94c780adc49ce5e750c0b92a26aae73b..6c1284c87aaa35cf051c6bf9a20eeedbd982993f 100644 (file)
@@ -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;
 
index 3d29d0524a895e6bfdf28cbfb5fde8a3cfb620b5..6a1cab547043713f260c179dffb62d698bd51acc 100644 (file)
@@ -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>
index a039f93199e56cfb57ae04f37fd4fae7db03c1fd..ca5a5f94ce79a0665db4da36fde34c2bd30c1cee 100644 (file)
@@ -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>
index 236ce0d6c8262d2ae236805ebe51bb7e936085c6..361714e2583c79db81c1217f410ed826af9c0ecc 100644 (file)
@@ -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>
index f101576d1c728527cc201e416c10ad48ececa206..5e8834fc7dec5ca684ffc73791937643b80710b0 100644 (file)
@@ -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"
index aa5932e1d62e9420a8fc77b610a69f0f94383e69..dc14441366581b288142d777363a3f7d0e32ab37 100644 (file)
@@ -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
index 5f6529c9eb8e9f43ca773abc4d5a14a9e3729f6e..4c545b92e20dc342dc80b2c2006dddfbe3cde8cc 100644 (file)
@@ -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"
index d4ac41679721bf5168539bc09fa8d1f55772b016..3ad0d3363ac6ca70e2954e9bab7122b2faefcad4 100644 (file)
@@ -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>
index b9794d6185afb5dddecce00015938979e52281dd..fe5e571816fc90cbd75d516ce3eb6cfc46907d56 100644 (file)
@@ -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"
index 26e73a4bd4fe9efe1510d9a6e0e59e942a51b74e..d3b2bd258b9e7aff416561998048b8d26bdb07bd 100644 (file)
@@ -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"
index 2182f552aac6523bd50c90cfd933c81e51179b48..4cdd1f579156a75c0b84c1e60c2ea7bda8bb9553 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <errno.h>
+#include <stdlib.h>
 
 #include "evsel.h"
 #include "machine.h"
index 3cc578343f48894ef0da8c7f640796ff622a6c51..3780fe42453b7537affd07d1b59e4126500b06fb 100644 (file)
@@ -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>
index 5b4900d67c80075f4d1e913570b01a5be030633f..763328c151e9df9eb7765f0bc8538a7d19fc400e 100644 (file)
@@ -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,
index 218bfea8f8a8e756eb057235559a5e6772ce9a3e..03b2de1f5a358d2080524155e4e7e5b9058ea783 100644 (file)
@@ -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"
index 22eee8942527a27e52adef024b1c3dc0ba752f69..7d317d49d2077bde7012cdbac9c0e9aa3b4d1f93 100644 (file)
@@ -7,6 +7,7 @@
 #include <errno.h>
 #include <sys/utsname.h>
 #include <bpf/libbpf.h>
+#include <stdlib.h>
 
 struct perf_env perf_env;
 
index bd779d9f4d1eab5aae77814117fdd8ca7ea1220c..726e8d9e8c54a6d879a7791b869e639660df2ff7 100644 (file)
@@ -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) }
index 08581e2762251144af2d0e96985ec76affcb9ec6..ef46c284880854de3574120e37a99b638242c998 100644 (file)
@@ -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
index 23092fd6451dfe0a43b469b6502f03b1393cd0e2..54336df089df44db92c363a8d10ef05b2aa92f90 100644 (file)
@@ -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
index 62008756d8ccf8e9d73a2f79c9e583a746aa5ad0..429920978cb0c1fbbdf5c844a00a2bf1bdcf7f54 100644 (file)
@@ -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>
index 17edbd4f6f855a475f3b073e057f04f8a88f16ce..c8b7cadbc9c455fc81be83907c5d1953e470cee8 100644 (file)
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <string.h>
+#include <stdlib.h>
 #include <byteswap.h>
 #include <sys/stat.h>
 
index 3852d07c49bdf7bc9ddff26cb20957b9b214263f..3adc6548034971bd45e276a558560213306b5b93 100644 (file)
@@ -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;
index 6ff1ff4d4ce7fe6aa69b8fa789bb1a2a0eac71f5..48d585a0175cc106b63a1498d24e18d46d8a4c58 100644 (file)
@@ -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"
index 070d25ceea6a92ad2092f6710d5d50a29a279e64..3949a60b00aeba296d0a15ebf7c9e95c2f75bebf 100644 (file)
@@ -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)
 {