diff options
author | Doug Evans <dje@google.com> | 2020-11-25 13:52:45 -0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2021-01-04 14:24:40 +0000 |
commit | 6745c8a01f759b64d3c4cd1e0a69bb793cead268 (patch) | |
tree | 7ce9ffa4fec5ccbe26729dc15b280316860fd58f /trace/control.c | |
parent | 41192db338588051f21501abc13743e62b0a5605 (diff) | |
download | qemu-6745c8a01f759b64d3c4cd1e0a69bb793cead268.zip qemu-6745c8a01f759b64d3c4cd1e0a69bb793cead268.tar.gz qemu-6745c8a01f759b64d3c4cd1e0a69bb793cead268.tar.bz2 |
trace: Send "-d trace:help" output to stdout
... for consistency with "-d help".
Signed-off-by: Doug Evans <dje@google.com>
Message-id: 20201125215245.3514695-1-dje@google.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace/control.c')
-rw-r--r-- | trace/control.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/trace/control.c b/trace/control.c index b82fb87..cd04dd4 100644 --- a/trace/control.c +++ b/trace/control.c @@ -125,18 +125,18 @@ TraceEvent *trace_event_iter_next(TraceEventIter *iter) return NULL; } -void trace_list_events(void) +void trace_list_events(FILE *f) { TraceEventIter iter; TraceEvent *ev; trace_event_iter_init(&iter, NULL); while ((ev = trace_event_iter_next(&iter)) != NULL) { - fprintf(stderr, "%s\n", trace_event_get_name(ev)); + fprintf(f, "%s\n", trace_event_get_name(ev)); } #ifdef CONFIG_TRACE_DTRACE - fprintf(stderr, "This list of names of trace points may be incomplete " - "when using the DTrace/SystemTap backends.\n" - "Run 'qemu-trace-stap list %s' to print the full list.\n", + fprintf(f, "This list of names of trace points may be incomplete " + "when using the DTrace/SystemTap backends.\n" + "Run 'qemu-trace-stap list %s' to print the full list.\n", error_get_progname()); #endif } @@ -176,7 +176,7 @@ static void do_trace_enable_events(const char *line_buf) void trace_enable_events(const char *line_buf) { if (is_help_option(line_buf)) { - trace_list_events(); + trace_list_events(stdout); if (monitor_cur() == NULL) { exit(0); } |