From: Denis V. Lunev Date: Tue, 9 Feb 2016 16:49:05 +0000 (+0300) Subject: vl: fix tracing initialization X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=62cb4145bbc71fcb9754034655a6c7327905efc4;p=qemu.git vl: fix tracing initialization we should call trace_init_backends() before trace_init_file() for CONFIG_TRACE_SIMPLE There is no difference for other cases. This problem was introduced by the commit commit 41fc57e44ed64cd4ab5393d83624afd897dabd4f Author: Paolo Bonzini Date: Thu Jan 7 16:55:24 2016 +0300 trace: split trace_init_file out of trace_init_backends 'make check' was failed as a result if configured with --enable-trace-backends=simple Spotted by Alex Bennée. Signed-off-by: Denis V. Lunev Reviewed-by: Alex Bennée Tested-by: Alex Bennée Tested-by: Christian Borntraeger Message-id: 1455036545-14870-1-git-send-email-den@openvz.org CC: Alex Bennée CC: Paolo Bonzini CC: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- diff --git a/vl.c b/vl.c index b87e29268c..adeddd98a6 100644 --- a/vl.c +++ b/vl.c @@ -4081,6 +4081,9 @@ int main(int argc, char **argv, char **envp) exit(0); } + if (!trace_init_backends()) { + exit(1); + } trace_init_file(trace_file); /* Open the logfile at this point and set the log mask if necessary. @@ -4101,10 +4104,6 @@ int main(int argc, char **argv, char **envp) qemu_set_log(0); } - if (!trace_init_backends()) { - exit(1); - } - /* If no data_dir is specified then try to find it relative to the executable path. */ if (data_dir_idx < ARRAY_SIZE(data_dir)) {