aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/thread.h
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2013-11-18 13:32:47 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-27 14:58:37 -0300
commit1f3878c11ca8c9f2d9545ec6e1e6bb5386e0565f (patch)
treed08385884e1bdc128cf1054c199b977e8bf43818 /tools/perf/util/thread.h
parentperf symbols: Move idle syms check from top to generic function (diff)
downloadlinux-dev-1f3878c11ca8c9f2d9545ec6e1e6bb5386e0565f.tar.xz
linux-dev-1f3878c11ca8c9f2d9545ec6e1e6bb5386e0565f.zip
perf thread: Move comm_list check into function
Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384806771-2945-5-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r--tools/perf/util/thread.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h
index 897c1b2a750a..5b856bf942e1 100644
--- a/tools/perf/util/thread.h
+++ b/tools/perf/util/thread.h
@@ -6,6 +6,7 @@
#include <unistd.h>
#include <sys/types.h>
#include "symbol.h"
+#include <strlist.h>
struct thread {
union {
@@ -66,4 +67,15 @@ static inline void thread__set_priv(struct thread *thread, void *p)
{
thread->priv = p;
}
+
+static inline bool thread__is_filtered(struct thread *thread)
+{
+ if (symbol_conf.comm_list &&
+ !strlist__has_entry(symbol_conf.comm_list, thread__comm_str(thread))) {
+ return true;
+ }
+
+ return false;
+}
+
#endif /* __PERF_THREAD_H */