All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] trace: Send "-d trace:help" output to stdout
@ 2020-11-25 21:52 Doug Evans via
  2020-12-10 11:25 ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Evans via @ 2020-11-25 21:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, Doug Evans

... for consistency with "-d help".

Signed-off-by: Doug Evans <dje@google.com>
---
 trace/control.c | 12 ++++++------
 trace/control.h |  3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

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);
         }
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:
-- 
2.29.2.454.gaff20da3a2-goog



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] trace: Send "-d trace:help" output to stdout
  2020-11-25 21:52 [PATCH 1/1] trace: Send "-d trace:help" output to stdout Doug Evans via
@ 2020-12-10 11:25 ` Stefan Hajnoczi
  2020-12-10 11:30   ` Philippe Mathieu-Daudé
  2020-12-11 21:55   ` Doug Evans
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2020-12-10 11:25 UTC (permalink / raw)
  To: Doug Evans; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

On Wed, Nov 25, 2020 at 01:52:45PM -0800, Doug Evans wrote:
> ... for consistency with "-d help".
> 
> Signed-off-by: Doug Evans <dje@google.com>
> ---
>  trace/control.c | 12 ++++++------
>  trace/control.h |  3 ++-
>  2 files changed, 8 insertions(+), 7 deletions(-)

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

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] trace: Send "-d trace:help" output to stdout
  2020-12-10 11:25 ` Stefan Hajnoczi
@ 2020-12-10 11:30   ` Philippe Mathieu-Daudé
  2020-12-11 21:55   ` Doug Evans
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-12-10 11:30 UTC (permalink / raw)
  To: Stefan Hajnoczi, Doug Evans; +Cc: qemu-devel

Hi Stefan,

On 12/10/20 12:25 PM, Stefan Hajnoczi wrote:
> On Wed, Nov 25, 2020 at 01:52:45PM -0800, Doug Evans wrote:
>> ... for consistency with "-d help".

Do you mind replacing the '...' by the subject:
'Send "-d trace:help" output to stdout', so the
commit description makes more sense?

Thanks,

Phil.

>>
>> Signed-off-by: Doug Evans <dje@google.com>
>> ---
>>  trace/control.c | 12 ++++++------
>>  trace/control.h |  3 ++-
>>  2 files changed, 8 insertions(+), 7 deletions(-)
> 
> Thanks, applied to my tracing tree:
> https://gitlab.com/stefanha/qemu/commits/tracing
> 
> Stefan
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] trace: Send "-d trace:help" output to stdout
  2020-12-10 11:25 ` Stefan Hajnoczi
  2020-12-10 11:30   ` Philippe Mathieu-Daudé
@ 2020-12-11 21:55   ` Doug Evans
  1 sibling, 0 replies; 4+ messages in thread
From: Doug Evans @ 2020-12-11 21:55 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Thanks.
I gather this is a first step in getting the patch into master?
If so, OOC, how many separate "staging" trees are there for the master
branch? (is there a list?)

On Thu, Dec 10, 2020 at 3:25 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:

> On Wed, Nov 25, 2020 at 01:52:45PM -0800, Doug Evans wrote:
> > ... for consistency with "-d help".
> >
> > Signed-off-by: Doug Evans <dje@google.com>
> > ---
> >  trace/control.c | 12 ++++++------
> >  trace/control.h |  3 ++-
> >  2 files changed, 8 insertions(+), 7 deletions(-)
>
> Thanks, applied to my tracing tree:
> https://gitlab.com/stefanha/qemu/commits/tracing
>
> Stefan
>

[-- Attachment #2: Type: text/html, Size: 1324 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-11 21:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 21:52 [PATCH 1/1] trace: Send "-d trace:help" output to stdout Doug Evans via
2020-12-10 11:25 ` Stefan Hajnoczi
2020-12-10 11:30   ` Philippe Mathieu-Daudé
2020-12-11 21:55   ` Doug Evans

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.