Skip to contentSkip to conversation

vl: fix tracing initialization

PATCH Applied Denis V. Lunev 5 participants 6 messages Feb 9, 2016 – Mar 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 <[email protected]>
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.

CC Alex Bennée <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Stefan Hajnoczi <[email protected]>
---
 vl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
vl.c +3 -4
index c581e39..ffaf8b7 100644
@@ -4098,6 +4098,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.
@@ -4118,10 +4121,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)) {
Signature · 1 line
2.5.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 13 lines · Denis V. Lunev

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 <[email protected]>
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

Quoted 6 lines

Spotted by Alex Bennée.

CC Alex Bennée <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Stefan Hajnoczi <[email protected]>

https://travis-ci.org/stsquad/qemu/builds/108114393

Quoted 19 lines
---
 vl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
vl.c +3 -0
index c581e39..ffaf8b7 100644
@@ -4098,6 +4098,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.

vl.c int main(int argc, char **argv, char **envp) · line 4126

Quoted 10 lines
vl.c +0 -4
@@ -4118,10 +4121,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)) {

--
Alex Bennée

Tested-by on v1 1/1
#2 lore raw
In reply to Denis V. Lunev
Quoted 13 lines · Denis V. Lunev

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 <[email protected]>
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

Quoted 6 lines

Spotted by Alex Bennée.

CC Alex Bennée <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Stefan Hajnoczi <[email protected]>
#3 lore raw
In reply to Denis V. Lunev
Quoted 15 lines · Denis V. Lunev

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 <[email protected]>
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.

Quoted 7 lines
CC Alex Bennée <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Stefan Hajnoczi <[email protected]>
---
 vl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan

#4 lore raw
Quoted 24 lines · Stefan Hajnoczi
Quoted 15 lines · Denis V. Lunev

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 <[email protected]>
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.

Quoted 7 lines
CC Alex Bennée <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Stefan Hajnoczi <[email protected]>
---
 vl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
Quoted 4 lines

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan

When is this scheduled for integration? Without that patch not only make check is broken, libvirt will also hang if qemu was build with --enable-trace-backends=simple during capability detection.

Christian

#5 lore raw
Quoted 28 lines · Christian Borntraeger
Quoted 27 lines · Stefan Hajnoczi
Quoted 15 lines · Denis V. Lunev

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 <[email protected]>
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.

Quoted 7 lines
CC Alex Bennée <[email protected]>
CC Paolo Bonzini <[email protected]>
CC Stefan Hajnoczi <[email protected]>
---
 vl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Quoted 6 lines
Quoted 1 line

Stefan

When is this scheduled for integration? Without that patch not only make check is broken, libvirt will also hang if qemu was build with --enable-trace-backends=simple during capability detection.

I am sending a tracing pull request with this patch today.

Stefan