Re: [PATCH] tracing: Restore system filter behavior

From: Steven Rostedt
Date: Wed Nov 02 2011 - 14:22:51 EST


On Tue, 2011-11-01 at 09:09 +0800, Li Zefan wrote:
> Though not all events have field 'prev_pid', it was allowed to do this:
>
> # echo 'prev_pid == 100' > events/sched/filter
>
> but commit 75b8e98263fdb0bfbdeba60d4db463259f1fe8a2 (tracing/filter: Swap
> entire filter of events) broke it without any reason.

I wouldn't say "without any reason" as there was a reason.

But I'm not pleased with the way this all works still.

# echo 'prev_pid == 100' > /debug/tracing/events/sched/filter
# cat /debug/tracing/events/sched/filter
prev_pid == 100

# cat /debug/tracing/events/sched/sched_migrate_task/filter
none

# echo 'orig_cpu == 1' > /debug/tracing/events/sched/sched_migrate_task/filter
# cat /debug/tracing/events/sched/sched_migrate_task/filter
orig_cpu == 1

# cat /debug/tracing/events/sched/filter
prev_pid == 100


The above shows how things are just ambiguous. I have no problem in
using the top filter to set multiple events. But the top filter should
not keep the state of what was set. Perhaps just have system event
filters always show default text. Like:

# cat /debug/tracing/events/sched/filter
### global filter ###
# Use this to set multiple event filters
# Only affects events that have the event fields specified in the filter


I'll add your patch, but are you OK with the above always printing for
system event filters? Just to remove the ambiguous state.

-- 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/