diff options
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r-- | tools/perf/util/thread.h | 12 |
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 */ |