Преглед на файлове

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>
Arnaldo Carvalho de Melo преди 8 години
родител
ревизия
a43783aeec
променени са 95 файла, в които са добавени 96 реда и са изтрити 2 реда
  1. 1 0
      tools/perf/arch/arm64/util/dwarf-regs.c
  2. 1 0
      tools/perf/arch/powerpc/util/kvm-stat.c
  3. 1 0
      tools/perf/arch/powerpc/util/perf_regs.c
  4. 1 0
      tools/perf/arch/s390/util/kvm-stat.c
  5. 1 0
      tools/perf/arch/x86/tests/intel-cqm.c
  6. 1 0
      tools/perf/arch/x86/tests/perf-time-to-tsc.c
  7. 1 0
      tools/perf/arch/x86/util/auxtrace.c
  8. 1 0
      tools/perf/arch/x86/util/intel-bts.c
  9. 1 0
      tools/perf/arch/x86/util/intel-pt.c
  10. 1 0
      tools/perf/arch/x86/util/kvm-stat.c
  11. 1 0
      tools/perf/arch/x86/util/perf_regs.c
  12. 1 0
      tools/perf/builtin-annotate.c
  13. 1 0
      tools/perf/builtin-buildid-cache.c
  14. 1 0
      tools/perf/builtin-buildid-list.c
  15. 1 0
      tools/perf/builtin-c2c.c
  16. 1 0
      tools/perf/builtin-diff.c
  17. 1 0
      tools/perf/builtin-ftrace.c
  18. 1 0
      tools/perf/builtin-help.c
  19. 1 0
      tools/perf/builtin-inject.c
  20. 1 0
      tools/perf/builtin-kmem.c
  21. 1 0
      tools/perf/builtin-kvm.c
  22. 1 0
      tools/perf/builtin-lock.c
  23. 1 0
      tools/perf/builtin-record.c
  24. 1 0
      tools/perf/builtin-report.c
  25. 1 0
      tools/perf/builtin-sched.c
  26. 1 0
      tools/perf/builtin-script.c
  27. 1 0
      tools/perf/builtin-stat.c
  28. 1 0
      tools/perf/builtin-timechart.c
  29. 1 0
      tools/perf/builtin-trace.c
  30. 1 0
      tools/perf/perf.c
  31. 1 0
      tools/perf/tests/attr.c
  32. 1 0
      tools/perf/tests/backward-ring-buffer.c
  33. 1 0
      tools/perf/tests/bpf.c
  34. 1 0
      tools/perf/tests/builtin-test.c
  35. 1 0
      tools/perf/tests/code-reading.c
  36. 1 0
      tools/perf/tests/event-times.c
  37. 1 0
      tools/perf/tests/evsel-roundtrip-name.c
  38. 1 0
      tools/perf/tests/hists_link.c
  39. 1 0
      tools/perf/tests/mmap-basic.c
  40. 1 0
      tools/perf/tests/openat-syscall-all-cpus.c
  41. 1 0
      tools/perf/tests/openat-syscall-tp-fields.c
  42. 1 0
      tools/perf/tests/openat-syscall.c
  43. 1 0
      tools/perf/tests/parse-events.c
  44. 1 0
      tools/perf/tests/perf-record.c
  45. 1 0
      tools/perf/tests/pmu.c
  46. 1 0
      tools/perf/tests/sdt.c
  47. 1 0
      tools/perf/tests/sw-clock.c
  48. 1 0
      tools/perf/tests/switch-tracking.c
  49. 1 0
      tools/perf/tests/task-exit.c
  50. 1 0
      tools/perf/ui/browsers/hists.c
  51. 1 0
      tools/perf/util/annotate.c
  52. 1 0
      tools/perf/util/auxtrace.h
  53. 1 0
      tools/perf/util/bpf-loader.c
  54. 2 0
      tools/perf/util/bpf-loader.h
  55. 1 0
      tools/perf/util/bpf-prologue.c
  56. 2 0
      tools/perf/util/bpf-prologue.h
  57. 1 0
      tools/perf/util/build-id.c
  58. 1 0
      tools/perf/util/c++/clang-c.h
  59. 1 0
      tools/perf/util/cloexec.c
  60. 1 0
      tools/perf/util/comm.c
  61. 1 0
      tools/perf/util/config.c
  62. 1 0
      tools/perf/util/counts.c
  63. 1 0
      tools/perf/util/data-convert-bt.c
  64. 1 0
      tools/perf/util/data.c
  65. 1 0
      tools/perf/util/drv_configs.c
  66. 1 0
      tools/perf/util/dso.c
  67. 1 0
      tools/perf/util/dwarf-aux.c
  68. 1 0
      tools/perf/util/env.c
  69. 1 0
      tools/perf/util/event.c
  70. 1 0
      tools/perf/util/evlist.c
  71. 1 0
      tools/perf/util/evsel.c
  72. 1 0
      tools/perf/util/header.c
  73. 1 0
      tools/perf/util/hist.c
  74. 1 0
      tools/perf/util/intel-bts.c
  75. 1 0
      tools/perf/util/jitdump.c
  76. 1 0
      tools/perf/util/lzma.c
  77. 1 0
      tools/perf/util/machine.c
  78. 1 0
      tools/perf/util/ordered-events.c
  79. 1 0
      tools/perf/util/parse-events.c
  80. 1 0
      tools/perf/util/pmu.c
  81. 1 0
      tools/perf/util/probe-file.c
  82. 1 0
      tools/perf/util/quote.c
  83. 1 0
      tools/perf/util/record.c
  84. 1 0
      tools/perf/util/session.c
  85. 1 0
      tools/perf/util/sort.c
  86. 1 0
      tools/perf/util/stat.c
  87. 1 0
      tools/perf/util/strbuf.c
  88. 1 0
      tools/perf/util/strfilter.c
  89. 1 0
      tools/perf/util/symbol-minimal.c
  90. 1 0
      tools/perf/util/thread-stack.c
  91. 1 0
      tools/perf/util/thread.c
  92. 1 0
      tools/perf/util/thread_map.c
  93. 1 0
      tools/perf/util/unwind-libunwind-local.c
  94. 0 1
      tools/perf/util/util.h
  95. 1 1
      tools/perf/util/vdso.c

