This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data
On Wed, Apr 22, 2009 at 01:07:57PM -0700, Roland McGrath wrote:
...
> > The only trick would be to track the init segments (assuming we support
> > probing those at the moment).
>
> I don't know what the status of init probes is. The init segment exists in
> memory only during the window where the initializer code runs. i.e.,
> between MODULE_STATE_COMING notifier and MODULE_STATE_LIVE notifier
> (or MODULE_STATE_GOING instead if the initializer fails).
>
> Just using the notifier, it would be simple enough to track which modules
> are in the middle of init and hold their struct module pointers. (There
> won't often be more than one at a time, but there could be.) From there,
> the ->module_init and ->init_size fields are handy.
Kprobes already has the intelligence to handle probes in module
init/exit sections. Masami's work recently on kprobes_module_callback
added this feature.
Ananth