aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/config.h
diff options
context:
space:
mode:
authorTaeung Song <treeze.taeung@gmail.com>2016-04-14 16:53:18 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-04-14 09:00:42 -0300
commit20105ca1240c3d3ac8cc79bf195022e5e5c1c3fb (patch)
tree6df34d0dddab226e68a47dd4e019cb6d2714b989 /tools/perf/util/config.h
parentperf record: Add '--timestamp-filename' option to append timestamp to output file name (diff)
downloadlinux-dev-20105ca1240c3d3ac8cc79bf195022e5e5c1c3fb.tar.xz
linux-dev-20105ca1240c3d3ac8cc79bf195022e5e5c1c3fb.zip
perf config: Introduce perf_config_set class
This infrastructure code was designed for upcoming features of 'perf config'. That collect config key-value pairs from user and system config files (i.e. user wide ~/.perfconfig and system wide $(sysconfdir)/perfconfig) to manage perf's configs. Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Taeung Song <treeze.taeung@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1460620401-23430-2-git-send-email-treeze.taeung@gmail.com 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.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/perf/util/config.h b/tools/perf/util/config.h
new file mode 100644
index 000000000000..22ec626ac718
--- /dev/null
+++ b/tools/perf/util/config.h
@@ -0,0 +1,26 @@
+#ifndef __PERF_CONFIG_H
+#define __PERF_CONFIG_H
+
+#include <stdbool.h>
+#include <linux/list.h>
+
+struct perf_config_item {
+ char *name;
+ char *value;
+ struct list_head node;
+};
+
+struct perf_config_section {
+ char *name;
+ struct list_head items;
+ struct list_head node;
+};
+
+struct perf_config_set {
+ struct list_head sections;
+};
+
+struct perf_config_set *perf_config_set__new(void);
+void perf_config_set__delete(struct perf_config_set *set);
+
+#endif /* __PERF_CONFIG_H */