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

perf tools: Remove needless evlist.h include directives

Remove the last unneeded use of cache.h in a header, we can check where
it is really needed, i.e. we can remove it and be sure that it isn't
being obtained indirectly.

This is an old file, used by now incorrectly in many places, so it was
providing includes needed indirectly, fixup this fallout.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-3x3l8gihoaeh7714os861ia7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+33 -32
+2 -1
tools/perf/builtin-buildid-cache.c
··· 15 15 #include <unistd.h> 16 16 #include "builtin.h" 17 17 #include "namespaces.h" 18 - #include "util/cache.h" 19 18 #include "util/debug.h" 20 19 #include "util/header.h" 20 + #include <subcmd/pager.h> 21 21 #include <subcmd/parse-options.h> 22 22 #include "util/strlist.h" 23 23 #include "util/build-id.h" ··· 27 27 #include "util/time-utils.h" 28 28 #include "util/util.h" 29 29 #include "util/probe-file.h" 30 + #include <linux/string.h> 30 31 31 32 static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid) 32 33 {
+1 -1
tools/perf/builtin-buildid-list.c
··· 10 10 #include "builtin.h" 11 11 #include "perf.h" 12 12 #include "util/build-id.h" 13 - #include "util/cache.h" 14 13 #include "util/debug.h" 15 14 #include "util/dso.h" 15 + #include <subcmd/pager.h> 16 16 #include <subcmd/parse-options.h> 17 17 #include "util/session.h" 18 18 #include "util/symbol.h"
+3 -1
tools/perf/builtin-kvm.c
··· 6 6 #include "util/evsel.h" 7 7 #include "util/evlist.h" 8 8 #include "util/term.h" 9 - #include "util/cache.h" 10 9 #include "util/symbol.h" 11 10 #include "util/thread.h" 12 11 #include "util/header.h" 13 12 #include "util/session.h" 14 13 #include "util/intlist.h" 14 + #include <subcmd/pager.h> 15 15 #include <subcmd/parse-options.h> 16 16 #include "util/trace-event.h" 17 17 #include "util/debug.h" ··· 20 20 #include "util/top.h" 21 21 #include "util/data.h" 22 22 #include "util/ordered-events.h" 23 + #include "ui/ui.h" 23 24 24 25 #include <sys/prctl.h> 25 26 #ifdef HAVE_TIMERFD_SUPPORT ··· 32 31 #include <fcntl.h> 33 32 34 33 #include <linux/kernel.h> 34 + #include <linux/string.h> 35 35 #include <linux/time64.h> 36 36 #include <linux/zalloc.h> 37 37 #include <errno.h>
+1 -1
tools/perf/builtin-list.c
··· 11 11 #include "builtin.h" 12 12 13 13 #include "util/parse-events.h" 14 - #include "util/cache.h" 15 14 #include "util/pmu.h" 16 15 #include "util/debug.h" 17 16 #include "util/metricgroup.h" 17 + #include <subcmd/pager.h> 18 18 #include <subcmd/parse-options.h> 19 19 #include <stdio.h> 20 20
+1 -1
tools/perf/builtin-lock.c
··· 6 6 7 7 #include "util/evlist.h" // for struct evsel_str_handler 8 8 #include "util/evsel.h" 9 - #include "util/cache.h" 10 9 #include "util/symbol.h" 11 10 #include "util/thread.h" 12 11 #include "util/header.h" 13 12 13 + #include <subcmd/pager.h> 14 14 #include <subcmd/parse-options.h> 15 15 #include "util/trace-event.h" 16 16
+1 -1
tools/perf/builtin-sched.c
··· 4 4 #include "perf-sys.h" 5 5 6 6 #include "util/evlist.h" 7 - #include "util/cache.h" 8 7 #include "util/evsel.h" 9 8 #include "util/symbol.h" 10 9 #include "util/thread.h" ··· 18 19 #include "util/callchain.h" 19 20 #include "util/time-utils.h" 20 21 22 + #include <subcmd/pager.h> 21 23 #include <subcmd/parse-options.h> 22 24 #include "util/trace-event.h" 23 25
+1 -1
tools/perf/builtin-script.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include "builtin.h" 3 3 4 - #include "util/cache.h" 5 4 #include "util/counts.h" 6 5 #include "util/debug.h" 7 6 #include "util/dso.h" ··· 29 30 #include "util/thread-stack.h" 30 31 #include "util/time-utils.h" 31 32 #include "util/path.h" 33 + #include "ui/ui.h" 32 34 #include "print_binary.h" 33 35 #include "archinsn.h" 34 36 #include <linux/bitmap.h>
+1 -1
tools/perf/builtin-timechart.c
··· 14 14 #include "builtin.h" 15 15 #include "util/color.h" 16 16 #include <linux/list.h> 17 - #include "util/cache.h" 18 17 #include "util/evlist.h" // for struct evsel_str_handler 19 18 #include "util/evsel.h" 20 19 #include <linux/kernel.h> ··· 26 27 27 28 #include "perf.h" 28 29 #include "util/header.h" 30 + #include <subcmd/pager.h> 29 31 #include <subcmd/parse-options.h> 30 32 #include "util/parse-events.h" 31 33 #include "util/event.h"
+1 -1
tools/perf/perf.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 1 /* 3 2 * perf.c 4 3 * ··· 21 22 #include "util/debug.h" 22 23 #include "util/event.h" 23 24 #include "util/util.h" 25 + #include "ui/ui.h" 24 26 #include "perf-sys.h" 25 27 #include <api/fs/fs.h> 26 28 #include <api/fs/tracing_path.h>
+1 -1
tools/perf/tests/llvm.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <stdio.h> 3 3 #include <stdlib.h> 4 + #include <string.h> 4 5 #include <bpf/libbpf.h> 5 6 #include <util/llvm-utils.h> 6 - #include <util/cache.h> 7 7 #include "llvm.h" 8 8 #include "tests.h" 9 9 #include "debug.h"
-1
tools/perf/ui/browsers/header.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 - #include "util/cache.h" 3 2 #include "util/debug.h" 4 3 #include "ui/browser.h" 5 4 #include "ui/keysyms.h"
-1
tools/perf/ui/gtk/browser.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 - #include "../cache.h" 3 2 #include "../evsel.h" 4 3 #include "../sort.h" 5 4 #include "../hist.h"
-1
tools/perf/ui/gtk/hists.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include "../evlist.h" 3 - #include "../cache.h" 4 3 #include "../callchain.h" 5 4 #include "../evsel.h" 6 5 #include "../sort.h"
-1
tools/perf/ui/gtk/setup.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include "gtk.h" 3 - #include "../../util/cache.h" 4 3 #include "../../util/debug.h" 5 4 6 5 extern struct perf_error_ops perf_gtk_eops;
-2
tools/perf/ui/helpline.h
··· 5 5 #include <stdio.h> 6 6 #include <stdarg.h> 7 7 8 - #include "../util/cache.h" 9 - 10 8 struct ui_helpline { 11 9 void (*pop)(void); 12 10 void (*push)(const char *msg);
-1
tools/perf/ui/progress.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/kernel.h> 3 - #include "../util/cache.h" 4 3 #include "progress.h" 5 4 6 5 static void null_progress__update(struct ui_progress *p __maybe_unused)
+2 -1
tools/perf/ui/setup.c
··· 2 2 #include <pthread.h> 3 3 #include <dlfcn.h> 4 4 5 - #include "../util/cache.h" 5 + #include <subcmd/pager.h> 6 6 #include "../util/debug.h" 7 7 #include "../util/hist.h" 8 8 #include "../util/util.h" 9 + #include "ui.h" 9 10 10 11 pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER; 11 12 void *perf_gtk_handle;
+1
tools/perf/ui/tui/helpline.c
··· 4 4 #include <string.h> 5 5 #include <pthread.h> 6 6 #include <linux/kernel.h> 7 + #include <linux/string.h> 7 8 8 9 #include "../../util/debug.h" 9 10 #include "../helpline.h"
-1
tools/perf/ui/tui/progress.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/kernel.h> 3 - #include "../../util/cache.h" 4 3 #include "../progress.h" 5 4 #include "../libslang.h" 6 5 #include "../ui.h"
-2
tools/perf/ui/tui/setup.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 1 #include <errno.h> 3 2 #include <signal.h> 4 3 #include <stdbool.h> ··· 7 8 #include <execinfo.h> 8 9 #endif 9 10 10 - #include "../../util/cache.h" 11 11 #include "../../util/debug.h" 12 12 #include "../../util/util.h" 13 13 #include "../../perf.h"
-1
tools/perf/ui/tui/util.c
··· 5 5 #include <stdlib.h> 6 6 #include <sys/ttydefaults.h> 7 7 8 - #include "../../util/cache.h" 9 8 #include "../../util/debug.h" 10 9 #include "../browser.h" 11 10 #include "../keysyms.h"
-1
tools/perf/util/annotate.c
··· 19 19 #include "build-id.h" 20 20 #include "color.h" 21 21 #include "config.h" 22 - #include "cache.h" 23 22 #include "dso.h" 24 23 #include "map.h" 25 24 #include "symbol.h"
+2 -1
tools/perf/util/color.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/kernel.h> 3 - #include "cache.h" 3 + #include <subcmd/pager.h> 4 4 #include <stdlib.h> 5 5 #include <stdio.h> 6 + #include <string.h> 6 7 #include "color.h" 7 8 #include <math.h> 8 9 #include <unistd.h>
+2 -1
tools/perf/util/color_config.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <linux/kernel.h> 3 - #include "cache.h" 3 + #include <subcmd/pager.h> 4 + #include <string.h> 4 5 #include "config.h" 5 6 #include <stdlib.h> 6 7 #include <stdio.h>
+1 -1
tools/perf/util/debug.c
··· 13 13 #ifdef HAVE_BACKTRACE_SUPPORT 14 14 #include <execinfo.h> 15 15 #endif 16 - #include "cache.h" 17 16 #include "color.h" 18 17 #include "event.h" 19 18 #include "debug.h" ··· 20 21 #include "util.h" 21 22 #include "target.h" 22 23 #include "ui/helpline.h" 24 + #include "ui/ui.h" 23 25 24 26 #include <linux/ctype.h> 25 27
+1 -1
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
··· 14 14 #include <stdint.h> 15 15 #include <inttypes.h> 16 16 #include <linux/compiler.h> 17 + #include <linux/string.h> 17 18 #include <linux/zalloc.h> 18 19 19 - #include "../cache.h" 20 20 #include "../auxtrace.h" 21 21 22 22 #include "intel-pt-insn-decoder.h"
+1 -1
tools/perf/util/parse-events.c
··· 13 13 #include "build-id.h" 14 14 #include "evlist.h" 15 15 #include "evsel.h" 16 + #include <subcmd/pager.h> 16 17 #include <subcmd/parse-options.h> 17 18 #include "parse-events.h" 18 19 #include <subcmd/exec-cmd.h> 19 20 #include "string2.h" 20 21 #include "strlist.h" 21 22 #include "symbol.h" 22 - #include "cache.h" 23 23 #include "header.h" 24 24 #include "bpf-loader.h" 25 25 #include "debug.h"
+2 -1
tools/perf/util/path.c
··· 11 11 * 12 12 * which is what it's designed for. 13 13 */ 14 - #include "cache.h" 15 14 #include "path.h" 15 + #include "cache.h" 16 16 #include <linux/kernel.h> 17 17 #include <limits.h> 18 18 #include <stdio.h> 19 + #include <string.h> 19 20 #include <sys/types.h> 20 21 #include <sys/stat.h> 21 22 #include <dirent.h>
+3
tools/perf/util/path.h
··· 2 2 #ifndef _PERF_PATH_H 3 3 #define _PERF_PATH_H 4 4 5 + #include <stddef.h> 6 + #include <stdbool.h> 7 + 5 8 struct dirent; 6 9 7 10 int path__join(char *bf, size_t size, const char *path1, const char *path2);
+2 -1
tools/perf/util/pmu.c
··· 3 3 #include <linux/compiler.h> 4 4 #include <linux/string.h> 5 5 #include <linux/zalloc.h> 6 + #include <subcmd/pager.h> 6 7 #include <sys/types.h> 7 8 #include <errno.h> 8 9 #include <fcntl.h> ··· 23 22 #include "cpumap.h" 24 23 #include "header.h" 25 24 #include "pmu-events/pmu-events.h" 26 - #include "cache.h" 27 25 #include "string2.h" 26 + #include "strbuf.h" 28 27 29 28 struct perf_pmu_format { 30 29 char *name;
+2 -1
tools/perf/util/probe-event.c
··· 26 26 #include "strfilter.h" 27 27 #include "debug.h" 28 28 #include "dso.h" 29 - #include "cache.h" 30 29 #include "color.h" 31 30 #include "map.h" 32 31 #include "map_groups.h" ··· 37 38 #include "probe-file.h" 38 39 #include "session.h" 39 40 #include "string2.h" 41 + #include "strbuf.h" 40 42 43 + #include <subcmd/pager.h> 41 44 #include <linux/ctype.h> 42 45 #include <linux/zalloc.h> 43 46
+1 -1
tools/perf/util/probe-file.c
··· 17 17 #include "strfilter.h" 18 18 #include "debug.h" 19 19 #include "dso.h" 20 - #include "cache.h" 21 20 #include "color.h" 22 21 #include "symbol.h" 22 + #include "strbuf.h" 23 23 #include <api/fs/tracing_path.h> 24 24 #include "probe-event.h" 25 25 #include "probe-file.h"