summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/strfilter.h
diff options
context:
space:
mode:
authorMasami Hiramatsu2015-04-24 11:47:46 +0200
committerArnaldo Carvalho de Melo2015-05-04 17:43:54 +0200
commit3f51972c599cf95702819bd06a7a5412c523ebfe (patch)
treebdfc132e005bbc803352b96db2dfac1ca4b1ec6d /tools/perf/util/strfilter.h
parentperf tools: Improve strfilter to append additional rules (diff)
downloadkernel-qcow2-linux-3f51972c599cf95702819bd06a7a5412c523ebfe.tar.gz
kernel-qcow2-linux-3f51972c599cf95702819bd06a7a5412c523ebfe.tar.xz
kernel-qcow2-linux-3f51972c599cf95702819bd06a7a5412c523ebfe.zip
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