Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754459AbZGUBfN (ORCPT ); Mon, 20 Jul 2009 21:35:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754162AbZGUBfN (ORCPT ); Mon, 20 Jul 2009 21:35:13 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:42464 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062AbZGUBfM (ORCPT ); Mon, 20 Jul 2009 21:35:12 -0400 Date: Mon, 20 Jul 2009 21:35:11 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Li Zefan cc: Frederic Weisbecker , Ingo Molnar , Tom Zanussi , LKML Subject: Re: [PATCH v2] tracing/filters: Improve subsystem filter In-Reply-To: <4A651907.1090805@cn.fujitsu.com> Message-ID: References: <4A63D485.7030703@cn.fujitsu.com> <4A651907.1090805@cn.fujitsu.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2184 Lines: 88 On Tue, 21 Jul 2009, Li Zefan wrote: > > 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". Ah, good point. Makes me feel even better about applying your patch ;-) > > > 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 That's a bit confusing. > > Proposal 2: > > # cat filter > irq_handler_entry: irq == 5 > irq_handler_exit: none > softirq_entry: vec == 1 > softirq_exit: vec == 2 I like proposal 2, it is very intuitive. > > 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) No need to show error messages of failed filter modifications in the "filter" file. > > 2: > # cat filter > irq == not_num > ^ > parse_error: Couldn't find or set field in one of a subsystem's events This looks good, BUT, it is too much. If you want to implement an error message like the above, it should probably be a "pr_info()" thing. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/