public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] initscript: add support for uprobes scripts
@ 2014-08-11 13:25 Stefan Hajnoczi
  2014-08-11 13:25 ` [PATCH v2 1/3] stap: add --save-uprobes Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Stefan Hajnoczi @ 2014-08-11 13:25 UTC (permalink / raw)
  To: systemtap
  Cc: Frank Ch. Eigler, Josh Stone, Jonathan Lebon, Masami Hiramatsu,
	Stefan Hajnoczi

v2:
 * Add Patch 1 with stap --save-uprobes option [Josh]
 * Switch from stap -k to stap --save-uprobes [Josh]

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.

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.  This
has been tested on RHEL6 (builds uprobes.ko) and RHEL7 (systemtap and does not
build uprobes.ko).

Stefan Hajnoczi (3):
  stap: add --save-uprobes
  initscript: copy uprobes.ko to cache directory
  initscript: allow scripts to load uprobes

 buildrun.cxx            |  4 +++-
 cmdline.cxx             |  1 +
 cmdline.h               |  1 +
 initscript/systemtap.in | 15 +++++++++++++++
 main.cxx                |  8 ++++++++
 session.cxx             | 10 ++++++++++
 session.h               |  2 ++
 7 files changed, 40 insertions(+), 1 deletion(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-09-04 15:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-11 13:25 [PATCH v2 0/3] initscript: add support for uprobes scripts Stefan Hajnoczi
2014-08-11 13:25 ` [PATCH v2 1/3] stap: add --save-uprobes Stefan Hajnoczi
2014-08-11 13:25 ` [PATCH v2 3/3] initscript: allow scripts to load uprobes Stefan Hajnoczi
2014-08-11 13:25 ` [PATCH v2 2/3] initscript: copy uprobes.ko to cache directory Stefan Hajnoczi
2014-09-01 12:15 ` [PATCH v2 0/3] initscript: add support for uprobes scripts Stefan Hajnoczi
2014-09-02 15:03   ` Jonathan Lebon
2014-09-03 12:46     ` Stefan Hajnoczi
2014-09-03 23:01       ` Jonathan Lebon
2014-09-03 23:22         ` Josh Stone
2014-09-03 23:44           ` [PATCH] Remove systemtap_session::built_uprobes Josh Stone
2014-09-04 11:13             ` Stefan Hajnoczi
2014-09-04 15:20             ` Jonathan Lebon

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).