summaryrefslogtreecommitdiffstats
path: root/vl.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2016-02-09 19:49:05 +0300
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:46:50 -0600
commit92fa45f087d08de65ddc42c2b535fd81f207c5cf (patch)
tree7dd377631382a88023be52b6728488453baf86c6 /vl.c
parent25d2ac7ada8c981a87f25f4aef768598bcff6d5f (diff)
downloadhqemu-92fa45f087d08de65ddc42c2b535fd81f207c5cf.zip
hqemu-92fa45f087d08de65ddc42c2b535fd81f207c5cf.tar.gz
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 <pbonzini@redhat.com> 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 <den@openvz.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Alex Bennée <alex.bennee@linaro.org> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1455036545-14870-1-git-send-email-den@openvz.org CC: Alex Bennée <alex.bennee@linaro.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index 6fea089..f146bc5 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)) {
OpenPOWER on IntegriCloud