perf tools: Remove needless includes from cache.h
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 175729fc2c5144e9eee06b3483c5c9798f7062a5 Gitweb: http://git.kernel.org/tip/175729fc2c5144e9eee06b3483c5c9798f7062a5 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 7 Jul 2016 11:38:09 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 12 Jul 2016 15:19:58 -0300
perf tools: Remove needless includes from cache.h
The cache.h header doesn't use any of the definitions in some of the headers it includes, ditch them and fix the fallout, where files were getting stuff they needed just because they were including it, sometimes not using what it really exports at all.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/arch/common.c | 1 + tools/perf/tests/llvm.c | 1 + tools/perf/ui/gtk/util.c | 1 + tools/perf/ui/helpline.c | 1 + tools/perf/ui/tui/setup.c | 2 ++ tools/perf/util/alias.c | 1 + tools/perf/util/cache.h | 3 --- tools/perf/util/levenshtein.c | 4 +++- tools/perf/util/llvm-utils.c | 2 ++ tools/perf/util/path.c | 2 ++ tools/perf/util/target.c | 1 + 11 files changed, 15 insertions(+), 4 deletions(-)
tools/perf/arch/common.c +1 -0
@@ -1,6 +1,7 @@#include <stdio.h> #include <sys/utsname.h> #include "common.h" +#include "../util/util.h" #include "../util/debug.h" const char *const arm_triplets[] = {
tools/perf/tests/llvm.c +1 -0
@@ -5,6 +5,7 @@#include "llvm.h" #include "tests.h" #include "debug.h" +#include "util.h" #ifdef HAVE_LIBBPF_SUPPORT static int test__bpf_parsing (void *obj_buf,size_t obj_buf_sz)
tools/perf/ui/gtk/util.c +1 -0
@@ -1,4 +1,5 @@#include "../util.h" +#include "../../util/util.h" #include "../../util/debug.h" #include "gtk.h"
tools/perf/ui/helpline.c +1 -0
@@ -5,6 +5,7 @@#include "../debug.h" #include "helpline.h" #include "ui.h" +#include "../util.h" char ui_helpline__current[512 ];
tools/perf/ui/tui/setup.c +2 -0
@@ -1,3 +1,4 @@ +#include <errno.h> #include <signal.h> #include <stdbool.h> #ifdef HAVE_BACKTRACE_SUPPORT
@@ -6,6 +7,7 @@#include "../../util/cache.h" #include "../../util/debug.h" +#include "../../util/util.h" #include "../browser.h" #include "../helpline.h" #include "../ui.h"
tools/perf/util/alias.c +1 -0
@@ -1,4 +1,5 @@#include "cache.h" +#include "util.h" #include "config.h" static const char *alias_key;
tools/perf/util/cache.h +0 -3
@@ -1,11 +1,8 @@#ifndef __PERF_CACHE_H#define __PERF_CACHE_H -#include <stdbool.h> -#include "util.h" #include "strbuf.h" #include <subcmd/pager.h> -#include "../perf.h" #include "../ui/ui.h" #include <linux/string.h>
tools/perf/util/levenshtein.c +3 -1
@@ -1,5 +1,7 @@ -#include "cache.h" #include "levenshtein.h" +#include <errno.h> +#include <stdlib.h> +#include <string.h> /* * This function implements the Damerau-Levenshtein algorithm to
tools/perf/util/llvm-utils.c +2 -0
@@ -3,12 +3,14 @@* Copyright (C) 2015, Huawei Inc. */ +#include <errno.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include "debug.h" #include "llvm-utils.h" #include "config.h" +#include "util.h" #define CLANG_BPF_CMD_DEFAULT_TEMPLATE \ "$CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS "\
tools/perf/util/path.c +2 -0
@@ -11,6 +11,8 @@* which is what it's designed for. */ #include "cache.h" +#include "util.h" +#include <limits.h> static char bad_path[] ="/bad-path/" ;/*
tools/perf/util/target.c +1 -0
@@ -7,6 +7,7 @@*/ #include "target.h" +#include "util.h" #include "debug.h" #include <pwd.h>