aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/strlist.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2016-01-09 19:16:27 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-01-12 12:42:07 -0300
commitdd8232bc9d13b729d92590b55befd14e49f81eca (patch)
tree5a5b1ac324ce83fb1f53cd2fb456106f4415aac4 /tools/perf/util/strlist.h
parentperf tools: Add more usage tips (diff)
downloadwireguard-linux-dd8232bc9d13b729d92590b55befd14e49f81eca.tar.xz
wireguard-linux-dd8232bc9d13b729d92590b55befd14e49f81eca.zip
perf tools: Add file_only config option to strlist
If strlist_config.dirname is present, the strlist__new() tries to load stirngs from dirname/list file first but if it failes it falls back to add 'list' as string. But sometimes it's not desired so adds new file_only field to prevent it. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1452334589-8782-2-git-send-email-namhyung@kernel.org [ Add documentation for strlist_config::file_only, in the struct definition */ Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/strlist.h')
-rw-r--r--tools/perf/util/strlist.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/util/strlist.h b/tools/perf/util/strlist.h
index 297565aa7535..ca990029e243 100644
--- a/tools/perf/util/strlist.h
+++ b/tools/perf/util/strlist.h
@@ -13,11 +13,18 @@ struct str_node {
struct strlist {
struct rblist rblist;
- bool dupstr;
+ bool dupstr;
+ bool file_only;
};
+/*
+ * @file_only: When dirname is present, only consider entries as filenames,
+ * that should not be added to the list if dirname/entry is not
+ * found
+ */
struct strlist_config {
bool dont_dupstr;
+ bool file_only;
const char *dirname;
};