• Daniel P. Berrange's avatar
    trace: provide mechanism for registering trace events · fe4db84d
    Daniel P. Berrange authored
    Remove the notion of there being a single global array
    of trace events, by introducing a method for registering
    groups of events.
    
    The module_call_init() needs to be invoked at the start
    of any program that wants to make use of the trace
    support. Currently this covers system emulators qemu-nbd,
    qemu-img and qemu-io.
    
    [Squashed the following fix from Daniel P. Berrange
    <berrange@redhat.com>:
    
    linux-user/bsd-user: initialize trace events subsystem
    
    The bsd-user/linux-user programs make use of the CPU emulation
    code and this now requires that the trace events subsystem
    is enabled, otherwise it'll crash trying to allocate an empty
    trace events bitmap for the CPU object.
    
    --Stefan]
    Reviewed-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: 's avatarLluís Vilanova <vilanova@ac.upc.edu>
    Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
    Message-id: 1475588159-30598-14-git-send-email-berrange@redhat.com
    Signed-off-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
    fe4db84d
control-internal.h 2.16 KB