Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf str{filter,list}: Disentangle headers

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>

+22 -11
-1
tools/perf/builtin-report.c
··· 16 16 #include <linux/rbtree.h> 17 17 #include "util/symbol.h" 18 18 #include "util/callchain.h" 19 - #include "util/strlist.h" 20 19 #include "util/values.h" 21 20 22 21 #include "perf.h"
-1
tools/perf/builtin-timechart.c
··· 30 30 #include <linux/time64.h> 31 31 #include "util/symbol.h" 32 32 #include "util/callchain.h" 33 - #include "util/strlist.h" 34 33 35 34 #include "perf.h" 36 35 #include "util/header.h"
+1
tools/perf/util/bpf-loader.c
··· 19 19 #include "probe-event.h" 20 20 #include "probe-finder.h" // for MAX_PROBES 21 21 #include "parse-events.h" 22 + #include "strfilter.h" 22 23 #include "llvm-utils.h" 23 24 #include "c++/clang-c.h" 24 25
+1
tools/perf/util/build-id.c
··· 19 19 #include "header.h" 20 20 #include "vdso.h" 21 21 #include "probe-file.h" 22 + #include "strlist.h" 22 23 23 24 #include "sane_ctype.h" 24 25
+3 -1
tools/perf/util/build-id.h
··· 5 5 #define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1) 6 6 7 7 #include "tool.h" 8 - #include "strlist.h" 9 8 #include <linux/types.h> 10 9 11 10 extern struct perf_tool build_id__mark_dso_hit_ops; ··· 33 34 char *build_id_cache__linkname(const char *sbuild_id, char *bf, size_t size); 34 35 char *build_id_cache__cachedir(const char *sbuild_id, const char *name, 35 36 bool is_kallsyms, bool is_vdso); 37 + 38 + struct strlist; 39 + 36 40 struct strlist *build_id_cache__list_all(bool validonly); 37 41 char *build_id_cache__complement(const char *incomplete_sbuild_id); 38 42 int build_id_cache__list_build_ids(const char *pathname,
+1
tools/perf/util/evsel_fprintf.c
··· 5 5 #include "evsel.h" 6 6 #include "callchain.h" 7 7 #include "map.h" 8 + #include "strlist.h" 8 9 #include "symbol.h" 9 10 10 11 static int comma_fprintf(FILE *fp, bool *first, const char *fmt, ...)
-1
tools/perf/util/jitdump.c
··· 17 17 #include "debug.h" 18 18 #include "evlist.h" 19 19 #include "symbol.h" 20 - #include "strlist.h" 21 20 #include <elf.h> 22 21 23 22 #include "tsc.h"
-1
tools/perf/util/map.c
··· 9 9 #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ 10 10 #include "map.h" 11 11 #include "thread.h" 12 - #include "strlist.h" 13 12 #include "vdso.h" 14 13 #include "build-id.h" 15 14 #include "util.h"
+1
tools/perf/util/parse-events.c
··· 9 9 #include "parse-events.h" 10 10 #include <subcmd/exec-cmd.h> 11 11 #include "string2.h" 12 + #include "strlist.h" 12 13 #include "symbol.h" 13 14 #include "cache.h" 14 15 #include "header.h"
+1
tools/perf/util/probe-event.c
··· 36 36 #include "util.h" 37 37 #include "event.h" 38 38 #include "strlist.h" 39 + #include "strfilter.h" 39 40 #include "debug.h" 40 41 #include "cache.h" 41 42 #include "color.h"
+5 -2
tools/perf/util/probe-event.h
··· 3 3 4 4 #include <stdbool.h> 5 5 #include "intlist.h" 6 - #include "strlist.h" 7 - #include "strfilter.h" 8 6 9 7 /* Probe related configurations */ 10 8 struct probe_conf { ··· 105 107 struct intlist *line_list; /* Visible lines */ 106 108 }; 107 109 110 + struct strlist; 111 + 108 112 /* List of variables */ 109 113 struct variable_list { 110 114 struct probe_trace_point point; /* Actual probepoint */ ··· 153 153 int apply_perf_probe_events(struct perf_probe_event *pevs, int npevs); 154 154 int show_probe_trace_events(struct perf_probe_event *pevs, int npevs); 155 155 void cleanup_perf_probe_events(struct perf_probe_event *pevs, int npevs); 156 + 157 + struct strfilter; 158 + 156 159 int del_perf_probe_events(struct strfilter *filter); 157 160 158 161 int show_perf_probe_event(const char *group, const char *event,
+1
tools/perf/util/probe-file.c
··· 19 19 #include "util.h" 20 20 #include "event.h" 21 21 #include "strlist.h" 22 + #include "strfilter.h" 22 23 #include "debug.h" 23 24 #include "cache.h" 24 25 #include "color.h"
+4 -2
tools/perf/util/probe-file.h
··· 1 1 #ifndef __PROBE_FILE_H 2 2 #define __PROBE_FILE_H 3 3 4 - #include "strlist.h" 5 - #include "strfilter.h" 6 4 #include "probe-event.h" 5 + 6 + struct strlist; 7 + struct strfilter; 7 8 8 9 /* Cache of probe definitions */ 9 10 struct probe_cache_entry { ··· 42 41 struct strlist *probe_file__get_namelist(int fd); 43 42 struct strlist *probe_file__get_rawlist(int fd); 44 43 int probe_file__add_event(int fd, struct probe_trace_event *tev); 44 + 45 45 int probe_file__del_events(int fd, struct strfilter *filter); 46 46 int probe_file__get_events(int fd, struct strfilter *filter, 47 47 struct strlist *plist);
+1
tools/perf/util/probe-finder.c
··· 38 38 #include "debug.h" 39 39 #include "intlist.h" 40 40 #include "util.h" 41 + #include "strlist.h" 41 42 #include "symbol.h" 42 43 #include "probe-finder.h" 43 44 #include "probe-file.h"
+1
tools/perf/util/sort.c
··· 7 7 #include "symbol.h" 8 8 #include "evsel.h" 9 9 #include "evlist.h" 10 + #include "strlist.h" 10 11 #include <traceevent/event-parse.h> 11 12 #include "mem-events.h" 12 13 #include <linux/kernel.h>
-1
tools/perf/util/sort.h
··· 11 11 #include "symbol.h" 12 12 #include "string.h" 13 13 #include "callchain.h" 14 - #include "strlist.h" 15 14 #include "values.h" 16 15 17 16 #include "../perf.h"
+2 -1
tools/perf/util/util.h
··· 40 40 #include <termios.h> 41 41 #include <linux/bitops.h> 42 42 #include <termios.h> 43 - #include "strlist.h" 44 43 45 44 extern char buildid_dir[]; 46 45 ··· 87 88 } 88 89 89 90 #define zfree(ptr) ({ free(*ptr); *ptr = NULL; }) 91 + 92 + struct strlist; 90 93 91 94 int mkdir_p(char *path, mode_t mode); 92 95 int rm_rf(const char *path);