qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 3/3] trace: recommend "log" backend for getting started with tracing
Date: Wed, 16 Dec 2020 14:42:41 +0000	[thread overview]
Message-ID: <20201216144241.GA707467@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAFEAcA9nwUtgVF3-n=tfJ6JDTViP-G2XQhSWk-n-tEuV_aGvyQ@mail.gmail.com>

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

On Fri, Dec 11, 2020 at 03:06:17PM +0000, Peter Maydell wrote:
> On Wed, 9 Dec 2020 at 17:42, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > The "simple" backend is actually more complicated to use than the "log"
> > backend. Update the quickstart documentation to feature the "log"
> > backend instead of the "simple" backend.
> >
> > Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > ---
> >  docs/devel/tracing.rst | 19 ++++++++-----------
> >  1 file changed, 8 insertions(+), 11 deletions(-)
> >
> > diff --git a/docs/devel/tracing.rst b/docs/devel/tracing.rst
> > index 76cc1b24fa..039a0bb267 100644
> > --- a/docs/devel/tracing.rst
> > +++ b/docs/devel/tracing.rst
> > @@ -11,9 +11,9 @@ for debugging, profiling, and observing execution.
> >  Quickstart
> >  ==========
> >
> > -1. Build with the 'simple' trace backend::
> > +1. Build with the 'log' trace backend::
> >
> > -    ./configure --enable-trace-backends=simple
> > +    ./configure --enable-trace-backends=log
> >      make
> 
> Isn't this the default ?
> 
> It seems to me that the real "quickstart" is
> "your QEMU binary was likely already built with the log backend,
> so all you need to do is pass it '-trace eventname -trace eventname'
> or '-trace some-pattern*'" (or whatever the syntax is: I
> usually use -d trace=something but I assume we'd rather suggest
> -trace to new users ?)
> 
> We can suggest also "if you have a lot of events you might find
> it useful to put them in a file and use --trace events=file"
> but IME that's not the common case for "getting started with
> just outputting trace events" because you can usually enable
> a whole device's trace events with one suitable glob pattern.

Good idea, I'll simplify the quickstart section.

> >  2. Create a file with the events you want to trace::
> > @@ -24,10 +24,6 @@ Quickstart
> >
> >      qemu --trace events=/tmp/events ... # your normal QEMU invocation
> >
> > -4. Pretty-print the binary trace file::
> > -
> > -    ./scripts/simpletrace.py trace-events-all trace-* # Override * with QEMU <pid>
> > -
> >  Trace events
> >  ============
> >
> > @@ -195,7 +191,7 @@ script.
> >
> >  The trace backends are chosen at configure time::
> >
> > -    ./configure --enable-trace-backends=simple
> > +    ./configure --enable-trace-backends=log
> 
> 'log' is the default so we don't need to specifically suggest people
> select it as a configure argument.

Will fix.

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

      reply	other threads:[~2020-12-16 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 17:42 [PATCH 0/3] trace: convert docs to rST and feature "log" backend in quickstart Stefan Hajnoczi
2020-12-09 17:42 ` [PATCH 1/3] trace: fix simpletrace doc mismerge Stefan Hajnoczi
2020-12-11 14:54   ` Peter Maydell
2020-12-09 17:42 ` [PATCH 2/3] tracing: convert documentation to rST Stefan Hajnoczi
2020-12-11 15:00   ` Peter Maydell
2020-12-09 17:42 ` [PATCH 3/3] trace: recommend "log" backend for getting started with tracing Stefan Hajnoczi
2020-12-11 15:06   ` Peter Maydell
2020-12-16 14:42     ` Stefan Hajnoczi [this message]

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=20201216144241.GA707467@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).