This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]