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>
This commit is contained in:
@@ -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"
|
||||
|
@@ -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>
|
||||
|
@@ -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"
|
||||
|
@@ -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)
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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"
|
||||
|
@@ -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,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include "util.h"
|
||||
#include "../perf.h"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#include "comm.h"
|
||||
#include "util.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <linux/refcount.h>
|
||||
|
@@ -8,6 +8,7 @@
|
||||
* Copyright (C) Johannes Schindelin, 2005
|
||||
*
|
||||
*/
|
||||
#include <errno.h>
|
||||
#include "util.h"
|
||||
#include "cache.h"
|
||||
#include <subcmd/exec-cmd.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "evsel.h"
|
||||
#include "counts.h"
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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"
|
||||
|
@@ -17,6 +17,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include "util.h"
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include "cpumap.h"
|
||||
#include "env.h"
|
||||
#include "util.h"
|
||||
#include <errno.h>
|
||||
|
||||
struct perf_env perf_env;
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#include "util.h"
|
||||
#include <api/fs/fs.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <poll.h>
|
||||
#include "cpumap.h"
|
||||
|
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include <byteswap.h>
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <api/fs/tracing_path.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include "util.h"
|
||||
#include "string2.h"
|
||||
|
@@ -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,
|
||||
|
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
#include <byteswap.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/kernel.h>
|
||||
|
@@ -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,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <lzma.h>
|
||||
#include <stdio.h>
|
||||
#include <linux/compiler.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include "callchain.h"
|
||||
#include "debug.h"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/compiler.h>
|
||||
|
@@ -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,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>
|
||||
|
@@ -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,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "strbuf.h"
|
||||
#include "quote.h"
|
||||
|
@@ -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,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <traceevent/event-parse.h>
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/mman.h>
|
||||
#include "sort.h"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
#include "stat.h"
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include "string2.h"
|
||||
#include "strfilter.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include "sane_ctype.h"
|
||||
|
||||
/* Operators */
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#include "symbol.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
@@ -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,4 +1,5 @@
|
||||
#include "../perf.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include <elf.h>
|
||||
#include <errno.h>
|
||||
#include <gelf.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.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,4 +1,4 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
Reference in New Issue
Block a user