PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data
Roland McGrath
roland@redhat.com
Fri Apr 24 06:08:00 GMT 2009
> So if we aren't going to track where these sections are mapped into
> kernel memory,
This is what you are already doing to compute probe locations.
I imagine you must use /sys/module/foo/sections/bar.
The address of each section is easy.
It's the size of the section that you don't need.
Once again, you need to do two things:
1. adjust used relocation bases at load time
You already do exactly this for probe insertion in modules.
It requires the runtime address of each section of interest,
which is readily available at runtime and already sampled by staprun.
All you need is to reuse the same machinery.
2. map PC to module at runtime: segment bounds from struct module have it
(You can even get the core segment's bounds from /proc/modules
in userland, if you are only handling post-init.)
These two things are not really related and what you need to do the one
does not equate to what you need to do the other. Where's the mystery?
Thanks,
Roland
More information about the Systemtap
mailing list