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 :|