summaryrefslogtreecommitdiff
path: root/tools/perf/util/config.h
diff options
context:
space:
mode:
authorTaeung Song <treeze.taeung@gmail.com>2016-11-04 09:44:20 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-11-14 19:08:11 +0300
commitc6fc018a7a64c2c3ea56529fd8d0ca0f43408b0f (patch)
treeaa04093a5c7428ccca5cb8b8b5c498cb537445a4 /tools/perf/util/config.h
parent36662794bb520be828df8e2f3404264f5e7a7973 (diff)
downloadlinux-c6fc018a7a64c2c3ea56529fd8d0ca0f43408b0f.tar.xz
perf config: Add support setting variables in a config file
Add setting feature that can add config variables with their values to a config file (i.e. user or system config file) or modify config key-value pairs in a config file. For the syntax examples: perf config [<file-option>] [section.name[=value] ...] e.g. You can set the ui.show-headers to false with # perf config ui.show-headers=false If you want to add or modify several config items, you can do like # perf config annotate.show_nr_jumps=false kmem.default=slab Committer notes: Testing it: $ perf config -l top.children=true report.children=false $ $ perf config top.children=false $ perf config -l top.children=false report.children=false $ $ perf config kmem.default=slab $ perf config -l top.children=false report.children=false kmem.default=slab $ Signed-off-by: Taeung Song <treeze.taeung@gmail.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Nambong Ha <over3025@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Cc: Wookje Kwon <aweee0@gmail.com> Link: http://lkml.kernel.org/r/1478241862-31230-5-git-send-email-treeze.taeung@gmail.com [ Combined patch with docs update with this one ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/config.h')
-rw-r--r--tools/perf/util/config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/config.h b/tools/perf/util/config.h
index 6f813d46045e..0fcdb8c594b0 100644
--- a/tools/perf/util/config.h
+++ b/tools/perf/util/config.h
@@ -33,6 +33,8 @@ 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);
+int perf_config_set__collect(struct perf_config_set *set,
+ const char *var, const char *value);
void perf_config__init(void);
void perf_config__exit(void);
void perf_config__refresh(void);