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: pre-compiled modules


roland wrote:

> [...]  Indeed there are no convenient exported kernel interfaces for
> finding modules.  Short of probe-like techniques using the kernel's
> DWARF info to access unexported things, you can't do it all purely
> in the module itself.  [...]

Or, we could request some module-exported functions:

  // a composition of find_module and module_get
  struct module * module_get_byname (char *name) 

  // already exists, just needs an EXPORT ... or abuse symbol_put_addr() ?
  void module_put (struct module *)

Or perhaps a special module-load notifier could be invented that does
a callback for all currently loaded modules, not just future ones.


> Wacky as it is, what I actually recommend is this.  For each module
> of interest (containing probe targets or global variable addresses
> used by other probes), open
> "/sys/module/MODNAME/sections/.gnu.linkonce.this_module".  [...]

This may be workable for the medium term.  It would reinforce the
current requirent for user-space management for probe modules to even
start, which is unfortunate.


- FChE


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