• D
    Rewrite all the DTrace/SystemTAP probing · ddf3bd32
    Daniel P. Berrange 提交于
    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
    ddf3bd32
virnetserverclient.c 27.1 KB