This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: About last_tsk in _stp_module_relocate
On Tue, 2009-12-29 at 11:42 -0500, Frank Ch. Eigler wrote:
> Mark Wielaard <mjw@redhat.com> writes:
>
> > [...]
> > I wasn't sure _stp_module_relocate couldn't be called simultaneously
> > from different threads/cpus. If it can then this caching might not be
> > safe.
>
> When it applied to only kernel modules, it was safe, since it was only
> used during script module initialization. Now that it's used for
> userspace too, the caching has to be made smp-safe or just removed.
In that case I think removing it completely is best for now, if it is
shown to be too slow in some cases we can try to reintroduce it or
rewrite some of the code (completely splitting dynamic/static
kernel/userspace lookups seems even better). The connection with module
loading/unloading was removed in commit 1b94bf which made all symbol
tables emitted at compile time. _stp_module_relocate is called from the
dwarf unwinder, and when doing some of the symbol lookup through
dwflpp::emit_adress now. I'll clean up the code and remove the cache.
Cheers,
mark