From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36138 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGsrw-0007N2-W9 for qemu-devel@nongnu.org; Tue, 25 May 2010 08:04:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGsrv-0007j8-Mz for qemu-devel@nongnu.org; Tue, 25 May 2010 08:04:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59746) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGsrv-0007im-Ak for qemu-devel@nongnu.org; Tue, 25 May 2010 08:04:23 -0400 Message-ID: <4BFBBCC3.2080905@redhat.com> Date: Tue, 25 May 2010 15:04:19 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1274783056-14759-1-git-send-email-stefanha@linux.vnet.ibm.com> <1274783056-14759-8-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1274783056-14759-8-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 7/7] trace: Trace virtqueue operations List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Jan Kiszka , Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org, Prerna Saxena On 05/25/2010 01:24 PM, Stefan Hajnoczi wrote: > This patch adds trace events for virtqueue operations including > adding/removing buffers, notifying the guest, and receiving a notify > from the guest. > > diff --git a/trace-events b/trace-events > index 48415f8..a533414 100644 > --- a/trace-events > +++ b/trace-events > @@ -35,6 +35,14 @@ qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu > qemu_valloc(size_t size, void *ptr) "size %zu ptr %p" > qemu_vfree(void *ptr) "ptr %p" > > +# hw/virtio.c > +virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned int idx) "vq %p elem %p len %u idx %u" > +virtqueue_flush(void *vq, unsigned int count) "vq %p count %u" > +virtqueue_pop(void *vq, void *elem, unsigned int in_num, unsigned int out_num) "vq %p elem %p in_num %u out_num %u" > +virtio_queue_notify(void *vdev, int n, void *vq) "vdev %p n %d vq %p" > +virtio_irq(void *vq) "vq %p" > +virtio_notify(void *vdev, void *vq) "vdev %p vq %p" > + > Those %ps are more or less useless. We need better ways of identifying them. Linux uses %pTYPE to pretty print arbitrary types. We could do something similar (not the same since we don't want our own printf implementation). -- error compiling committee.c: too many arguments to function