summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-04-18 12:26:44 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-19 13:01:55 -0300
commit76b31a29ddaf2fa5f0a70458c214bed02a4a70e9 (patch)
tree574ac5f54bb42fb68fac4fe24c451a3c39b11ce7 /tools/perf
parent767fe71b2d576762c77873021abd95c0a18538e3 (diff)
downloadop-kernel-dev-76b31a29ddaf2fa5f0a70458c214bed02a4a70e9.zip
op-kernel-dev-76b31a29ddaf2fa5f0a70458c214bed02a4a70e9.tar.gz
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 <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-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-script.c1
-rw-r--r--tools/perf/tests/dso-data.c1
-rw-r--r--tools/perf/tests/parse-events.c1
-rw-r--r--tools/perf/ui/browsers/hists.c1
-rw-r--r--tools/perf/util/build-id.c1
-rw-r--r--tools/perf/util/cpumap.c1
-rw-r--r--tools/perf/util/event.c1
-rw-r--r--tools/perf/util/machine.c1
-rw-r--r--tools/perf/util/parse-events.c1
-rw-r--r--tools/perf/util/util.c1
-rw-r--r--tools/perf/util/util.h2
11 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 853651a..fe1dcd4 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 <dirent.h>
#include <errno.h>
#include <inttypes.h>
diff --git a/tools/perf/tests/dso-data.c b/tools/perf/tests/dso-data.c
index 46ea2e0..8f08df5 100644
--- a/tools/perf/tests/dso-data.c
+++ b/tools/perf/tests/dso-data.c
@@ -1,3 +1,4 @@
+#include <dirent.h>
#include <stdlib.h>
#include <linux/kernel.h>
#include <linux/types.h>
diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c
index f5b77f5..981d2bf 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 <dirent.h>
#include <errno.h>
#include <linux/kernel.h>
#include <linux/hw_breakpoint.h>
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index a271b48..f0b5b2b 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1,3 +1,4 @@
+#include <dirent.h>
#include <errno.h>
#include <inttypes.h>
#include <stdio.h>
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c
index 9815a3b..923ea29 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 <dirent.h>
#include <errno.h>
#include <stdio.h>
#include "build-id.h"
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 9d9ecb2..37b3bb7 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -3,6 +3,7 @@
#include "../perf.h"
#include "cpumap.h"
#include <assert.h>
+#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <linux/bitmap.h>
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 1fc1217..cf457ef 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1,3 +1,4 @@
+#include <dirent.h>
#include <errno.h>
#include <inttypes.h>
#include <linux/kernel.h>
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index cdbfe3e..4641174 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1,3 +1,4 @@
+#include <dirent.h>
#include <errno.h>
#include <inttypes.h>
#include "callchain.h"
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index f3dd1aa..7d84338 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 <dirent.h>
#include <errno.h>
#include "term.h"
#include "../perf.h"
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 64877c6..b9716bc 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -7,6 +7,7 @@
#ifdef HAVE_BACKTRACE_SUPPORT
#include <execinfo.h>
#endif
+#include <dirent.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h
index d4910e4..c0574e2 100644
--- a/tools/perf/util/util.h
+++ b/tools/perf/util/util.h
@@ -20,7 +20,6 @@
#include <limits.h>
#include <sys/param.h>
#include <sys/types.h>
-#include <dirent.h>
#include <sys/time.h>
#include <time.h>
#include <signal.h>
@@ -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);
OpenPOWER on IntegriCloud