qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Doug Gale <doug16k@gmail.com>
Cc: Eric Blake <eblake@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	keith.busch@intel.com, kwolf@redhat.com, qemu-block@nongnu.org,
	mreitz@redhat.com
Subject: Re: [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation
Date: Fri, 6 Oct 2017 15:01:37 +0100	[thread overview]
Message-ID: <20171006140137.GH26575@redhat.com> (raw)
In-Reply-To: <CAEfK_444_fPwjnj1M8w8XNFFwiMJW-pdN7R1Tdu+FfvB38ZBtw@mail.gmail.com>

On Fri, Oct 06, 2017 at 09:58:33AM -0400, Doug Gale wrote:
> I tried to get tracing to work before and I have never gotten it
> working. I'll give it another try and redo the patch with tracing
> infrastructure if necessary. The printf are nice because the dev can
> just look at the terminal where qemu is running. Can you view the
> trace output in realtime? When their code is sitting at a breakpoint
> in their driver, can they see the last thing that was traced right
> there? Or do they have to go run some cumbersome command and wade
> through it after an entire test run after the vm shut down?

There's a variety of trace backends available. By default QEMU enables
the 'log' backend these days. So with a default build of QEMU you can
use the '-d' arg to turn on printing: eg.:

   qemu-system-x86_64 ...args...    -d trace:qio*

and that'll turn on every tracepoint with 'qio' as a prefix. The
trace messages will be printed straight to the console. eg:

$ qemu-system-x86_64 -d trace:qio* -serial unix:/tmp/foo,server
15774@1507298448.842745:qio_channel_socket_new Socket new ioc=0x5598b0565d60
15774@1507298448.842757:qio_channel_socket_listen_sync Socket listen sync ioc=0x5598b0565d60 addr=0x5598b0565c50
15774@1507298448.842803:qio_channel_socket_listen_complete Socket listen complete ioc=0x5598b0565d60 fd=16
qemu-system-x86_64: -serial unix:/tmp/foo,server: info: QEMU waiting for connection on: disconnected:unix:/tmp/foo,server
15774@1507298448.842818:qio_channel_socket_new Socket new ioc=0x5598b0564060
15774@1507298448.842820:qio_channel_socket_accept Socket accept start ioc=0x5598b0565d60


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-10-06 14:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 23:18 [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation Doug Gale
2017-10-06  9:49 ` Kevin Wolf
2017-10-06 13:53   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-10-06 13:50 ` [Qemu-devel] " Eric Blake
2017-10-06 13:54   ` Daniel P. Berrange
2017-10-06 13:58     ` Doug Gale
2017-10-06 14:01       ` Daniel P. Berrange [this message]
2017-10-07  7:51         ` Doug Gale
2017-10-09 15:52           ` Eric Blake
2017-10-09 18:44             ` Doug Gale
2017-10-10  6:58               ` Markus Armbruster
2017-10-10  8:02                 ` Kevin Wolf
2017-10-11 13:03                   ` Doug Gale
2017-10-11 13:08                   ` Peter Maydell
2017-10-11 19:46                     ` [Qemu-devel] [Qemu-block] " Paolo Bonzini

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=20171006140137.GH26575@redhat.com \
    --to=berrange@redhat.com \
    --cc=doug16k@gmail.com \
    --cc=eblake@redhat.com \
    --cc=keith.busch@intel.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.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).