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: [PATCH 0/2] initscript: add support for uprobes scripts


On Fri, Aug 08, 2014 at 10:20:58AM -0700, Josh Stone wrote:
> On 08/07/2014 11:33 PM, Stefan Hajnoczi wrote:
> > The initscript currently fails for user-space probing scripts on systems where
> > uprobes.ko is built from source by stap(1).  This is because the initscript
> > uses a two-phase "compile and then run" approach:
> > 
> > The uprobes.ko module is generated during the compile phase but not copied into
> > the cache directory where modules are placed for the run phase.  The staprun(8)
> > command fails because the script module cannot be loaded without uprobes.ko.
> 
> This confused me at first, because uprobes.ko *is* cached with a
> kernel-hashed name -- see uprobes_pass() in buildrun.cxx.  But that's in
> SYSTEMTAP_DIR (default ~/.systemtap), and the initscript is talking
> about its own CACHE_PATH in /var/cache/systemtap.  So, ok.
> 
> I'm not terribly keen on using -k to find uprobes.  But at a minimum, if
> we do this, that "Keeping temp..." string is translatable, so you need
> to ensure stap runs in English.
> 
> It's already using -m, which triggers systemtap_session::save_module to
> copy the script module to $PWD at the end of passes_0_4() -- maybe this
> should also save uprobes.ko if needed?  Or we could add an explicit
> option to request this behavior.  Then the initscript can simply look in
> its own tmpdir to see if uprobes.ko was created.

An explicit stap option makes this cleaner since we don't have to manage
the temporary directory.

Will fix in v2.

Stefan

Attachment: pgpfX0sAnEXuC.pgp
Description: PGP signature


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