+ 1 - 0
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 */

+ 1 - 0
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"

+ 1 - 0
tools/perf/arch/powerpc/util/perf_regs.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <string.h>
 #include <regex.h>
 

+ 1 - 0
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>
 

+ 1 - 0
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)

+ 1 - 0
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>

+ 1 - 0
tools/perf/arch/x86/util/auxtrace.c

@@ -13,6 +13,7 @@
  *
  */
 
+#include <errno.h>
 #include <stdbool.h>
 
 #include "../../util/header.h"

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
tools/perf/arch/x86/util/perf_regs.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <string.h>
 #include <regex.h>
 

+ 1 - 0
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 {

+ 1 - 0
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"

+ 1 - 0
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)
 {

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
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;

+ 1 - 0
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;

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
tools/perf/builtin-lock.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include "builtin.h"
 #include "perf.h"

+ 1 - 0
tools/perf/builtin-record.c

@@ -40,6 +40,7 @@
 #include "util/perf-hooks.h"
 #include "asm/bug.h"
 
+#include <errno.h>
 #include <inttypes.h>
 #include <unistd.h>
 #include <sched.h>

+ 1 - 0
tools/perf/builtin-report.c

@@ -40,6 +40,7 @@
 #include "util/auxtrace.h"
 
 #include <dlfcn.h>
+#include <errno.h>
 #include <inttypes.h>
 #include <linux/bitmap.h>
 #include <linux/stringify.h>

+ 1 - 0
tools/perf/builtin-sched.c

@@ -28,6 +28,7 @@
 #include <sys/resource.h>
 #include <inttypes.h>
 
+#include <errno.h>
 #include <semaphore.h>
 #include <pthread.h>
 #include <math.h>

+ 1 - 0
tools/perf/builtin-script.c

@@ -32,6 +32,7 @@
 #include "asm/bug.h"
 #include "util/mem-events.h"
 #include "util/dump-insn.h"
+#include <errno.h>
 #include <inttypes.h>
 
 #include "sane_ctype.h"

+ 1 - 0
tools/perf/builtin-stat.c

@@ -69,6 +69,7 @@
 
 #include <linux/time64.h>
 #include <api/fs/fs.h>
+#include <errno.h>
 #include <stdlib.h>
 #include <sys/prctl.h>
 #include <inttypes.h>

+ 1 - 0
tools/perf/builtin-timechart.c

@@ -12,6 +12,7 @@
  * of the License.
  */
 
+#include <errno.h>
 #include <inttypes.h>
 #include <traceevent/event-parse.h>
 

+ 1 - 0
tools/perf/builtin-trace.c

@@ -41,6 +41,7 @@
 #include "syscalltbl.h"
 #include "rb_resort.h"
 
+#include <errno.h>
 #include <inttypes.h>
 #include <libaudit.h> /* FIXME: Still needed for audit_errno_to_name */
 #include <stdlib.h>

+ 1 - 0
tools/perf/perf.c

@@ -19,6 +19,7 @@
 #include "util/debug.h"
 #include <api/fs/fs.h>
 #include <api/fs/tracing_path.h>
+#include <errno.h>
 #include <pthread.h>
 #include <stdlib.h>
 #include <time.h>

+ 1 - 0
tools/perf/tests/attr.c

@@ -18,6 +18,7 @@
  * permissions. All the event text files are stored there.
  */
 
+#include <errno.h>
 #include <inttypes.h>
 #include <stdlib.h>
 #include <stdio.h>

+ 1 - 0
tools/perf/tests/backward-ring-buffer.c

@@ -8,6 +8,7 @@
 #include <sys/prctl.h>
 #include "tests.h"
 #include "debug.h"
+#include <errno.h>
 
 #define NR_ITERS 111
 

+ 1 - 0
tools/perf/tests/bpf.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdio.h>
 #include <sys/epoll.h>
 #include <util/util.h>

+ 1 - 0
tools/perf/tests/builtin-test.c

@@ -3,6 +3,7 @@
  *
  * Builtin regression testing command: ever growing number of sanity tests
  */
+#include <errno.h>
 #include <unistd.h>
 #include <string.h>
 #include "builtin.h"

+ 1 - 0
tools/perf/tests/code-reading.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <inttypes.h>

+ 1 - 0
tools/perf/tests/event-times.c

@@ -1,4 +1,5 @@
 #include <linux/compiler.h>
+#include <errno.h>
 #include <inttypes.h>
 #include <string.h>
 #include "tests.h"

+ 1 - 0
tools/perf/tests/evsel-roundtrip-name.c

@@ -3,6 +3,7 @@
 #include "parse-events.h"
 #include "tests.h"
 #include "debug.h"
+#include <errno.h>
 #include <linux/kernel.h>
 
 static int perf_evsel__roundtrip_cache_name_test(void)

+ 1 - 0
tools/perf/tests/hists_link.c

@@ -9,6 +9,7 @@
 #include "thread.h"
 #include "parse-events.h"
 #include "hists_common.h"
+#include <errno.h>
 #include <linux/kernel.h>
 
 struct sample {

+ 1 - 0
tools/perf/tests/mmap-basic.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 /* For the CLR_() macros */
 #include <pthread.h>

+ 1 - 0
tools/perf/tests/openat-syscall-all-cpus.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 /* For the CPU_* macros */
 #include <pthread.h>

+ 1 - 0
tools/perf/tests/openat-syscall-tp-fields.c

@@ -5,6 +5,7 @@
 #include "thread_map.h"
 #include "tests.h"
 #include "debug.h"
+#include <errno.h>
 
 #ifndef O_DIRECTORY
 #define O_DIRECTORY    00200000

+ 1 - 0
tools/perf/tests/openat-syscall.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <api/fs/tracing_path.h>
 #include <linux/err.h>

+ 1 - 0
tools/perf/tests/parse-events.c

@@ -5,6 +5,7 @@
 #include "tests.h"
 #include "debug.h"
 #include "util.h"
+#include <errno.h>
 #include <linux/kernel.h>
 #include <linux/hw_breakpoint.h>
 #include <api/fs/fs.h>

+ 1 - 0
tools/perf/tests/perf-record.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 /* For the CLR_() macros */
 #include <pthread.h>

+ 1 - 0
tools/perf/tests/pmu.c

@@ -2,6 +2,7 @@
 #include "pmu.h"
 #include "util.h"
 #include "tests.h"
+#include <errno.h>
 #include <linux/kernel.h>
 
 /* Simulated format definitions. */

+ 1 - 0
tools/perf/tests/sdt.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdio.h>
 #include <sys/epoll.h>
 #include <util/util.h>

+ 1 - 0
tools/perf/tests/sw-clock.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <unistd.h>
 #include <stdlib.h>

+ 1 - 0
tools/perf/tests/switch-tracking.c

@@ -1,5 +1,6 @@
 #include <sys/time.h>
 #include <sys/prctl.h>
+#include <errno.h>
 #include <time.h>
 #include <stdlib.h>
 

+ 1 - 0
tools/perf/tests/task-exit.c

@@ -4,6 +4,7 @@
 #include "cpumap.h"
 #include "tests.h"
 
+#include <errno.h>
 #include <signal.h>
 
 static int exited;

+ 1 - 0
tools/perf/ui/browsers/hists.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>

+ 1 - 0
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"

+ 1 - 0
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>

+ 1 - 0
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"

+ 2 - 0
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)

+ 1 - 0
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>
 

+ 2 - 0
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,

+ 1 - 0
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"

+ 1 - 0
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) { }

