diff options
author | Taeung Song <treeze.taeung@gmail.com> | 2016-06-23 11:55:17 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-23 14:51:41 +0300 |
commit | 41840d211c518e6af6e327b03e09323824e563bf (patch) | |
tree | 095d4a688e27031a6df219d86eb3d70713566261 /tools/perf/util | |
parent | 48d8d5db4ac454e590ef7d440f456743d6cbaa94 (diff) | |
download | linux-41840d211c518e6af6e327b03e09323824e563bf.tar.xz |
perf config: Move config declarations from util/cache.h to util/config.h
Lately util/config.h has been added but util/cache.h has declarations of
functions and a global variable for config features.
To manage codes about configuration at one spot, move them to
util/config.h and let source files that need config features include
config.h And if the source files that included previous cache.h need
only config.h, remove including cache.h.
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1466672119-4852-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/alias.c | 1 | ||||
-rw-r--r-- | tools/perf/util/cache.h | 11 | ||||
-rw-r--r-- | tools/perf/util/color.c | 1 | ||||
-rw-r--r-- | tools/perf/util/config.h | 11 | ||||
-rw-r--r-- | tools/perf/util/help-unknown-cmd.c | 1 | ||||
-rw-r--r-- | tools/perf/util/intel-pt.c | 1 | ||||
-rw-r--r-- | tools/perf/util/llvm-utils.c | 1 |
7 files changed, 16 insertions, 11 deletions
diff --git a/tools/perf/util/alias.c b/tools/perf/util/alias.c index c0b43ee40d95..6c80f830358b 100644 --- a/tools/perf/util/alias.c +++ b/tools/perf/util/alias.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "config.h" static const char *alias_key; static char *alias_val; diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 369f382eedb6..9f90e36b56fb 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h @@ -18,17 +18,6 @@ #define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" #define PERF_PAGER_ENVIRONMENT "PERF_PAGER" -extern const char *config_exclusive_filename; - -typedef int (*config_fn_t)(const char *, const char *, void *); -int perf_default_config(const char *, const char *, void *); -int perf_config(config_fn_t fn, void *); -int perf_config_int(const char *, const char *); -u64 perf_config_u64(const char *, const char *); -int perf_config_bool(const char *, const char *); -int config_error_nonbool(const char *); -const char *perf_etc_perfconfig(void); - char *alias_lookup(const char *alias); int split_cmdline(char *cmdline, const char ***argv); diff --git a/tools/perf/util/color.c b/tools/perf/util/color.c index 43e84aa27e4a..1210ba555d07 100644 --- a/tools/perf/util/color.c +++ b/tools/perf/util/color.c @@ -1,5 +1,6 @@ #include <linux/kernel.h> #include "cache.h" +#include "config.h" #include "color.h" #include <math.h> diff --git a/tools/perf/util/config.h b/tools/perf/util/config.h index 22ec626ac718..155a441343e2 100644 --- a/tools/perf/util/config.h +++ b/tools/perf/util/config.h @@ -20,6 +20,17 @@ struct perf_config_set { struct list_head sections; }; +extern const char *config_exclusive_filename; + +typedef int (*config_fn_t)(const char *, const char *, void *); +int perf_default_config(const char *, const char *, void *); +int perf_config(config_fn_t fn, void *); +int perf_config_int(const char *, const char *); +u64 perf_config_u64(const char *, const char *); +int perf_config_bool(const char *, const char *); +int config_error_nonbool(const char *); +const char *perf_etc_perfconfig(void); + struct perf_config_set *perf_config_set__new(void); void perf_config_set__delete(struct perf_config_set *set); diff --git a/tools/perf/util/help-unknown-cmd.c b/tools/perf/util/help-unknown-cmd.c index d62ccaeeadd6..776e28562345 100644 --- a/tools/perf/util/help-unknown-cmd.c +++ b/tools/perf/util/help-unknown-cmd.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "config.h" #include <subcmd/help.h> #include "../builtin.h" #include "levenshtein.h" diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 137196990012..a2fe3a2194cc 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -39,6 +39,7 @@ #include "auxtrace.h" #include "tsc.h" #include "intel-pt.h" +#include "config.h" #include "intel-pt-decoder/intel-pt-log.h" #include "intel-pt-decoder/intel-pt-decoder.h" diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c index 878a566763c3..40b6f7269cb4 100644 --- a/tools/perf/util/llvm-utils.c +++ b/tools/perf/util/llvm-utils.c @@ -8,6 +8,7 @@ #include <stdlib.h> #include "debug.h" #include "llvm-utils.h" +#include "config.h" #define CLANG_BPF_CMD_DEFAULT_TEMPLATE \ "$CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS "\ |