From 76b31a29ddaf2fa5f0a70458c214bed02a4a70e9 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 18 Apr 2017 12:26:44 -0300 Subject: [PATCH] perf tools: Remove include dirent.h from util.h The files using the dirent.h routines should instead include it, reducing the includes hell that lead to longer build times. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-script.c | 1 + tools/perf/tests/dso-data.c | 1 + tools/perf/tests/parse-events.c | 1 + tools/perf/ui/browsers/hists.c | 1 + tools/perf/util/build-id.c | 1 + tools/perf/util/cpumap.c | 1 + tools/perf/util/event.c | 1 + tools/perf/util/machine.c | 1 + tools/perf/util/parse-events.c | 1 + tools/perf/util/util.c | 1 + tools/perf/util/util.h | 2 +- 11 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 853651a0f720..fe1dcd4f2c6d 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -32,6 +32,7 @@ #include "asm/bug.h" #include "util/mem-events.h" #include "util/dump-insn.h" +#include #include #include diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c index 46ea2e061b86..8f08df5861cb 100644 --- a/tools/perf/tests/dso-data.c +++ b/tools/perf/tests/dso-data.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index f5b77f5c3192..981d2bf9914f 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -5,6 +5,7 @@ #include "tests.h" #include "debug.h" #include "util.h" +#include #include #include #include diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index a271b48ad0d3..f0b5b2b0e521 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index 9815a3b6667a..923ea290bb6e 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 */ #include "util.h" +#include #include #include #include "build-id.h" diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index 9d9ecb2430cc..37b3bb79ee08 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -3,6 +3,7 @@ #include "../perf.h" #include "cpumap.h" #include +#include #include #include #include diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 1fc1217a0c2c..cf457ef534da 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index cdbfe3e32e5a..46411742d03c 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1,3 +1,4 @@ +#include #include #include #include "callchain.h" diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index f3dd1aa59a25..7d84338b19ee 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1,5 +1,6 @@ #include #include +#include #include #include "term.h" #include "../perf.h" diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 64877c6d09b2..b9716bc6e8fd 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -7,6 +7,7 @@ #ifdef HAVE_BACKTRACE_SUPPORT #include #endif +#include #include #include #include diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index d4910e490f20..c0574e2763b7 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -82,6 +81,7 @@ static inline void *zalloc(size_t size) #define zfree(ptr) ({ free(*ptr); *ptr = NULL; }) +struct dirent; struct strlist; int mkdir_p(char *path, mode_t mode); -- 2.20.1