+ 1 - 0
tools/perf/util/cloexec.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <sched.h>
 #include "util.h"
 #include "../perf.h"

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
tools/perf/util/counts.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdlib.h>
 #include "evsel.h"
 #include "counts.h"

+ 1 - 0
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>

+ 1 - 0
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>
 

+ 1 - 0
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,

+ 1 - 0
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"

+ 1 - 0
tools/perf/util/dwarf-aux.c

@@ -17,6 +17,7 @@
  *
  */
 
+#include <errno.h>
 #include <inttypes.h>
 #include <stdbool.h>
 #include "util.h"

+ 1 - 0
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;
 

+ 1 - 0
tools/perf/util/event.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <linux/kernel.h>
 #include <linux/types.h>

+ 1 - 0
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"

+ 1 - 0
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>

+ 1 - 0
tools/perf/util/header.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include "util.h"
 #include "string2.h"

+ 1 - 0
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,

+ 1 - 0
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>

+ 1 - 0
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>

+ 1 - 0
tools/perf/util/lzma.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <lzma.h>
 #include <stdio.h>
 #include <linux/compiler.h>

+ 1 - 0
tools/perf/util/machine.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include "callchain.h"
 #include "debug.h"

+ 1 - 0
tools/perf/util/ordered-events.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <linux/list.h>
 #include <linux/compiler.h>

