Re: [PATCH v0] tracing: Allow triggers to filter for CPU ids and process names

From: Steven Rostedt
Date: Tue Aug 11 2015 - 18:28:18 EST


On Mon, 10 Aug 2015 14:35:46 +0200
Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> wrote:

> By extending the filter rules by more generic fields
> we can write triggers filters like
>
> echo 'stacktrace if cpu == 1' > \
> /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger
>
> or
>
> echo 'stacktrace if comm == sshd' > \
> /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger
>
> CPU and COMM are not part of struct trace_entry. We could add the two
> new fields to ftrace_common_field list and fix up all depending
> sides. But that looks pretty ugly. Another thing I would like to
> avoid that the 'format' file contents changes.
>
> All this can be avoided by introducing another list which contains
> non field members of struct trace_entry.
>
> Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx

v0? Expect more revisions? ;-)

Looks fine. I pulled it into my queue.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/