aboutsummaryrefslogtreecommitdiff
path: root/trace/simple.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-05-27 08:56:13 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2020-06-24 11:21:00 +0100
commitdb25d56c014aa1a96319c663e0a60346a223b31e (patch)
tree71eba884363be7e000b42695fb7b20058f3bf327 /trace/simple.h
parentf892b494fafd39660679c1c4ef1dbe711a73df45 (diff)
trace/simple: Fix unauthorized enable
st_set_trace_file() accidentally enables tracing. It's called unconditionally during startup, which is why QEMU built with the simple trace backend always writes a trace file "trace-$PID". This has been broken for quite a while. I didn't track down the exact commit. Fix st_set_trace_file() to restore the state. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200527065613.25322-1-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/simple.h')
-rw-r--r--trace/simple.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/trace/simple.h b/trace/simple.h
index 5771a0634f..26ccbc8b8a 100644
--- a/trace/simple.h
+++ b/trace/simple.h
@@ -12,7 +12,7 @@
#define TRACE_SIMPLE_H
void st_print_trace_file_status(void);
-void st_set_trace_file_enabled(bool enable);
+bool st_set_trace_file_enabled(bool enable);
void st_set_trace_file(const char *file);
bool st_init(void);
void st_flush_trace_buffer(void);