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>
This commit is contained in:
Arnaldo Carvalho de Melo 2019-08-30 12:52:25 -03:00
parent 7ae811b12e
commit fa0d98462f
32 changed files with 33 additions and 32 deletions

View File

@ -15,9 +15,9 @@
#include <unistd.h>
#include "builtin.h"
#include "namespaces.h"
#include "util/cache.h"
#include "util/debug.h"
#include "util/header.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "util/strlist.h"
#include "util/build-id.h"
@ -27,6 +27,7 @@
#include "util/time-utils.h"
#include "util/util.h"
#include "util/probe-file.h"
#include <linux/string.h>
static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid)
{

View File

@ -10,9 +10,9 @@
#include "builtin.h"
#include "perf.h"
#include "util/build-id.h"
#include "util/cache.h"
#include "util/debug.h"
#include "util/dso.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "util/session.h"
#include "util/symbol.h"

View File

@ -6,12 +6,12 @@
#include "util/evsel.h"
#include "util/evlist.h"
#include "util/term.h"
#include "util/cache.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include "util/session.h"
#include "util/intlist.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "util/trace-event.h"
#include "util/debug.h"
@ -20,6 +20,7 @@
#include "util/top.h"
#include "util/data.h"
#include "util/ordered-events.h"
#include "ui/ui.h"
#include <sys/prctl.h>
#ifdef HAVE_TIMERFD_SUPPORT
@ -31,6 +32,7 @@
#include <fcntl.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/time64.h>
#include <linux/zalloc.h>
#include <errno.h>

View File

@ -11,10 +11,10 @@
#include "builtin.h"
#include "util/parse-events.h"
#include "util/cache.h"
#include "util/pmu.h"
#include "util/debug.h"
#include "util/metricgroup.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include <stdio.h>

View File

@ -6,11 +6,11 @@
#include "util/evlist.h" // for struct evsel_str_handler
#include "util/evsel.h"
#include "util/cache.h"
#include "util/symbol.h"
#include "util/thread.h"
#include "util/header.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "util/trace-event.h"

View File

@ -4,7 +4,6 @@
#include "perf-sys.h"
#include "util/evlist.h"
#include "util/cache.h"
#include "util/evsel.h"
#include "util/symbol.h"
#include "util/thread.h"
@ -19,6 +18,7 @@
#include "util/callchain.h"
#include "util/time-utils.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "util/trace-event.h"

View File

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include "builtin.h"
#include "util/cache.h"
#include "util/counts.h"
#include "util/debug.h"
#include "util/dso.h"
@ -30,6 +29,7 @@
#include "util/thread-stack.h"
#include "util/time-utils.h"
#include "util/path.h"
#include "ui/ui.h"
#include "print_binary.h"
#include "archinsn.h"
#include <linux/bitmap.h>

View File

@ -14,7 +14,6 @@
#include "builtin.h"
#include "util/color.h"
#include <linux/list.h>
#include "util/cache.h"
#include "util/evlist.h" // for struct evsel_str_handler
#include "util/evsel.h"
#include <linux/kernel.h>
@ -27,6 +26,7 @@
#include "perf.h"
#include "util/header.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "util/parse-events.h"
#include "util/event.h"

View File

@ -1,4 +1,3 @@
// SPDX-License-Identifier: GPL-2.0
/*
* perf.c
*
@ -22,6 +21,7 @@
#include "util/debug.h"
#include "util/event.h"
#include "util/util.h"
#include "ui/ui.h"
#include "perf-sys.h"
#include <api/fs/fs.h>
#include <api/fs/tracing_path.h>

View File

@ -1,9 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bpf/libbpf.h>
#include <util/llvm-utils.h>
#include <util/cache.h>
#include "llvm.h"
#include "tests.h"
#include "debug.h"

View File

@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "util/cache.h"
#include "util/debug.h"
#include "ui/browser.h"
#include "ui/keysyms.h"

View File

@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include "../cache.h"
#include "../evsel.h"
#include "../sort.h"
#include "../hist.h"

View File

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "../evlist.h"
#include "../cache.h"
#include "../callchain.h"
#include "../evsel.h"
#include "../sort.h"

View File

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "gtk.h"
#include "../../util/cache.h"
#include "../../util/debug.h"
extern struct perf_error_ops perf_gtk_eops;

View File

@ -5,8 +5,6 @@
#include <stdio.h>
#include <stdarg.h>
#include "../util/cache.h"
struct ui_helpline {
void (*pop)(void);
void (*push)(const char *msg);

View File

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include "../util/cache.h"
#include "progress.h"
static void null_progress__update(struct ui_progress *p __maybe_unused)

View File

@ -2,10 +2,11 @@
#include <pthread.h>
#include <dlfcn.h>
#include "../util/cache.h"
#include <subcmd/pager.h>
#include "../util/debug.h"
#include "../util/hist.h"
#include "../util/util.h"
#include "ui.h"
pthread_mutex_t ui__lock = PTHREAD_MUTEX_INITIALIZER;
void *perf_gtk_handle;

View File

@ -4,6 +4,7 @@
#include <string.h>
#include <pthread.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include "../../util/debug.h"
#include "../helpline.h"

View File

@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include "../../util/cache.h"
#include "../progress.h"
#include "../libslang.h"
#include "../ui.h"

View File

@ -1,4 +1,3 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <signal.h>
#include <stdbool.h>
@ -8,7 +7,6 @@
#include <execinfo.h>
#endif
#include "../../util/cache.h"
#include "../../util/debug.h"
#include "../../util/util.h"
#include "../../perf.h"

View File

@ -5,7 +5,6 @@
#include <stdlib.h>
#include <sys/ttydefaults.h>
#include "../../util/cache.h"
#include "../../util/debug.h"
#include "../browser.h"
#include "../keysyms.h"

View File

@ -19,7 +19,6 @@
#include "build-id.h"
#include "color.h"
#include "config.h"
#include "cache.h"
#include "dso.h"
#include "map.h"
#include "symbol.h"

View File

@ -1,8 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include "cache.h"
#include <subcmd/pager.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "color.h"
#include <math.h>
#include <unistd.h>

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include "cache.h"
#include <subcmd/pager.h>
#include <string.h>
#include "config.h"
#include <stdlib.h>
#include <stdio.h>

View File

@ -13,7 +13,6 @@
#ifdef HAVE_BACKTRACE_SUPPORT
#include <execinfo.h>
#endif
#include "cache.h"
#include "color.h"
#include "event.h"
#include "debug.h"
@ -21,6 +20,7 @@
#include "util.h"
#include "target.h"
#include "ui/helpline.h"
#include "ui/ui.h"
#include <linux/ctype.h>

View File

@ -14,9 +14,9 @@
#include <stdint.h>
#include <inttypes.h>
#include <linux/compiler.h>
#include <linux/string.h>
#include <linux/zalloc.h>
#include "../cache.h"
#include "../auxtrace.h"
#include "intel-pt-insn-decoder.h"

View File

@ -13,13 +13,13 @@
#include "build-id.h"
#include "evlist.h"
#include "evsel.h"
#include <subcmd/pager.h>
#include <subcmd/parse-options.h>
#include "parse-events.h"
#include <subcmd/exec-cmd.h>
#include "string2.h"
#include "strlist.h"
#include "symbol.h"
#include "cache.h"
#include "header.h"
#include "bpf-loader.h"
#include "debug.h"

View File

@ -11,11 +11,12 @@
*
* which is what it's designed for.
*/
#include "cache.h"
#include "path.h"
#include "cache.h"
#include <linux/kernel.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>

View File

@ -2,6 +2,9 @@
#ifndef _PERF_PATH_H
#define _PERF_PATH_H
#include <stddef.h>
#include <stdbool.h>
struct dirent;
int path__join(char *bf, size_t size, const char *path1, const char *path2);

View File

@ -3,6 +3,7 @@
#include <linux/compiler.h>
#include <linux/string.h>
#include <linux/zalloc.h>
#include <subcmd/pager.h>
#include <sys/types.h>
#include <errno.h>
#include <fcntl.h>
@ -22,8 +23,8 @@
#include "cpumap.h"
#include "header.h"
#include "pmu-events/pmu-events.h"
#include "cache.h"
#include "string2.h"
#include "strbuf.h"
struct perf_pmu_format {
char *name;

View File

@ -26,7 +26,6 @@
#include "strfilter.h"
#include "debug.h"
#include "dso.h"
#include "cache.h"
#include "color.h"
#include "map.h"
#include "map_groups.h"
@ -38,7 +37,9 @@
#include "probe-file.h"
#include "session.h"
#include "string2.h"
#include "strbuf.h"
#include <subcmd/pager.h>
#include <linux/ctype.h>
#include <linux/zalloc.h>

View File

@ -17,9 +17,9 @@
#include "strfilter.h"
#include "debug.h"
#include "dso.h"
#include "cache.h"
#include "color.h"
#include "symbol.h"
#include "strbuf.h"
#include <api/fs/tracing_path.h>
#include "probe-event.h"
#include "probe-file.h"