diff options
author | Taeung Song <treeze.taeung@gmail.com> | 2016-02-10 12:51:17 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-12 08:54:46 -0500 |
commit | c7ac24178c50a01f14eebcddf5c7b7a2e54676cc (patch) | |
tree | 0b9b6aa39456b4e83b91dc6c8a0648a6ea849ce7 /tools/perf/util/cache.h | |
parent | a7636d9ecfa3ab7800a7c04c1f89378229eff609 (diff) |
perf config: Add '--system' and '--user' options to select which config file is used
The '--system' option means $(sysconfdir)/perfconfig and '--user' means
$HOME/.perfconfig. If none is used, both system and user config file are
read. E.g.:
# perf config [<file-option>] [options]
With an specific config file:
# perf config --user | --system
or both user and system config file:
# perf config
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1455126685-32367-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cache.h')
-rw-r--r-- | tools/perf/util/cache.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index 07b5d63947b1..3ca453f0c51f 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" | 23 | #define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" |
24 | #define PERF_PAGER_ENVIRONMENT "PERF_PAGER" | 24 | #define PERF_PAGER_ENVIRONMENT "PERF_PAGER" |
25 | 25 | ||
26 | extern const char *config_exclusive_filename; | ||
27 | |||
26 | typedef int (*config_fn_t)(const char *, const char *, void *); | 28 | typedef int (*config_fn_t)(const char *, const char *, void *); |
27 | extern int perf_default_config(const char *, const char *, void *); | 29 | extern int perf_default_config(const char *, const char *, void *); |
28 | extern int perf_config(config_fn_t fn, void *); | 30 | extern int perf_config(config_fn_t fn, void *); |
@@ -31,6 +33,7 @@ extern u64 perf_config_u64(const char *, const char *); | |||
31 | extern int perf_config_bool(const char *, const char *); | 33 | extern int perf_config_bool(const char *, const char *); |
32 | extern int config_error_nonbool(const char *); | 34 | extern int config_error_nonbool(const char *); |
33 | extern const char *perf_config_dirname(const char *, const char *); | 35 | extern const char *perf_config_dirname(const char *, const char *); |
36 | extern const char *perf_etc_perfconfig(void); | ||
34 | 37 | ||
35 | char *alias_lookup(const char *alias); | 38 | char *alias_lookup(const char *alias); |
36 | int split_cmdline(char *cmdline, const char ***argv); | 39 | int split_cmdline(char *cmdline, const char ***argv); |