lkml.org 
[lkml]   [2009]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-04-16 17:57    [W:0.567 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site