Skip to content

Latest commit

 

History

History

stapdyn

=== SystemTap pure userspace backend, using Dyninst ===

** This is still a work in progress, quite experimental! **

The goal of stapdyn is to create a backend of SystemTap that can operate
entirely in userspace.  Users should be able to run scripts on their own
processes without any special privilege on the system.

The set of available probes is of course limited from what a traditional
kernel-mode SystemTap can access.  So far there are the plain begin/end/error,
timers, uprobes-like process probes, and utrace-like process/thread begin/end.

Because Dyninst operates on top of ptrace, the usual systemwide mode of
operation is not really feasible, even on just one's own processes.  Instead,
stapdyn operates more like other ptracers (gdb, strace), where target apps
are launched directly, or attached to specific PIDs.

This code requires Dyninst 8.0 or later, including their development head.
More information about Dyninst can be found here:

- website: http://www.dyninst.org/ and http://www.paradyn.org/

- discussion: https://lists.cs.wisc.edu/mailman/options/dyninst-api/

- source: http://git.dyninst.org/?p=dyninst.git;a=summary
      or: git clone http://git.dyninst.org/dyninst.git

- bug tracker: https://bugs.dyninst.org/

Note that Dyninst uses the environment variable DYNINSTAPI_RT_LIB pointing to
your build of libdyninstAPI_RT.so.  We try to calculate it at runtime relative
to the dynamic libdyninstAPI.so location, but you can set this manually if
needed.  You may also need LD_LIBRARY_PATH to include the other libraries if
they're not installed in the system paths.

Major stapdyn known issues:
- PR14702 - dyninst breaks exception handling
- PR15049 - stapdyn mishandling interrupts
- PR15136 - stapdyn doesn't fill registers on 32-bit x86
- PR15614 - stapdyn only partially fills registers on ppc
See also sourceware.org/bugzilla product:systemtap component:dyninst.

For some more background on this project, see the presentations:

- PD Week 2012: Josh Stone
  Scripted Introspection with Dyninst
  http://www.dyninst.org/meetings/2012/monday

- LF Collab Summit 2012: Josh Stone
  SystemTap Sans Kernel
  https://events.linuxfoundation.org/events/collaboration-summit/slides-and-video

- Tracing Summit 2012: David Smith & Josh Stone
  Systemtap and new connections: dyninst, pcp, uprobes
  http://www.tracingsummit.org/wiki/TracingSummit2012

- PD Week 2013: Josh Stone & David Smith
  stapdyn: Porting SystemTap onto Dyninst
  http://research.cs.wisc.edu/htcondor/HTCondorWeek2013/monday_paradyn.html