]> sourceware.org Git - systemtap.git/commit
PR14706: Add proto-exec support in stapdyn
authorJosh Stone <jistone@redhat.com>
Thu, 7 Feb 2013 21:02:30 +0000 (13:02 -0800)
committerJosh Stone <jistone@redhat.com>
Thu, 7 Feb 2013 21:02:30 +0000 (13:02 -0800)
commitb9babf955cc5417688e2707bf798a87903b7f3ab
tree546067834cadaa609203ece499faec567a3e7400
parent9742efe20a9e21cedc5e5cb32f5a31de7ed3ca81
PR14706: Add proto-exec support in stapdyn

This adds preliminary support for stapdyn to follow execs, but the code
it instrument the new process is currently blocked out.  I'm seeing
dyninst hang during loadLibrary, waiting for IRPC, but haven't yet
figured out why.

* stapdyn/mutatee.cxx (mutatee_freezer): New helper to automatically
  stop a process and then continue it when leaving that scope.
  (mutatee::begin_callback): Use a mutatee_freezer.
  (mutatee::thread_callback): Use a mutatee_freezer.
  (mutatee::copy_forked_instrumentation): Use two mutatee_freezers.
  (mutatee::instrument_dynprobes): Support a flag to indicate this is
  post-exec, so first run any process.end probes from before exec.
  (mutatee::exec_reset_instrumentation): New, clear all members that are
  invalidated by the process exec.
* stapdyn/mutator.cxx (g_exec_callback): New global callback for execs.
  (mutator::exec_callback): New specific callback for execs.  Clear old
  instrumentation, then instrument it anew (buggy, #if 0 for now).
stapdyn/mutatee.cxx
stapdyn/mutatee.h
stapdyn/mutator.cxx
stapdyn/mutator.h
This page took 0.02634 seconds and 5 git commands to generate.