diff options
Diffstat (limited to 'trace/control.c')
-rw-r--r-- | trace/control.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/trace/control.c b/trace/control.c index bef7884ee1..84ea840892 100644 --- a/trace/control.c +++ b/trace/control.c @@ -14,6 +14,9 @@ #ifdef CONFIG_TRACE_FTRACE #include "trace/ftrace.h" #endif +#ifdef CONFIG_TRACE_LOG +#include "qemu/log.h" +#endif #include "qemu/error-report.h" int trace_events_enabled_count; @@ -174,6 +177,13 @@ void trace_init_file(const char *file) { #ifdef CONFIG_TRACE_SIMPLE st_set_trace_file(file); +#elif defined CONFIG_TRACE_LOG + /* If both the simple and the log backends are enabled, "-trace file" + * only applies to the simple backend; use "-D" for the log backend. + */ + if (file) { + qemu_set_log_filename(file); + } #else if (file) { fprintf(stderr, "error: -trace file=...: " |