]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
perf str{filter,list}: Disentangle headers
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 18 Apr 2017 13:57:25 +0000 (10:57 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 19 Apr 2017 16:01:52 +0000 (13:01 -0300)
There are places where we just need a forward declaration, and others
were we need to include strlist.h and/or strfilter.h, reducing the
impact of changes in headers on the build time, do it.

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-zab42gbiki88y9k0csorxekb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
17 files changed:
tools/perf/builtin-report.c
tools/perf/builtin-timechart.c
tools/perf/util/bpf-loader.c
tools/perf/util/build-id.c
tools/perf/util/build-id.h
tools/perf/util/evsel_fprintf.c
tools/perf/util/jitdump.c
tools/perf/util/map.c
tools/perf/util/parse-events.c
tools/perf/util/probe-event.c
tools/perf/util/probe-event.h
tools/perf/util/probe-file.c
tools/perf/util/probe-file.h
tools/perf/util/probe-finder.c
tools/perf/util/sort.c
tools/perf/util/sort.h
tools/perf/util/util.h

index 2941d8df4d4071688c9d9d5f6127ad11db4c4ed3..f50738e0006ea7ba5e02dd609540752cf3f9eda2 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/rbtree.h>
 #include "util/symbol.h"
 #include "util/callchain.h"
-#include "util/strlist.h"
 #include "util/values.h"
 
 #include "perf.h"
index e2576c8f6d4e8fed333acd4236e8ca368d367630..38e2c437b7b311366916fb728d0750ef38ed78e4 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/time64.h>
 #include "util/symbol.h"
 #include "util/callchain.h"
-#include "util/strlist.h"
 
 #include "perf.h"
 #include "util/header.h"
index bf21c1ca9771d81545978110279076104ca0b90c..4bd2d1d882af1d6e9da7561e80d572a82258b5cd 100644 (file)
@@ -19,6 +19,7 @@
 #include "probe-event.h"
 #include "probe-finder.h" // for MAX_PROBES
 #include "parse-events.h"
+#include "strfilter.h"
 #include "llvm-utils.h"
 #include "c++/clang-c.h"
 
index 8d8ef1d31b1ece9aa066ca2cd1625890195318ae..f9ccd053cdf6fbea2ddc9000a8307a078ad85f8b 100644 (file)
@@ -19,6 +19,7 @@
 #include "header.h"
 #include "vdso.h"
 #include "probe-file.h"
+#include "strlist.h"
 
 #include "sane_ctype.h"
 
index d27990610f9f4bfff8598bd71855f4b1f14f1a8c..a96081121179697525d9de77cb14c36797c5027f 100644 (file)
@@ -5,7 +5,6 @@
 #define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1)
 
 #include "tool.h"
-#include "strlist.h"
 #include <linux/types.h>
 
 extern struct perf_tool build_id__mark_dso_hit_ops;
@@ -34,6 +33,9 @@ char *build_id_cache__origname(const char *sbuild_id);
 char *build_id_cache__linkname(const char *sbuild_id, char *bf, size_t size);
 char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
                               bool is_kallsyms, bool is_vdso);
