qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Cleber Rosa <crosa@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	qemu-block@nongnu.org, Doug Evans <dje@google.com>
Subject: Re: [PULL 1/5] trace: Send "-d trace:help" output to stdout
Date: Mon, 4 Jan 2021 16:12:01 +0100	[thread overview]
Message-ID: <3ad97bd8-d83d-27dd-0ac5-25766a31df8b@redhat.com> (raw)
In-Reply-To: <20210104143154.462212-2-stefanha@redhat.com>

On 1/4/21 3:31 PM, Stefan Hajnoczi wrote:
> From: Doug Evans <dje@google.com>
> 
> ... for consistency with "-d help".

Doh the request to make sense with this comment
got lost :/
https://www.mail-archive.com/qemu-devel@nongnu.org/msg765789.html

Not a big deal as the patch is trivial.

> 
> Signed-off-by: Doug Evans <dje@google.com>
> Message-id: 20201125215245.3514695-1-dje@google.com
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  trace/control.h |  3 ++-
>  trace/control.c | 12 ++++++------
>  2 files changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/trace/control.h b/trace/control.h
> index 05b95ea453..9522a7b318 100644
> --- a/trace/control.h
> +++ b/trace/control.h
> @@ -201,10 +201,11 @@ void trace_fini_vcpu(CPUState *vcpu);
>  
>  /**
>   * trace_list_events:
> + * @f: Where to send output.
>   *
>   * List all available events.
>   */
> -void trace_list_events(void);
> +void trace_list_events(FILE *f);
>  
>  /**
>   * trace_enable_events:
> diff --git a/trace/control.c b/trace/control.c
> index b82fb87316..cd04dd4e0c 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);
>          }
> 



  reply	other threads:[~2021-01-04 15:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 14:31 [PULL 0/5] Tracing patches Stefan Hajnoczi
2021-01-04 14:31 ` [PULL 1/5] trace: Send "-d trace:help" output to stdout Stefan Hajnoczi
2021-01-04 15:12   ` Philippe Mathieu-Daudé [this message]
2021-01-04 14:31 ` [PULL 2/5] tracetool: add output filename command-line argument Stefan Hajnoczi
2021-01-04 14:31 ` [PULL 3/5] tracetool: add out_lineno and out_next_lineno to out() Stefan Hajnoczi
2021-01-04 14:31 ` [PULL 4/5] tracetool: add input filename and line number to Event Stefan Hajnoczi
2021-01-04 14:31 ` [PULL 5/5] tracetool: show trace-events filename/lineno in fmt string errors Stefan Hajnoczi
2021-01-04 14:42 ` [PULL 0/5] Tracing patches no-reply
2021-01-05 16:18 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ad97bd8-d83d-27dd-0ac5-25766a31df8b@redhat.com \
    --to=philmd@redhat.com \
    --cc=crosa@redhat.com \
    --cc=dje@google.com \
    --cc=ehabkost@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).