Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757769AbZDPPyz (ORCPT ); Thu, 16 Apr 2009 11:54:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754988AbZDPPyn (ORCPT ); Thu, 16 Apr 2009 11:54:43 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:54078 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755854AbZDPPym (ORCPT ); Thu, 16 Apr 2009 11:54:42 -0400 Date: Thu, 16 Apr 2009 11:53:19 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Frederic Weisbecker cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Thomas Gleixner , Peter Zijlstra , Rusty Russell Subject: Re: [PATCH 1/5] ftrace: use module notifier for function tracer In-Reply-To: <20090416153618.GB6004@nowhere> Message-ID: References: <20090416021830.556671772@goodmis.org> <20090416021928.040177084@goodmis.org> <20090416153618.GB6004@nowhere> 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: 1350 Lines: 59 On Thu, 16 Apr 2009, Frederic Weisbecker wrote: > > > > +static int ftrace_module_notify(struct notifier_block *self, > > + unsigned long val, void *data) > > +{ > > + struct module *mod = data; > > + > > + switch (val) { > > + case MODULE_STATE_COMING: > > + ftrace_init_module(mod, mod->ftrace_callsites, > > + mod->ftrace_callsites + > > + mod->num_ftrace_callsites); > > + break; > > + case MODULE_STATE_GOING: > > + ftrace_release(mod->ftrace_callsites, > > + mod->ftrace_callsites + > > + mod->num_ftrace_callsites); > > + break; > > + } > > + > > + return 0; > > +} > > +#else > > +static int ftrace_module_notify(struct notifier_block *self, > > + unsigned long val, void *data) > > +{ > > + return 0; > > +} > > > > You don't seem to like my __init idea :) Nah, just forgot about it. > > > > > +#endif /* CONFIG_MODULES */ > > + > > +struct notifier_block ftrace_module_nb = { > > + .notifier_call = ftrace_module_notify, > > + .priority = 0, > > +}; > > + > > > > Neither the __initdata_or_module. Ooh, I never knew that existed. -- 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/