diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-18 10:46:11 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 13:01:51 -0300 |
commit | a43783aeec5fac8ef372ff8c0a5bbb3056fc0604 (patch) | |
tree | b8c8f9f929543f1768c8a103636a38746e2bd6df /tools | |
parent | a067558e2fa72445e8f6e6b2dd372a82afae6e49 (diff) |
perf tools: Include errno.h where needed
Removing it from util.h, part of an effort to disentangle the includes
hell, that makes changes to util.h or something included by it to cause
a complete rebuild of the tools.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
95 files changed, 96 insertions, 2 deletions
diff --git a/tools/perf/arch/arm64/util/dwarf-regs.c b/tools/perf/arch/arm64/util/dwarf-regs.c index aea610c292e6..f268720ff021 100644 --- a/tools/perf/arch/arm64/util/dwarf-regs.c +++ b/tools/perf/arch/arm64/util/dwarf-regs.c @@ -8,6 +8,7 @@ * published by the Free Software Foundation. */ +#include <errno.h> #include <stddef.h> #include <dwarf-regs.h> #include <linux/ptrace.h> /* for struct user_pt_regs */ diff --git a/tools/perf/arch/powerpc/util/kvm-stat.c b/tools/perf/arch/powerpc/util/kvm-stat.c index 74eee30398f8..249723f0e6a9 100644 --- a/tools/perf/arch/powerpc/util/kvm-stat.c +++ b/tools/perf/arch/powerpc/util/kvm-stat.c @@ -1,3 +1,4 @@ +#include <errno.h> #include "util/kvm-stat.h" #include "util/parse-events.h" #include "util/debug.h" diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c index 4268f7762e25..f860dc411f69 100644 --- a/tools/perf/arch/powerpc/util/perf_regs.c +++ b/tools/perf/arch/powerpc/util/perf_regs.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <string.h> #include <regex.h> diff --git a/tools/perf/arch/s390/util/kvm-stat.c b/tools/perf/arch/s390/util/kvm-stat.c index ed57df2e6d68..d233e2eb9592 100644 --- a/tools/perf/arch/s390/util/kvm-stat.c +++ b/tools/perf/arch/s390/util/kvm-stat.c @@ -9,6 +9,7 @@ * as published by the Free Software Foundation. */ +#include <errno.h> #include "../../util/kvm-stat.h" #include <asm/sie.h> diff --git a/tools/perf/arch/x86/tests/intel-cqm.c b/tools/perf/arch/x86/tests/intel-cqm.c index 7f064eb37158..03c62eb0106b 100644 --- a/tools/perf/arch/x86/tests/intel-cqm.c +++ b/tools/perf/arch/x86/tests/intel-cqm.c @@ -7,6 +7,7 @@ #include "arch-tests.h" #include <sys/mman.h> +#include <errno.h> #include <string.h> static pid_t spawn(void) diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/arch/x86/tests/perf-time-to-tsc.c index a8e37f3148c2..e3ae9cff2b67 100644 --- a/tools/perf/arch/x86/tests/perf-time-to-tsc.c +++ b/tools/perf/arch/x86/tests/perf-time-to-tsc.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <inttypes.h> #include <stdio.h> #include <unistd.h> diff --git a/tools/perf/arch/x86/util/auxtrace.c b/tools/perf/arch/x86/util/auxtrace.c index cc1d865e31f1..6aa3f2a38321 100644 --- a/tools/perf/arch/x86/util/auxtrace.c +++ b/tools/perf/arch/x86/util/auxtrace.c @@ -13,6 +13,7 @@ * */ +#include <errno.h> #include <stdbool.h> #include "../../util/header.h" diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c index 5132775a044f..af2bce7a2cd6 100644 --- a/tools/perf/arch/x86/util/intel-bts.c +++ b/tools/perf/arch/x86/util/intel-bts.c @@ -13,6 +13,7 @@ * */ +#include <errno.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/bitops.h> diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c index 90fa2286edcf..f630de0206a1 100644 --- a/tools/perf/arch/x86/util/intel-pt.c +++ b/tools/perf/arch/x86/util/intel-pt.c @@ -13,6 +13,7 @@ * */ +#include <errno.h> #include <stdbool.h> #include <linux/kernel.h> #include <linux/types.h> diff --git a/tools/perf/arch/x86/util/kvm-stat.c b/tools/perf/arch/x86/util/kvm-stat.c index b63d4be655a2..bf817beca0a8 100644 --- a/tools/perf/arch/x86/util/kvm-stat.c +++ b/tools/perf/arch/x86/util/kvm-stat.c @@ -1,3 +1,4 @@ +#include <errno.h> #include "../../util/kvm-stat.h" #include <asm/svm.h> #include <asm/vmx.h> diff --git a/tools/perf/arch/x86/util/perf_regs.c b/tools/perf/arch/x86/util/perf_regs.c index 3bf3548c5e2d..f95edebfb716 100644 --- a/tools/perf/arch/x86/util/perf_regs.c +++ b/tools/perf/arch/x86/util/perf_regs.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <string.h> #include <regex.h> diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index b2b2722f6bb7..7a5dc7e5c577 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -33,6 +33,7 @@ #include "util/block-range.h" #include <dlfcn.h> +#include <errno.h> #include <linux/bitmap.h> struct perf_annotate { diff --git a/tools/perf/builtin-buildid-cache.c b/tools/perf/builtin-buildid-cache.c index 94b55eee0d9b..034c3d4a7b27 100644 --- a/tools/perf/builtin-buildid-cache.c +++ b/tools/perf/builtin-buildid-cache.c @@ -10,6 +10,7 @@ #include <sys/time.h> #include <time.h> #include <dirent.h> +#include <errno.h> #include <unistd.h> #include "builtin.h" #include "perf.h" diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index 26f4e608207f..fdaca16e0c74 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c @@ -16,6 +16,7 @@ #include "util/session.h" #include "util/symbol.h" #include "util/data.h" +#include <errno.h> static int sysfs__fprintf_build_id(FILE *fp) { diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index cc8156a969ac..a90c1260f49e 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -9,6 +9,7 @@ * Dick Fowles <fowles@inreach.com> * Joe Mario <jmario@redhat.com> */ +#include <errno.h> #include <inttypes.h> #include <linux/compiler.h> #include <linux/kernel.h> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 09be77b13788..eec5df80f5a3 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -19,6 +19,7 @@ #include "util/data.h" #include "util/config.h" +#include <errno.h> #include <inttypes.h> #include <stdlib.h> #include <math.h> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index f80fb60b00b0..67d14037c03e 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -9,6 +9,7 @@ #include "builtin.h" #include "perf.h" +#include <errno.h> #include <unistd.h> #include <signal.h> #include <fcntl.h> diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 1f18385907f5..7bde2f59dac2 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c @@ -13,6 +13,7 @@ #include <subcmd/help.h> #include "util/debug.h" #include <linux/kernel.h> +#include <errno.h> static struct man_viewer_list { struct man_viewer_list *next; diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 65e1c026a2f0..b102ee702aa1 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -22,6 +22,7 @@ #include <subcmd/parse-options.h> #include <linux/list.h> +#include <errno.h> struct perf_inject { struct perf_tool tool; diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c index 15754a492cad..9409c9464667 100644 --- a/tools/perf/builtin-kmem.c +++ b/tools/perf/builtin-kmem.c @@ -23,6 +23,7 @@ #include <linux/kernel.h> #include <linux/rbtree.h> #include <linux/string.h> +#include <errno.h> #include <inttypes.h> #include <locale.h> #include <regex.h> diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index e82a6979327f..40660428fa72 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -26,6 +26,7 @@ #include <linux/kernel.h> #include <linux/time64.h> +#include <errno.h> #include <inttypes.h> #include <termios.h> #include <semaphore.h> diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 6f93a6f0e268..ff98652484a7 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -1,3 +1,4 @@ +#include <errno.h> #include <inttypes.h>< |