Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933014Ab0BEOos (ORCPT ); Fri, 5 Feb 2010 09:44:48 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.124]:57368 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932268Ab0BEOor (ORCPT ); Fri, 5 Feb 2010 09:44:47 -0500 X-Authority-Analysis: v=1.0 c=1 a=45efoH4BFn8A:10 a=7U3hwN5JcxgA:10 a=9Z1gkl8m1grKNVAiKDEA:9 a=va_0jIROo2jyHueNLpvwXh9H94oA:4 X-Cloudmark-Score: 0 X-Originating-IP: 74.67.89.75 Subject: Re: [PATCH 03/11] tracing: Inject lock_class_init events on registration From: Steven Rostedt Reply-To: rostedt@goodmis.org To: Peter Zijlstra Cc: Frederic Weisbecker , Ingo Molnar , LKML , Arnaldo Carvalho de Melo , Paul Mackerras , Hitoshi Mitake , Li Zefan , Lai Jiangshan , Masami Hiramatsu , Jens Axboe , Johannes Berg In-Reply-To: <1265380207.22001.654.camel@laptop> References: <1265188475-23509-1-git-send-regression-fweisbec@gmail.com> <1265188475-23509-4-git-send-regression-fweisbec@gmail.com> <1265379199.24386.26.camel@gandalf.stny.rr.com> <1265380207.22001.654.camel@laptop> Content-Type: text/plain; charset="ISO-8859-15" Organization: Kihon Technologies Inc. Date: Fri, 05 Feb 2010 09:44:44 -0500 Message-ID: <1265381084.24386.30.camel@gandalf.stny.rr.com> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1521 Lines: 43 On Fri, 2010-02-05 at 15:30 +0100, Peter Zijlstra wrote: > On Fri, 2010-02-05 at 09:13 -0500, Steven Rostedt wrote: > > register_event_callback("event", "command", command_func, > > command_enable_func, > > command_disable_func); > > > > Where command_func, command_enable_func and command_disable_func can all > > be a function pointer or NULL. > > > > command_func gets called every time the event is hit while enabled. > > > > command_enable_func gets called when the event is enabled > > > > command_disable_func gets called when the event is disabled. > > Well, that will solve johill's polling thing, but not work nicely with > the proposed collection iteration stuff. > Actually, johill and I decided that this was not the proper solution for him ;-) I wanted to do this so we could add a lot more functionality and flexibility to events. Start the tracer when this event is hit, stop in on that event, but only when the filters match. Things like that. And I'm sure people could come up with much better and more imaginative commands that would be useful for tracing. What does not fit with this proposal? I really hate adding more macros for every new feature or functionality we need. It is ugly and will become a maintenance nightmare. -- 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/