]> xenbits.xensource.com Git - libvirt.git/commit
Rewrite all the DTrace/SystemTAP probing
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 30 Sep 2011 13:40:23 +0000 (14:40 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 11 Oct 2011 10:26:13 +0000 (11:26 +0100)
commitddf3bd32ce1246d466f4ffc12ee3a8e41db1d0e9
tree98998bc8e1cff6d964e7c47e73dd2b33077aeaaf
parentbc7b8c7e06c3d39b3fc7f73441ce5397292b2b47
Rewrite all the DTrace/SystemTAP probing

The libvirtd daemon had a few crude system tap probes. Some of
these were broken during the RPC rewrite. The new modular RPC
code is structured in a way that allows much more effective
tracing. Instead of trying to hook up the original probes,
define a new set of probes for the RPC and event code.

The master probes file is now src/probes.d.  This contains
probes for virNetServerClientPtr, virNetClientPtr, virSocketPtr
virNetTLSContextPtr and virNetTLSSessionPtr modules. Also add
probes for the poll event loop.

The src/dtrace2systemtap.pl script can convert the probes.d
file into a libvirt_probes.stp file to make use from systemtap
much simpler.

The src/rpc/gensystemtap.pl script can generate a set of
systemtap functions for translating RPC enum values into
printable strings. This works for all RPC header enums (program,
type, status, procedure) and also the authentication enum

The PROBE macro will automatically generate a VIR_DEBUG
statement, so any place with a PROBE can remove any existing
manual DEBUG statements.

* daemon/libvirtd.stp, daemon/probes.d: Remove obsolete probing
* daemon/libvirtd.h: Remove probe macros
* daemon/Makefile.am: Remove all probe buildings/install
* daemon/remote.c: Update authentication probes
* src/dtrace2systemtap.pl, src/rpc/gensystemtap.pl: Scripts
  to generate STP files
* src/internal.h: Add probe macros
* src/probes.d: Master list of probes
* src/rpc/virnetclient.c, src/rpc/virnetserverclient.c,
  src/rpc/virnetsocket.c, src/rpc/virnettlscontext.c,
  src/util/event_poll.c: Insert probe points, removing any
  DEBUG statements that duplicate the info
17 files changed:
cfg.mk
daemon/Makefile.am
daemon/libvirtd.h
daemon/libvirtd.stp [deleted file]
daemon/probes.d [deleted file]
daemon/remote.c
src/.gitignore
src/Makefile.am
src/dtrace2systemtap.pl [new file with mode: 0755]
src/internal.h
src/probes.d [new file with mode: 0644]
src/rpc/gensystemtap.pl [new file with mode: 0755]
src/rpc/virnetclient.c
src/rpc/virnetserverclient.c
src/rpc/virnetsocket.c
src/rpc/virnettlscontext.c
src/util/event_poll.c