+ 1 - 0
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"

+ 1 - 0
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>

+ 1 - 0
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"

+ 1 - 0
tools/perf/util/quote.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdlib.h>
 #include "strbuf.h"
 #include "quote.h"

+ 1 - 0
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"

+ 1 - 0
tools/perf/util/session.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <linux/kernel.h>
 #include <traceevent/event-parse.h>

+ 1 - 0
tools/perf/util/sort.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <sys/mman.h>
 #include "sort.h"

+ 1 - 0
tools/perf/util/stat.c

@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <inttypes.h>
 #include <math.h>
 #include "stat.h"

+ 1 - 0
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)
 {

+ 1 - 0
tools/perf/util/strfilter.c

@@ -2,6 +2,7 @@
 #include "string2.h"
 #include "strfilter.h"
 
+#include <errno.h>
 #include "sane_ctype.h"
 
 /* Operators */

+ 1 - 0
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>

+ 1 - 0
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"

+ 1 - 0
tools/perf/util/thread.c

@@ -1,4 +1,5 @@
 #include "../perf.h"
+#include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>

+ 1 - 0
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>

+ 1 - 0
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>

+ 0 - 1
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>

+ 1 - 1
tools/perf/util/vdso.c

@@ -1,4 +1,4 @@
-
+#include <errno.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <string.h>