qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH, RFC] trace: implement guest tracepoint passthro


From: Jan Kiszka
Subject: Re: [Qemu-devel] [PATCH, RFC] trace: implement guest tracepoint passthrough
Date: Wed, 31 Aug 2011 12:54:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

On 2011-08-31 11:08, Stefan Hajnoczi wrote:
> On Wed, Aug 31, 2011 at 11:38:50AM +0300, Avi Kivity wrote:
>> On 08/26/2011 10:06 PM, Blue Swirl wrote:
>>> Let guests inject tracepoint data via fw_cfg device.
>>>
>>>
>>
>> At least on x86, fw_cfg is pretty slow, involving multiple exits.
>> IMO, for kvm, even one exit per tracepoint is too high.  We need to
>> use a shared memory transport with a way to order guest/host events
>> later on (by using a clock).
> 
> It depends how you want to use this.  If you need it for guest firmware
> debugging or bringing up a new target, then this approach is fine.
> 
> But this is not a mechanism that is suitable for performance analysis or
> production tracing (the fact that the QEMU and guest software need to be
> built together in order to sync on event IDs is the killer).
> 
> Dhaval is looking at Linux guest tracing which is suitable for
> performance work.  This does not necessarily involve modifying QEMU.
> Currently he uses a hypercall but a virtio device would be possible too.
> The key thing is that it integrates with the host kernel tracing
> infrastructure so you get a unified trace instead of terminating in QEMU
> userspace.
> 
> So I see Blue's feature as a quick starting point for people who need to
> debug and hack guests.  It should be simple and easy to get going for
> QEMU developers, but is not suitable for other use.

We already have isa-debugcon or plain serial/virtio consoles. Should be
easy to derive e.g. some mmio-debugcon and to establish a chardev
backend that writes out trace events. I also think that fw_cfg is for,
well, configuration.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]