From: Li Zefan <lizf@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Tom Zanussi <tzanussi@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] tracing/filters: Improve subsystem filter
Date: Tue, 21 Jul 2009 09:25:27 +0800 [thread overview]
Message-ID: <4A651907.1090805@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0907201230320.7595@gandalf.stny.rr.com>
Steven Rostedt wrote:
> On Mon, 20 Jul 2009, Steven Rostedt wrote:
>
>>
>> On Mon, 20 Jul 2009, Li Zefan wrote:
>>
>>> Currently a subsystem filter should be applicable to all events
>>> under the subsystem, and if it failed, all the event filters
>>> will be cleared. Those behaviors make subsys filter much less
>>> useful:
>>>
>>> # echo 'vec == 1' > irq/softirq_entry/filter
>>> # echo 'irq == 5' > irq/filter
>>> bash: echo: write error: Invalid argument
>>> # cat irq/softirq_entry/filter
>>> none
>>>
>>> I'd expect it set the filter for irq_handler_entry/exit, and
>>> not touch softirq_entry/exit.
>>>
>>> The basic idea is, try to see if the filter can be applied
>>> to which events, and then just apply to the those events:
>>>
>>> # echo 'vec == 1' > softirq_entry/filter
>>> # echo 'irq == 5' > filter
>>> # cat irq_handler_entry/filter
>>> irq == 5
>>> # cat softirq_entry/filter
>>> vec == 1
>
> OK, I tried this and it worked as you described, but it also does
> something that I did not like. Basically this:
>
> # echo 'vec == 1' > filter
> # cat softirq_entry/filter
> vec == 1
> # cat irq_handler_entry/filter
> none
> # cat filter
> vec == 1
> # echo 'irq == 5' > filter
> # cat irq_handler_entry/filter
> irq == 5
> # cat softirq_entry/filter
> vec == 1
> # cat filter
> irq == 5
>
>
> That last "cat filter" should show:
> vec == 1
> irq == 5
>
But I did not change the read semantic. For example, when
subsystem filter is not set at all:
# echo 'irq == 5' > irq_handler_entry/filter
# echo 'vec == 1' > softirq_entry/filter
# cat filter
none
It'll show "none".
> I can keep this version, since I do find it useful (I've now come to the
> conclusion that having the filter work only for those filters that it
> would work for is fine). But the top level filter should show all filters.
>
As I said in an old mail, I think the subsystem filter is much more
useful in "write" than in "read".
I have no strong option about its read semantic, but I can do what
you like.
Suppose:
irq_handler_entry/filter -> irq == 5
irq_handler_exit/filter -> none
softirq_entry/filter -> vec == 1
softirq_exit/filter -> vec == 2
Proposal 1:
# cat filter
irq == 5
vec == 1
vec == 2
Proposal 2:
# cat filter
irq_handler_entry: irq == 5
irq_handler_exit: none
softirq_entry: vec == 1
softirq_exit: vec == 2
Which do you think is better? Or do you have some better idea?
And in the failure case:
# echo 'irq == not_num' > filter
bash: echo: write error: Invalid argument
1:
# cat filter
(still shows filters in each event like above)
or shows error message (the current behavior)
2:
# cat filter
irq == not_num
^
parse_error: Couldn't find or set field in one of a subsystem's events
?
next prev parent reply other threads:[~2009-07-21 1:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-20 2:20 [PATCH v2] tracing/filters: Improve subsystem filter Li Zefan
2009-07-20 16:08 ` Steven Rostedt
2009-07-20 16:16 ` Frederic Weisbecker
2009-07-20 16:35 ` Steven Rostedt
2009-07-21 1:25 ` Li Zefan [this message]
2009-07-21 1:35 ` Steven Rostedt
2009-07-21 1:46 ` Li Zefan
2009-07-21 2:14 ` Steven Rostedt
2009-07-21 5:56 ` Tom Zanussi
2009-07-21 5:36 ` Tom Zanussi
2009-07-21 6:35 ` Li Zefan
2009-07-21 7:22 ` Tom Zanussi
2009-08-05 8:19 ` [tip:tracing/core] tracing/filters: improve " tip-bot for Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A651907.1090805@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tzanussi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox