aboutsummaryrefslogtreecommitdiff
path: root/qemu-io.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2016-10-04 14:35:52 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-10-12 09:52:50 +0200
commitfe4db84d49545e669806d0cce12b3aa384e04ac3 (patch)
treebb88e1c6c1f504c57c0131d9cc23b37538e1c40c /qemu-io.c
parent8ed5372874377af4a84a330eeaff1d9d663ca930 (diff)
trace: provide mechanism for registering trace events
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: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: LluĂ­s Vilanova <vilanova@ac.upc.edu> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-14-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qemu-io.c')
-rw-r--r--qemu-io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/qemu-io.c b/qemu-io.c
index db129eac5f..23a229f880 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -467,6 +467,7 @@ int main(int argc, char **argv)
signal(SIGPIPE, SIG_IGN);
#endif
+ module_call_init(MODULE_INIT_TRACE);
progname = basename(argv[0]);
qemu_init_exec_dir(argv[0]);