summaryrefslogtreecommitdiff
path: root/tools/perf/util/strfilter.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2015-04-24 18:47:46 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-04 12:43:54 -0300
commit3f51972c599cf95702819bd06a7a5412c523ebfe (patch)
treebdfc132e005bbc803352b96db2dfac1ca4b1ec6d /tools/perf/util/strfilter.h
parent4e60a2caefd1920867a84b978abc1eac118de596 (diff)
perf tools: Add strfilter__string to recover rules string
Add strfilter__string to recover rules string from strfilter. This will be good for debugging. Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20150424094746.23967.52434.stgit@localhost.localdomain Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/strfilter.h')
-rw-r--r--tools/perf/util/strfilter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/strfilter.h b/tools/perf/util/strfilter.h
index d007cdc2c68b..cff5eda88728 100644
--- a/tools/perf/util/strfilter.h
+++ b/tools/perf/util/strfilter.h
@@ -71,4 +71,13 @@ bool strfilter__compare(struct strfilter *filter, const char *str);
*/
void strfilter__delete(struct strfilter *filter);
+/**
+ * strfilter__string - Reconstruct a rule string from filter
+ * @filter: String filter to reconstruct
+ *
+ * Reconstruct a rule string from @filter. This will be good for
+ * debug messages. Note that returning string must be freed afterward.
+ */
+char *strfilter__string(struct strfilter *filter);
+
#endif