+
+struct strlist;
+
 struct strlist *build_id_cache__list_all(bool validonly);
 char *build_id_cache__complement(const char *incomplete_sbuild_id);
 int build_id_cache__list_build_ids(const char *pathname,
index 8000f62d5d53a70e1771e742853abd0faa8c210d..e415aee6a24520f3c88e9ce70d621b39109896b6 100644 (file)
@@ -5,6 +5,7 @@
 #include "evsel.h"
 #include "callchain.h"
 #include "map.h"
+#include "strlist.h"
 #include "symbol.h"
 
 static int comma_fprintf(FILE *fp, bool *first, const char *fmt, ...)
index 388078d84eedced9d7c6cdb79e4313b74843a562..9084930e17571f890710a63dbdd885b9ee65a2aa 100644 (file)
@@ -17,7 +17,6 @@
 #include "debug.h"
 #include "evlist.h"
 #include "symbol.h"
-#include "strlist.h"
 #include <elf.h>
 
 #include "tsc.h"
index 9059d20c3b8a83458a05d5911bebd3825b9984e3..ebfa5d92358acd609269dd38e03a656d96ec43f7 100644 (file)
@@ -9,7 +9,6 @@
 #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
 #include "map.h"
 #include "thread.h"
-#include "strlist.h"
 #include "vdso.h"
 #include "build-id.h"
 #include "util.h"
index d4877c8438e5dd35a8f456cfc1c4d66d77f09bfb..580f0e17ad38b8782c2d0bcbae28af1033c4ac2f 100644 (file)
@@ -9,6 +9,7 @@
 #include "parse-events.h"
 #include <subcmd/exec-cmd.h>
 #include "string2.h"
+#include "strlist.h"
 #include "symbol.h"
 #include "cache.h"
 #include "header.h"
index 8f1374071cfcae0ae748d45b22cb3d03f34717a2..84e7e698411e6a80a39050514227cbb90556ca13 100644 (file)
@@ -36,6 +36,7 @@
 #include "util.h"
 #include "event.h"
 #include "strlist.h"
+#include "strfilter.h"
 #include "debug.h"
 #include "cache.h"
 #include "color.h"
index 5d4e940614024ddf9a5d0420b8bdfa51ee07cd38..373842656fb6444f7ffdbe1aefc2f4a4add50818 100644 (file)
@@ -3,8 +3,6 @@
 
 #include <stdbool.h>
 #include "intlist.h"
-#include "strlist.h"
-#include "strfilter.h"
 
 /* Probe related configurations */
 struct probe_conf {
@@ -107,6 +105,8 @@ struct line_range {
        struct intlist          *line_list;     /* Visible lines */
 };
 
+struct strlist;
+
 /* List of variables */
 struct variable_list {
        struct probe_trace_point        point;  /* Actual probepoint */
@@ -153,6 +153,9 @@ int convert_perf_probe_events(struct perf_probe_event *pevs, int npevs);
 int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs);
 int show_probe_trace_events(struct perf_probe_event *pevs, int npevs);
 void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs);
+
+struct strfilter;
+
 int del_perf_probe_events(struct strfilter *filter);
 
 int show_perf_probe_event(const char *group, const char *event,
index 1ccaefdc05c4218915732c0c1f174e12991ddce6..685653f2bc320a39c855e9c38af9e1a219274891 100644 (file)
@@ -19,6 +19,7 @@
 #include "util.h"
 #include "event.h"
 #include "strlist.h"
+#include "strfilter.h"
 #include "debug.h"
 #include "cache.h"
 #include "color.h"
index dbf95a00864ae3d33ade24b68025c81c340ad23b..5ecc9d3925dbb53c3190d8c6aa075c5e38bd3935 100644 (file)
@@ -1,10 +1,11 @@
 #ifndef __PROBE_FILE_H
 #define __PROBE_FILE_H
 
-#include "strlist.h"
-#include "strfilter.h"
 #include "probe-event.h"
 
+struct strlist;
+struct strfilter;
+
 /* Cache of probe definitions */
 struct probe_cache_entry {
        struct list_head        node;
@@ -41,6 +42,7 @@ int probe_file__open_both(int *kfd, int *ufd, int flag);
 struct strlist *probe_file__get_namelist(int fd);
 struct strlist *probe_file__get_rawlist(int fd);
 int probe_file__add_event(int fd, struct probe_trace_event *tev);
+
 int probe_file__del_events(int fd, struct strfilter *filter);
 int probe_file__get_events(int fd, struct strfilter *filter,
                                  struct strlist *plist);
index 3f3cd11d3b7c9f7b28dc55ed2a6028e46b7c5bfa..a5731de0e5ebc73ed3fbc35dd1b334e664f20b69 100644 (file)
@@ -38,6 +38,7 @@
 #include "debug.h"
 #include "intlist.h"
 #include "util.h"
+#include "strlist.h"
 #include "symbol.h"
 #include "probe-finder.h"
 #include "probe-file.h"
index 9aa058e167e887c1c52d5df6c438f1a104c38b55..4df228ab4db1d9a64f10625ec3710fad42a90e24 100644 (file)
@@ -7,6 +7,7 @@
 #include "symbol.h"
 #include "evsel.h"
 #include "evlist.h"
+#include "strlist.h"
 #include <traceevent/event-parse.h>
 #include "mem-events.h"
 #include <linux/kernel.h>
index 535903297ceeadaaf5241bce7dffc978b01bac27..421232a27e7bddb718fdf3fc3528081f2c7959f0 100644 (file)
@@ -11,7 +11,6 @@
 #include "symbol.h"
 #include "string.h"
 #include "callchain.h"
-#include "strlist.h"
 #include "values.h"
 
 #include "../perf.h"
index 6fd9963be1c829f58614fa63a10ef2943e6bbadc..397676c252328803f9f25881fa21586a3b3146b1 100644 (file)
@@ -40,7 +40,6 @@
 #include <termios.h>
 #include <linux/bitops.h>
 #include <termios.h>
-#include "strlist.h"
 
 extern char buildid_dir[];
 
@@ -89,6 +88,8 @@ static inline void *zalloc(size_t size)
 
 #define zfree(ptr) ({ free(*ptr); *ptr = NULL; })
 
+struct strlist;
+
 int mkdir_p(char *path, mode_t mode);
 int rm_rf(const char *path);
 struct strlist *lsdir(const char *name, bool (*filter)(const char *, struct dirent *));