[for-next][PATCH 1/8] tracing: Have COMM event filter key be treated as a string

From: Steven Rostedt
Date: Wed Feb 15 2017 - 09:05:36 EST


From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>

The GLOB operation "~" should be able to work with the COMM filter key in
order to trace programs with a glob. For example

echo 'COMM ~ "systemd*"' > events/syscalls/filter

Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
---
kernel/trace/trace.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index afbec961eab1..d2d068b36341 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -1312,7 +1312,8 @@ static inline bool is_string_field(struct ftrace_event_field *field)
{
return field->filter_type == FILTER_DYN_STRING ||
field->filter_type == FILTER_STATIC_STRING ||
- field->filter_type == FILTER_PTR_STRING;
+ field->filter_type == FILTER_PTR_STRING ||
+ field->filter_type == FILTER_COMM;
}

static inline bool is_function_field(struct ftrace_event_field *field)
--
2.10.2