Messages in this thread | | | Date | Thu, 16 Apr 2009 11:53:19 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: [PATCH 1/5] ftrace: use module notifier for function tracer |
| |
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
| |