* [Qemu-devel] Libvirt add ftrace option
@ 2016-08-16 14:03 Gadre Nayan
2016-08-16 14:18 ` Daniel P. Berrange
0 siblings, 1 reply; 6+ messages in thread
From: Gadre Nayan @ 2016-08-16 14:03 UTC (permalink / raw)
To: qemu-devel, qemu-discuss; +Cc: stefanha, Stefan Hajnoczi
Hi,
I am able to get traces from Guest kernel + QEMU + Host kernel using the
qemu -trace evetns=/tmp/events option
My complete command line is:
/home/gnayan/QEMU-devel/qemu-ubuntu/qemu/x86_64-softmmu/qemu-system-x86_64
-trace events=/home/gnayan/qemu_events -drive
file=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/ubuntu.img,if=virtio,format=raw
-drive file=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/u1.img,if=virtio,format=raw
-m 1G -net nic,model=virtio -net user -redir tcp:2222::22 -redir
udp:5050::5050 -enable-kvm
How can I get the same using libvirt based tools:
I create the domain using:
virt-install -n vm1 -r 1024 --disk
path=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/ubuntu.img,bus=virtio
--network network=default,model=virtio
Is the trace option available ?
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Libvirt add ftrace option
2016-08-16 14:03 [Qemu-devel] Libvirt add ftrace option Gadre Nayan
@ 2016-08-16 14:18 ` Daniel P. Berrange
2016-08-16 14:24 ` Gadre Nayan
0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2016-08-16 14:18 UTC (permalink / raw)
To: Gadre Nayan; +Cc: qemu-devel, qemu-discuss, Stefan Hajnoczi, stefanha
On Tue, Aug 16, 2016 at 07:33:30PM +0530, Gadre Nayan wrote:
> Hi,
>
> I am able to get traces from Guest kernel + QEMU + Host kernel using the
> qemu -trace evetns=/tmp/events option
>
> My complete command line is:
> /home/gnayan/QEMU-devel/qemu-ubuntu/qemu/x86_64-softmmu/qemu-system-x86_64
> -trace events=/home/gnayan/qemu_events -drive
> file=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/ubuntu.img,if=virtio,format=raw
> -drive file=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/u1.img,if=virtio,format=raw
> -m 1G -net nic,model=virtio -net user -redir tcp:2222::22 -redir
> udp:5050::5050 -enable-kvm
>
> How can I get the same using libvirt based tools:
>
> I create the domain using:
>
> virt-install -n vm1 -r 1024 --disk
> path=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/ubuntu.img,bus=virtio
> --network network=default,model=virtio
>
> Is the trace option available ?
With libvirt you should use the dtrace/systemtap backend instead as that's
far more flexible, not requiring changes to the QEMU configuration every
time you want to change what events are output.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Libvirt add ftrace option
2016-08-16 14:18 ` Daniel P. Berrange
@ 2016-08-16 14:24 ` Gadre Nayan
2016-08-16 14:35 ` Daniel P. Berrange
0 siblings, 1 reply; 6+ messages in thread
From: Gadre Nayan @ 2016-08-16 14:24 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: qemu-devel, qemu-discuss
Hi,
I have setup the merging of traces from Guest QEMU and Host using the
TSC_OFFSET. So I would like to work with ftrace backend of QEMU. So
how can I add this option in libvirt tools to enable ftrace backends
with my custom qemu source built using --enable-trace-backends=ftrace.
I would have to make changes to virt-install python script in the
virt-manager tools for starters ( to parse the trace options :). Where
else ?
Thanks
On Tue, Aug 16, 2016 at 7:48 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Tue, Aug 16, 2016 at 07:33:30PM +0530, Gadre Nayan wrote:
>> Hi,
>>
>> I am able to get traces from Guest kernel + QEMU + Host kernel using the
>> qemu -trace evetns=/tmp/events option
>>
>> My complete command line is:
>> /home/gnayan/QEMU-devel/qemu-ubuntu/qemu/x86_64-softmmu/qemu-system-x86_64
>> -trace events=/home/gnayan/qemu_events -drive
>> file=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/ubuntu.img,if=virtio,format=raw
>> -drive file=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/u1.img,if=virtio,format=raw
>> -m 1G -net nic,model=virtio -net user -redir tcp:2222::22 -redir
>> udp:5050::5050 -enable-kvm
>>
>> How can I get the same using libvirt based tools:
>>
>> I create the domain using:
>>
>> virt-install -n vm1 -r 1024 --disk
>> path=/home/gnayan/CUSTOM_QEMU_SYSTEM/UBUNTU/ubuntu.img,bus=virtio
>> --network network=default,model=virtio
>>
>> Is the trace option available ?
>
> With libvirt you should use the dtrace/systemtap backend instead as that's
> far more flexible, not requiring changes to the QEMU configuration every
> time you want to change what events are output.
>
> Regards,
> Daniel
> --
> |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org :|
> |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Libvirt add ftrace option
2016-08-16 14:24 ` Gadre Nayan
@ 2016-08-16 14:35 ` Daniel P. Berrange
2016-08-17 4:13 ` Gadre Nayan
0 siblings, 1 reply; 6+ messages in thread
From: Daniel P. Berrange @ 2016-08-16 14:35 UTC (permalink / raw)
To: Gadre Nayan; +Cc: qemu-devel, qemu-discuss
On Tue, Aug 16, 2016 at 07:54:50PM +0530, Gadre Nayan wrote:
> Hi,
>
> I have setup the merging of traces from Guest QEMU and Host using the
> TSC_OFFSET. So I would like to work with ftrace backend of QEMU. So
> how can I add this option in libvirt tools to enable ftrace backends
> with my custom qemu source built using --enable-trace-backends=ftrace.
>
> I would have to make changes to virt-install python script in the
> virt-manager tools for starters ( to parse the trace options :). Where
> else ?
The need to modify the downstream tools to statically configure
tracing parameters for VMs is exactly why we don't want to support
things like ftrace in libvirt and recommend use of fully dymamic
tracing like dtrace/systemd/ltt-ust.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Libvirt add ftrace option
2016-08-16 14:35 ` Daniel P. Berrange
@ 2016-08-17 4:13 ` Gadre Nayan
2016-08-17 8:56 ` Daniel P. Berrange
0 siblings, 1 reply; 6+ messages in thread
From: Gadre Nayan @ 2016-08-17 4:13 UTC (permalink / raw)
To: Daniel P. Berrange; +Cc: qemu-devel, qemu-discuss
Ok. so I will then shift to using system tap, Are the timestamps
generated for events compatible with the ftrace timestamps? so that I
can still merge the traces using TSC_OFFSET.
Thanks,
On Tue, Aug 16, 2016 at 8:05 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Tue, Aug 16, 2016 at 07:54:50PM +0530, Gadre Nayan wrote:
>> Hi,
>>
>> I have setup the merging of traces from Guest QEMU and Host using the
>> TSC_OFFSET. So I would like to work with ftrace backend of QEMU. So
>> how can I add this option in libvirt tools to enable ftrace backends
>> with my custom qemu source built using --enable-trace-backends=ftrace.
>>
>> I would have to make changes to virt-install python script in the
>> virt-manager tools for starters ( to parse the trace options :). Where
>> else ?
>
> The need to modify the downstream tools to statically configure
> tracing parameters for VMs is exactly why we don't want to support
> things like ftrace in libvirt and recommend use of fully dymamic
> tracing like dtrace/systemd/ltt-ust.
>
> Regards,
> Daniel
> --
> |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org -o- http://virt-manager.org :|
> |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] Libvirt add ftrace option
2016-08-17 4:13 ` Gadre Nayan
@ 2016-08-17 8:56 ` Daniel P. Berrange
0 siblings, 0 replies; 6+ messages in thread
From: Daniel P. Berrange @ 2016-08-17 8:56 UTC (permalink / raw)
To: Gadre Nayan; +Cc: qemu-devel, qemu-discuss
On Wed, Aug 17, 2016 at 09:43:10AM +0530, Gadre Nayan wrote:
> Ok. so I will then shift to using system tap, Are the timestamps
> generated for events compatible with the ftrace timestamps? so that I
> can still merge the traces using TSC_OFFSET.
I'm not sure what timestamps exactl you're using with ftrace, but systemtap
provides a range of time functions. See man pages for
function::get_cycles, function::jiffies, function::HZ, function::gettimeofday_us
function::ctime and more.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-17 8:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 14:03 [Qemu-devel] Libvirt add ftrace option Gadre Nayan
2016-08-16 14:18 ` Daniel P. Berrange
2016-08-16 14:24 ` Gadre Nayan
2016-08-16 14:35 ` Daniel P. Berrange
2016-08-17 4:13 ` Gadre Nayan
2016-08-17 8:56 ` Daniel P. Berrange
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.