]> sourceware.org Git - systemtap.git/commit - tapsets.cxx
Prototype support for inode-uretprobes
authorJosh Stone <jistone@redhat.com>
Fri, 2 Nov 2012 23:23:43 +0000 (16:23 -0700)
committerJosh Stone <jistone@redhat.com>
Mon, 5 Nov 2012 19:33:38 +0000 (11:33 -0800)
commit79af55c3e3d2488e592afd6f4c6d050b37e6f78e
tree812fad6d44ffaa4944e21b4d3049a1207f0bc2b0
parent98b6e6e7423df6649e3c722bf927b651a5019742
Prototype support for inode-uretprobes

Anton Arapov sent a test kernel build with new support for uretprobes,
and this patch adds stap support.  I've confirmed that it works on
x86_64, but i686 is crashing the target processes with SIGSEGV.

We need to find a dynamic (pass-2) way to detect the presence of
uretprobes in the kernel.  For now, I've just hacked it enabled, and it
will fail registration at runtime.

* buildrun.cxx (compile_pass): Autoconf uretprobes and its exports.
* runtime/linux/autoconf-inode-uretprobes.c: New, check for uretprobes.
* runtime/linux/runtime.h: Add function pointers for uretprobes.
* runtime/transport/transport.c (_stp_transport_init): Set the uretprobe
  function pointers if not exported.  (Anton's kernel does have exports,
  but we're prepared in case upstream doesn't accept those.)
* runtime/linux/uprobes-inode.c (stapiu_consumer): Let this double as
  either a uprobe_consumer or a uretprobe_consumer, chosen by return_p.
  (stapiu_probe_handler): Add a new generic function signature.
  (stapiu_uprobe_handler, stapiu_uretprobe_handler): New specific
  callbacks that mux into stapiu_probe_handler.
  (stapiu_register, stapiu_unregister): New functions to perform the
  appropriate kind of registration for a probe.
* tapsets.cxx (dwarf_builder::build): Hack the uretprobes check.
  (uprobe_derived_probe_group::emit_module_inode_decls): Use the new
  signature for the probe handler, and emit .return_p.
buildrun.cxx
runtime/linux/autoconf-inode-uretprobes.c [new file with mode: 0644]
runtime/linux/runtime.h
runtime/linux/uprobes-inode.c
runtime/transport/transport.c
tapsets.cxx
This page took 0.029057 seconds and 5 git commands to generate.