summaryrefslogtreecommitdiffstats
path: root/tools/perf/util
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-04-18 10:46:11 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-19 13:01:51 -0300
commita43783aeec5fac8ef372ff8c0a5bbb3056fc0604 (patch)
treeb8c8f9f929543f1768c8a103636a38746e2bd6df /tools/perf/util
parenta067558e2fa72445e8f6e6b2dd372a82afae6e49 (diff)
downloadop-kernel-dev-a43783aeec5fac8ef372ff8c0a5bbb3056fc0604.zip
op-kernel-dev-a43783aeec5fac8ef372ff8c0a5bbb3056fc0604.tar.gz
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/perf/util')
-rw-r--r--tools/perf/util/annotate.c1
-rw-r--r--tools/perf/util/auxtrace.h1
-rw-r--r--tools/perf/util/bpf-loader.c1
-rw-r--r--tools/perf/util/bpf-loader.h2
-rw-r--r--tools/perf/util/bpf-prologue.c1
-rw-r--r--tools/perf/util/bpf-prologue.h2
-rw-r--r--tools/perf/util/build-id.c1
-rw-r--r--tools/perf/util/c++/clang-c.h1
-rw-r--r--tools/perf/util/cloexec.c1
-rw-r--r--tools/perf/util/comm.c1
-rw-r--r--tools/perf/util/config.c1
-rw-r--r--tools/perf/util/counts.c1
-rw-r--r--tools/perf/util/data-convert-bt.c1
-rw-r--r--tools/perf/util/data.c1
-rw-r--r--tools/perf/util/drv_configs.c1
-rw-r--r--tools/perf/util/dso.c1
-rw-r--r--tools/perf/util/dwarf-aux.c1
-rw-r--r--tools/perf/util/env.c1
-rw-r--r--tools/perf/util/event.c1
-rw-r--r--tools/perf/util/evlist.c1
-rw-r--r--tools/perf/util/evsel.c1
-rw-r--r--tools/perf/util/header.c1
-rw-r--r--tools/perf/util/hist.c1
-rw-r--r--tools/perf/util/intel-bts.c1
-rw-r--r--tools/perf/util/jitdump.c1
-rw-r--r--tools/perf/util/lzma.c1
-rw-r--r--tools/perf/util/machine.c1
-rw-r--r--tools/perf/util/ordered-events.c1
-rw-r--r--tools/perf/util/parse-events.c1
-rw-r--r--tools/perf/util/pmu.c1
-rw-r--r--tools/perf/util/probe-file.c1
-rw-r--r--tools/perf/util/quote.c1
-rw-r--r--tools/perf/util/record.c1
-rw-r--r--tools/perf/util/session.c1
-rw-r--r--tools/perf/util/sort.c1
-rw-r--r--tools/perf/util/stat.c1
-rw-r--r--tools/perf/util/strbuf.c1
-rw-r--r--tools/perf/util/strfilter.c1
-rw-r--r--tools/perf/util/symbol-minimal.c1
-rw-r--r--tools/perf/util/thread-stack.c1
-rw-r--r--tools/perf/util/thread.c1
-rw-r--r--tools/perf/util/thread_map.c1
-rw-r--r--tools/perf/util/unwind-libunwind-local.c1
-rw-r--r--tools/perf/util/util.h1
-rw-r--r--tools/perf/util/vdso.c2
45 files changed, 46 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 297bf5c..683f834 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -7,6 +7,7 @@
* Released under the GPL v2. (and only v2, not any later version)
*/
+#include <errno.h>
#include <inttypes.h>
#include "util.h"
#include "ui/ui.h"
diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h
index 26fb1ee..9f0de72 100644
--- a/tools/perf/util/auxtrace.h
+++ b/tools/perf/util/auxtrace.h
@@ -17,6 +17,7 @@
#define __PERF_AUXTRACE_H
#include <sys/types.h>
+#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <linux/list.h>
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 27af9d6..bf21c1c 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -11,6 +11,7 @@
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/string.h>
+#include <errno.h>
#include "perf.h"
#include "debug.h"
#include "bpf-loader.h"
diff --git a/tools/perf/util/bpf-loader.h b/tools/perf/util/bpf-loader.h
index f2b737b..4886386 100644
--- a/tools/perf/util/bpf-loader.h
+++ b/tools/perf/util/bpf-loader.h
@@ -85,6 +85,8 @@ int bpf__strerror_setup_stdout(struct perf_evlist *evlist, int err,
char *buf, size_t size);
#else
+#include <errno.h>
+
static inline struct bpf_object *
bpf__prepare_load(const char *filename __maybe_unused,
bool source __maybe_unused)
diff --git a/tools/perf/util/bpf-prologue.c b/tools/perf/util/bpf-prologue.c
index 6cdbee1..1356220 100644
--- a/tools/perf/util/bpf-prologue.c
+++ b/tools/perf/util/bpf-prologue.c
@@ -12,6 +12,7 @@
#include "bpf-loader.h"
#include "bpf-prologue.h"
#include "probe-finder.h"
+#include <errno.h>
#include <dwarf-regs.h>
#include <linux/filter.h>
diff --git a/tools/perf/util/bpf-prologue.h b/tools/perf/util/bpf-prologue.h
index d94cbea..ba56483 100644
--- a/tools/perf/util/bpf-prologue.h
+++ b/tools/perf/util/bpf-prologue.h
@@ -18,6 +18,8 @@ int bpf__gen_prologue(struct probe_trace_arg *args, int nargs,
struct bpf_insn *new_prog, size_t *new_cnt,
size_t cnt_space);
#else
+#include <errno.h>
+
static inline int
bpf__gen_prologue(struct probe_trace_arg *args __maybe_unused,
int nargs __maybe_unused,
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 3c07555..8d8ef1d 100644
--- a/tools/perf/util/build-id.c
+++ b/tools/perf/util/build-id.c
@@ -7,6 +7,7 @@
* Copyright (C) 2009, 2010 Arnaldo Carvalho de Melo <acme@redhat.com>
*/
#include "util.h"
+#include <errno.h>
#include <stdio.h>
#include "build-id.h"
#include "event.h"
diff --git a/tools/perf/util/c++/clang-c.h b/tools/perf/util/c++/clang-c.h
index 0eadd79..ccafcf7 100644
--- a/tools/perf/util/c++/clang-c.h
+++ b/tools/perf/util/c++/clang-c.h
@@ -20,6 +20,7 @@ extern int perf_clang__compile_bpf(const char *filename,
size_t *p_obj_buf_sz);
#else
+#include <errno.h>
static inline void perf_clang__init(void) { }
static inline void perf_clang__cleanup(void) { }
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c
index f0dcd0e..4b4f00d 100644
--- a/tools/perf/util/cloexec.c
+++ b/tools/perf/util/cloexec.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <sched.h>
#include "util.h"
#include "../perf.h"
diff --git a/tools/perf/util/comm.c b/tools/perf/util/comm.c
index 32837b6..530a62a 100644
--- a/tools/perf/util/comm.c
+++ b/tools/perf/util/comm.c
@@ -1,5 +1,6 @@
#include "comm.h"
#include "util.h"
+#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <linux/refcount.h>
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 88783aa..f560403 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -8,6 +8,7 @@
* Copyright (C) Johannes Schindelin, 2005
*
*/
+#include <errno.h>
#include "util.h"
#include "cache.h"
#include <subcmd/exec-cmd.h>
diff --git a/tools/perf/util/counts.c b/tools/perf/util/counts.c
index e3fde31..83fedd0 100644
--- a/tools/perf/util/counts.c
+++ b/tools/perf/util/counts.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <stdlib.h>
#include "evsel.h"
#include "counts.h"
diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c
index c3277b3..89d5031 100644
--- a/tools/perf/util/data-convert-bt.c
+++ b/tools/perf/util/data-convert-bt.c
@@ -7,6 +7,7 @@
* Released under the GPL v2. (and only v2, not any later version)
*/
+#include <errno.h>
#include <inttypes.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
diff --git a/tools/perf/util/data.c b/tools/perf/util/data.c
index 60bfc9c..e84bbc8 100644
--- a/tools/perf/util/data.c
+++ b/tools/perf/util/data.c
@@ -2,6 +2,7 @@
#include <linux/kernel.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#include <unistd.h>
#include <string.h>
diff --git a/tools/perf/util/drv_configs.c b/tools/perf/util/drv_configs.c
index 1647f28..eec7542 100644
--- a/tools/perf/util/drv_configs.c
+++ b/tools/perf/util/drv_configs.c
@@ -17,6 +17,7 @@
#include "evlist.h"
#include "evsel.h"
#include "pmu.h"
+#include <errno.h>
static int
perf_evsel__apply_drv_configs(struct perf_evsel *evsel,
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 6ad5773..cd061dc 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -2,6 +2,7 @@
#include <linux/kernel.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include <errno.h>
#include "symbol.h"
#include "dso.h"
#include "machine.h"
diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c
index 780ee46..f5acda1 100644
--- a/tools/perf/util/dwarf-aux.c
+++ b/tools/perf/util/dwarf-aux.c
@@ -17,6 +17,7 @@
*
*/
+#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
#include "util.h"
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 075fc77..9e21538 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -1,6 +1,7 @@
#include "cpumap.h"
#include "env.h"
#include "util.h"
+#include <errno.h>
struct perf_env perf_env;
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 53b81b2..1fc1217 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include <linux/kernel.h>
#include <linux/types.h>
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index cf27039..f74ea2e 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -8,6 +8,7 @@
*/
#include "util.h"
#include <api/fs/fs.h>
+#include <errno.h>
#include <inttypes.h>
#include <poll.h>
#include "cpumap.h"
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 757f73c..44a7aef 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -8,6 +8,7 @@
*/
#include <byteswap.h>
+#include <errno.h>
#include <inttypes.h>
#include <linux/bitops.h>
#include <api/fs/tracing_path.h>
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 51865b8..28a3acb 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include "util.h"
#include "string2.h"
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index af3bd5d..65d4275 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -10,6 +10,7 @@
#include "annotate.h"
#include "srcline.h"
#include "ui/progress.h"
+#include <errno.h>
#include <math.h>
static bool hists__filter_entry_by_dso(struct hists *hists,
diff --git a/tools/perf/util/intel-bts.c b/tools/perf/util/intel-bts.c
index 471ed8b..b2834ac 100644
--- a/tools/perf/util/intel-bts.c
+++ b/tools/perf/util/intel-bts.c
@@ -14,6 +14,7 @@
*/
#include <endian.h>
+#include <errno.h>
#include <byteswap.h>
#include <inttypes.h>
#include <linux/kernel.h>
diff --git a/tools/perf/util/jitdump.c b/tools/perf/util/jitdump.c
index d6d2532..388078d 100644
--- a/tools/perf/util/jitdump.c
+++ b/tools/perf/util/jitdump.c
@@ -1,5 +1,6 @@
#include <sys/sysmacros.h>
#include <sys/types.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tools/perf/util/lzma.c b/tools/perf/util/lzma.c
index 9ddea5c..5b73b26 100644
--- a/tools/perf/util/lzma.c
+++ b/tools/perf/util/lzma.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <lzma.h>
#include <stdio.h>
#include <linux/compiler.h>
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index f13f46a..cdbfe3e 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include "callchain.h"
#include "debug.h"
diff --git a/tools/perf/util/ordered-events.c b/tools/perf/util/ordered-events.c
index df05be6..4de398c 100644
--- a/tools/perf/util/ordered-events.c
+++ b/tools/perf/util/ordered-events.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include <linux/list.h>
#include <linux/compiler.h>
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 535c7cb..d4877c8 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1,5 +1,6 @@
#include <linux/hw_breakpoint.h>
#include <linux/err.h>
+#include <errno.h>
#include "util.h"
#include "../perf.h"
#include "evlist.h"
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index 7503fa1..bca1844 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1,6 +1,7 @@
#include <linux/list.h>
#include <linux/compiler.h>
#include <sys/types.h>
+#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdbool.h>
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index 7942ea5..1ccaefd 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*
*/
+#include <errno.h>
#include <sys/uio.h>
#include "util.h"
#include "event.h"
diff --git a/tools/perf/util/quote.c b/tools/perf/util/quote.c
index 293534c..1ba8920 100644
--- a/tools/perf/util/quote.c
+++ b/tools/perf/util/quote.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <stdlib.h>
#include "strbuf.h"
#include "quote.h"
diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c
index 98bf584..d91bdf5 100644
--- a/tools/perf/util/record.c
+++ b/tools/perf/util/record.c
@@ -2,6 +2,7 @@
#include "evsel.h"
#include "cpumap.h"
#include "parse-events.h"
+#include <errno.h>
#include <api/fs/fs.h>
#include "util.h"
#include "cloexec.h"
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 0695e08..19d993f 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include <linux/kernel.h>
#include <traceevent/event-parse.h>
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 63ad537..9aa058e 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include <sys/mman.h>
#include "sort.h"
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index bbf30b2..c581744 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -1,3 +1,4 @@
+#include <errno.h>
#include <inttypes.h>
#include <math.h>
#include "stat.h"
diff --git a/tools/perf/util/strbuf.c b/tools/perf/util/strbuf.c
index 81759390..e91b5e8 100644
--- a/tools/perf/util/strbuf.c
+++ b/tools/perf/util/strbuf.c
@@ -1,6 +1,7 @@
#include "debug.h"
#include "util.h"
#include <linux/kernel.h>
+#include <errno.h>
int prefixcmp(const char *str, const char *prefix)
{
diff --git a/tools/perf/util/strfilter.c b/tools/perf/util/strfilter.c
index 3b068e0..4dc0af6 100644
--- a/tools/perf/util/strfilter.c
+++ b/tools/perf/util/strfilter.c
@@ -2,6 +2,7 @@
#include "string2.h"
#include "strfilter.h"
+#include <errno.h>
#include "sane_ctype.h"
/* Operators */
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 870ef0f..40bf5d4 100644
--- a/tools/perf/util/symbol-minimal.c
+++ b/tools/perf/util/symbol-minimal.c
@@ -1,6 +1,7 @@
#include "symbol.h"
#include "util.h"
+#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
diff --git a/tools/perf/util/thread-stack.c b/tools/perf/util/thread-stack.c
index d330152..dd17d6a 100644
--- a/tools/perf/util/thread-stack.c
+++ b/tools/perf/util/thread-stack.c
@@ -15,6 +15,7 @@
#include <linux/rbtree.h>
#include <linux/list.h>
+#include <errno.h>
#include "thread.h"
#include "event.h"
#include "machine.h"
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c
index e8ce6ab..378c418 100644
--- a/tools/perf/util/thread.c
+++ b/tools/perf/util/thread.c
@@ -1,4 +1,5 @@
#include "../perf.h"
+#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index ef86bf5..63ead7b 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -1,4 +1,5 @@
#include <dirent.h>
+#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/tools/perf/util/unwind-libunwind-local.c b/tools/perf/util/unwind-libunwind-local.c
index 788f4d3..f8455be 100644
--- a/tools/perf/util/unwind-libunwind-local.c
+++ b/tools/perf/util/unwind-libunwind-local.c
@@ -16,6 +16,7 @@
*/
#include <elf.h>
+#include <errno.h>
#include <gelf.h>
#include <fcntl.h>
#include <inttypes.h>
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index 850ca54..6fd9963 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -18,7 +18,6 @@
#include <stdarg.h>
#include <string.h>
#include <term.h>
-#include <errno.h>
#include <limits.h>
#include <sys/param.h>
#include <sys/types.h>
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c
index 7bdcad4..d3c39ee 100644
--- a/tools/perf/util/vdso.c
+++ b/tools/perf/util/vdso.c
@@ -1,4 +1,4 @@
-
+#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
OpenPOWER on IntegriCloud