public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Josh Stone <jistone@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, systemtap@sourceware.org
Cc: "Frank Ch. Eigler" <fche@redhat.com>, Jonathan Lebon <jlebon@redhat.com>
Subject: Re: [PATCH 0/2] initscript: add support for uprobes scripts
Date: Fri, 08 Aug 2014 17:21:00 -0000	[thread overview]
Message-ID: <53E506FA.6080008@redhat.com> (raw)
In-Reply-To: <1407479623-30970-1-git-send-email-stefanha@redhat.com>

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.

> These patches address the issue by copying uprobes.ko into the cache directory.
> If a script specifies the -u option in its initscript configuration file,
> staprun(8) will receive the path to uprobes.ko.
> 
> There is no change in behavior on systems that do not build uprobes.ko.
> 
> Stefan Hajnoczi (2):
>   initscript: copy uprobes.ko to cache directory
>   initscript: allow scripts to load uprobes
> 
>  initscript/systemtap.in | 24 +++++++++++++++++++++---
>  1 file changed, 21 insertions(+), 3 deletions(-)
> 

  parent reply	other threads:[~2014-08-08 17:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08  6:33 Stefan Hajnoczi
2014-08-08  6:33 ` [PATCH 2/2] initscript: allow scripts to load uprobes Stefan Hajnoczi
2014-08-08  6:33 ` [PATCH 1/2] initscript: copy uprobes.ko to cache directory Stefan Hajnoczi
2014-08-08  7:24 ` [PATCH 0/2] initscript: add support for uprobes scripts Masami Hiramatsu
2014-08-11 13:45   ` Stefan Hajnoczi
2014-08-08 17:21 ` Josh Stone [this message]
2014-08-11 13:20   ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E506FA.6080008@redhat.com \
    --to=jistone@redhat.com \
    --cc=fche@redhat.com \
    --cc=jlebon@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).