diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-04 11:21:24 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-07-09 10:13:22 -0300 |
commit | 215a0d305c5651928eb67c96bcedd0a6c297dfce (patch) | |
tree | ce435a95163b78acc5290ed272311fe261cd240c /tools/perf/util | |
parent | fc50e0ba9bcac92ff177ff3ac64644108b6d8dd8 (diff) | |
download | linux-stable-215a0d305c5651928eb67c96bcedd0a6c297dfce.tar.gz linux-stable-215a0d305c5651928eb67c96bcedd0a6c297dfce.tar.bz2 linux-stable-215a0d305c5651928eb67c96bcedd0a6c297dfce.zip |
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>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/cputopo.c | 1 | ||||
-rw-r--r-- | tools/perf/util/db-export.c | 1 | ||||
-rw-r--r-- | tools/perf/util/debug.c | 1 | ||||
-rw-r--r-- | tools/perf/util/demangle-java.c | 3 | ||||
-rw-r--r-- | tools/perf/util/dwarf-aux.c | 2 | ||||
-rw-r--r-- | tools/perf/util/env.c | 1 | ||||
-rw-r--r-- | tools/perf/util/parse-branch-options.c | 2 | ||||
-rw-r--r-- | tools/perf/util/parse-regs-options.c | 8 | ||||
-rw-r--r-- | tools/perf/util/strbuf.c | 1 | ||||
-rw-r--r-- | tools/perf/util/symbol-elf.c | 1 | ||||
-rw-r--r-- | tools/perf/util/symbol-minimal.c | 1 | ||||
-rw-r--r-- | tools/perf/util/target.c | 2 | ||||
-rw-r--r-- | tools/perf/util/thread-stack.c | 1 | ||||
-rw-r--r-- | tools/perf/util/usage.c | 3 |
14 files changed, 22 insertions, 6 deletions
diff --git a/tools/perf/util/cputopo.c b/tools/perf/util/cputopo.c index 26e73a4bd4fe..d3b2bd258b9e 100644 --- a/tools/perf/util/cputopo.c +++ b/tools/perf/util/cputopo.c @@ -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" diff --git a/tools/perf/util/db-export.c b/tools/perf/util/db-export.c index 2182f552aac6..4cdd1f579156 100644 --- a/tools/perf/util/db-export.c +++ b/tools/perf/util/db-export.c @@ -5,6 +5,7 @@ */ #include <errno.h> +#include <stdlib.h> #include "evsel.h" #include "machine.h" diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 3cc578343f48..3780fe42453b 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -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> diff --git a/tools/perf/util/demangle-java.c b/tools/perf/util/demangle-java.c index 5b4900d67c80..763328c151e9 100644 --- a/tools/perf/util/demangle-java.c +++ b/tools/perf/util/demangle-java.c @@ -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, diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index 218bfea8f8a8..03b2de1f5a35 100644 --- a/tools/perf/util/dwarf-aux.c +++ b/tools/perf/util/dwarf-aux.c @@ -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" diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c index 22eee8942527..7d317d49d207 100644 --- a/tools/perf/util/env.c +++ b/tools/perf/util/env.c @@ -7,6 +7,7 @@ #include <errno.h> #include <sys/utsname.h> #include <bpf/libbpf.h> +#include <stdlib.h> struct perf_env perf_env; diff --git a/tools/perf/util/parse-branch-options.c b/tools/perf/util/parse-branch-options.c index bd779d9f4d1e..726e8d9e8c54 100644 --- a/tools/perf/util/parse-branch-options.c +++ b/tools/perf/util/parse-branch-options.c @@ -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) } diff --git a/tools/perf/util/parse-regs-options.c b/tools/perf/util/parse-regs-options.c index 08581e276225..ef46c2848808 100644 --- a/tools/perf/util/parse-regs-options.c +++ b/tools/perf/util/parse-regs-options.c @@ -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 diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c index 23092fd6451d..54336df089df 100644 --- a/tools/perf/util/strbuf.c +++ b/tools/perf/util/strbuf.c @@ -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 diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index 62008756d8cc..429920978cb0 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -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> diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c index 17edbd4f6f85..c8b7cadbc9c4 100644 --- a/tools/perf/util/symbol-minimal.c +++ b/tools/perf/util/symbol-minimal.c @@ -7,6 +7,7 @@ #include <stdio.h> #include <fcntl.h> #include <string.h> +#include <stdlib.h> #include <byteswap.h> #include <sys/stat.h> diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c index 3852d07c49bd..3adc65480349 100644 --- a/tools/perf/util/target.c +++ b/tools/perf/util/target.c @@ -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; diff --git a/tools/perf/util/thread-stack.c b/tools/perf/util/thread-stack.c index 6ff1ff4d4ce7..48d585a0175c 100644 --- a/tools/perf/util/thread-stack.c +++ b/tools/perf/util/thread-stack.c @@ -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" diff --git a/tools/perf/util/usage.c b/tools/perf/util/usage.c index 070d25ceea6a..3949a60b00ae 100644 --- a/tools/perf/util/usage.c +++ b/tools/perf/util/usage.c @@ -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) { |