Re: qemu/ftrace question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 20, 2017 at 10:12:14PM +0530, Prasun Ratn wrote:
> I am trying to get qemu events using ftrace but not seeing any events in the
> ftrace logs. I see kvm logs like the following but no qemu events such as virtio
> blk events. I'm using a locally compiled qemu version with ftrace
> backend enabled.
> 
> [001] d...  9290.926939: kvm_exit: reason HLT rip 0xffffffff81058e95 info 0 0
> 
> This is how I am enabling ftrace logs:
> 
>     echo 1 >/sys/kernel/debug/tracing/events/kvm/enable
>     echo 1 > /sys/kernel/debug/tracing/tracing_on
> 
>     # run cmd
>     $CMD

Please post the command-line.  You need to enable the events you are
interested in.  Either use the -trace option or via the HMP monitor
(trace-event NAME on|off)/QMP monitor (trace-event-set-state).

> 
>     # disable trace
>     echo 0 >/sys/kernel/debug/tracing/events/kvm/enable
>     echo 0 > /sys/kernel/debug/tracing/tracing_on
> 
>     # copy trace
>     echo Copying trace to $outfile
>     cp /sys/kernel/debug/tracing/trace $outfile
> 
> To debug, I build qemu with the 'log' backend, and I am able to see the
> appropriate events in /var/log/libvirt log files.
> 
> However if I rebuild qemu with ftrace backend, I don't see any events. Do I need
> to enable any other tracing events in /sys/kernel/debug/tracing? Do I need to
> run any qemu monitor cmds?
> 
> Any thing obvious I may be missing? Any debug steps recommended?

Did you strace -f QEMU to see if there are writes to the trace_marker
file?

If you see the write() syscalls then you need to double-check your
commands to set up and access /sys/kernel/debug/tracing.

If you do not see the write() syscalls then you need to check that you
build QEMU with the ftrace backend and enabled the trace events you are
interested in.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux