tracing: Have COMM event filter key be treated as a string
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 8 Feb 2017 18:36:37 +0000 (13:36 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 10 Feb 2017 19:19:45 +0000 (14:19 -0500)
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@goodmis.org>
kernel/trace/trace.h

index afbec96..d2d068b 100644 (file)
@@ -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)