perf tools: Remove needless evlist.h include directives
A message that is not in the archive (sent off-list or not yet received): [email protected]
The following commit has been merged into the perf/core branch of tip:
Commit-ID: fa0d98462fae5d4951f22f3ac1090d48c53396d1 Gitweb: https://git.kernel.org/tip/fa0d98462fae5d4951f22f3ac1090d48c53396d1 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 30 Aug 2019 12:52:25 -03:00 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitterDate: Sat, 31 Aug 2019 22:24:10 -03:00
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 <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-buildid-cache.c | 3 ++- tools/perf/builtin-buildid-list.c | 2 +- tools/perf/builtin-kvm.c | 4 +++- tools/perf/builtin-list.c | 2 +- tools/perf/builtin-lock.c | 2 +- tools/perf/builtin-sched.c | 2 +- tools/perf/builtin-script.c | 2 +- tools/perf/builtin-timechart.c | 2 +- tools/perf/perf.c | 2 +- tools/perf/tests/llvm.c | 2 +- tools/perf/ui/browsers/header.c | 1 - tools/perf/ui/gtk/browser.c | 1 - tools/perf/ui/gtk/hists.c | 1 - tools/perf/ui/gtk/setup.c | 1 - tools/perf/ui/helpline.h | 2 -- tools/perf/ui/progress.c | 1 - tools/perf/ui/setup.c | 3 ++- tools/perf/ui/tui/helpline.c | 1 + tools/perf/ui/tui/progress.c | 1 - tools/perf/ui/tui/setup.c | 2 -- tools/perf/ui/tui/util.c | 1 - tools/perf/util/annotate.c | 1 - tools/perf/util/color.c | 3 ++- tools/perf/util/color_config.c | 3 ++- tools/perf/util/debug.c | 2 +- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 2 +- tools/perf/util/parse-events.c | 2 +- tools/perf/util/path.c | 3 ++- tools/perf/util/path.h | 3 +++ tools/perf/util/pmu.c | 3 ++- tools/perf/util/probe-event.c | 3 ++- tools/perf/util/probe-file.c | 2 +- 32 files changed, 33 insertions(+), 32 deletions(-)
tools/perf/builtin-buildid-cache.c +2 -1
@@ -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) {
tools/perf/builtin-buildid-list.c +1 -1
@@ -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"
tools/perf/builtin-kvm.c +3 -1
@@ -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>
tools/perf/builtin-list.c +1 -1
@@ -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>
tools/perf/builtin-lock.c +1 -1
@@ -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"
tools/perf/builtin-sched.c +1 -1
@@ -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"
tools/perf/builtin-script.c +1 -1
@@ -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>
tools/perf/builtin-timechart.c +1 -1
@@ -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"
tools/perf/perf.c +1 -1
@@ -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>
tools/perf/tests/llvm.c +1 -1
@@ -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"
tools/perf/ui/browsers/header.c +0 -1
@@ -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"
tools/perf/ui/gtk/browser.c +0 -1
@@ -1,5 +1,4 @@// SPDX-License-Identifier: GPL-2.0 -#include "../cache.h" #include "../evsel.h" #include "../sort.h" #include "../hist.h"
tools/perf/ui/gtk/hists.c +0 -1
@@ -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"
tools/perf/ui/gtk/setup.c +0 -1
@@ -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;
tools/perf/ui/helpline.h +0 -2
@@ -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);
tools/perf/ui/progress.c +0 -1
@@ -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 )
tools/perf/ui/setup.c +2 -1
@@ -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;
tools/perf/ui/tui/helpline.c +1 -0
@@ -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"
tools/perf/ui/tui/progress.c +0 -1
@@ -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"
tools/perf/ui/tui/setup.c +0 -2
@@ -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"
tools/perf/ui/tui/util.c +0 -1
@@ -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"
tools/perf/util/annotate.c +0 -1
@@ -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"
tools/perf/util/color.c +2 -1
@@ -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>
tools/perf/util/color_config.c +2 -1
@@ -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>
tools/perf/util/debug.c +1 -1
@@ -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>
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +1 -1
@@ -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"
tools/perf/util/parse-events.c +1 -1
@@ -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"
tools/perf/util/path.c +2 -1
@@ -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>
tools/perf/util/path.h +3 -0
@@ -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);
tools/perf/util/pmu.c +2 -1
@@ -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;
tools/perf/util/probe-event.c +2 -1
@@ -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>
tools/perf/util/probe-file.c +1 -1
@@ -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"