aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-04-18 11:26:44 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-04-19 12:01:55 -0400
commit76b31a29ddaf2fa5f0a70458c214bed02a4a70e9 (patch)
tree574ac5f54bb42fb68fac4fe24c451a3c39b11ce7
parent767fe71b2d576762c77873021abd95c0a18538e3 (diff)
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>
-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 853651a0f720..fe1dcd4f2c6d 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -32,6 +32,7 @@
32#include "asm/bug.h" 32#include "asm/bug.h"
33#include "util/mem-events.h" 33#include "util/mem-events.h"
34#include "util/dump-insn.h" 34#include "util/dump-insn.h"
35#include <dirent.h>
35#include <errno.h> 36#include <errno.h>
36#include <inttypes.h> 37#include <inttypes.h>
37 38
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 @@
1#include <dirent.h>
1#include <stdlib.h> 2#include <stdlib.h>
2#include <linux/kernel.h> 3#include <linux/kernel.h>
3#include <linux/types.h> 4#include <linux/types.h>
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 @@
5#include "tests.h" 5#include "tests.h"
6#include "debug.h" 6#include "debug.h"
7#include "util.h" 7#include "util.h"
8#include <dirent.h>
8#include <errno.h> 9#include <errno.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
10#include <linux/hw_breakpoint.h> 11#include <linux/hw_breakpoint.h>
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 @@
1#include <dirent.h>
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <stdio.h> 4#include <stdio.h>
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 @@
7 * Copyright (C) 2009, 2010 Arnaldo Carvalho de Melo <acme@redhat.com> 7 * Copyright (C) 2009, 2010 Arnaldo Carvalho de Melo <acme@redhat.com>
8 */ 8 */
9#include "util.h" 9#include "util.h"
10#include <dirent.h>
10#include <errno.h> 11#include <errno.h>
11#include <stdio.h> 12#include <stdio.h>
12#include "build-id.h" 13#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 @@
3#include "../perf.h" 3#include "../perf.h"
4#include "cpumap.h" 4#include "cpumap.h"
5#include <assert.h> 5#include <assert.h>
6#include <dirent.h>
6#include <stdio.h> 7#include <stdio.h>
7#include <stdlib.h> 8#include <stdlib.h>
8#include <linux/bitmap.h> 9#include <linux/bitmap.h>
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 @@
1#include <dirent.h>
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include <linux/kernel.h> 4#include <linux/kernel.h>
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 @@
1#include <dirent.h>
1#include <errno.h> 2#include <errno.h>
2#include <inttypes.h> 3#include <inttypes.h>
3#include "callchain.h" 4#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 @@
1#include <linux/hw_breakpoint.h> 1#include <linux/hw_breakpoint.h>
2#include <linux/err.h> 2#include <linux/err.h>
3#include <dirent.h>
3#include <errno.h> 4#include <errno.h>
4#include "term.h" 5#include "term.h"
5#include "../perf.h" 6#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 @@
7#ifdef HAVE_BACKTRACE_SUPPORT 7#ifdef HAVE_BACKTRACE_SUPPORT
8#include <execinfo.h> 8#include <execinfo.h>
9#endif 9#endif
10#include <dirent.h>
10#include <inttypes.h> 11#include <inttypes.h>
11#include <stdio.h> 12#include <stdio.h>
12#include <stdlib.h> 13#include <stdlib.h>
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 @@
20#include <limits.h> 20#include <limits.h>
21#include <sys/param.h> 21#include <sys/param.h>
22#include <sys/types.h> 22#include <sys/types.h>
23#include <dirent.h>
24#include <sys/time.h> 23#include <sys/time.h>
25#include <time.h> 24#include <time.h>
26#include <signal.h> 25#include <signal.h>
@@ -82,6 +81,7 @@ static inline void *zalloc(size_t size)
82 81
83#define zfree(ptr) ({ free(*ptr); *ptr = NULL; }) 82#define zfree(ptr) ({ free(*ptr); *ptr = NULL; })
84 83
84struct dirent;
85struct strlist; 85struct strlist;
86 86
87int mkdir_p(char *path, mode_t mode); 87int mkdir_p(char *path, mode_t mode);