From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59065 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PwXVt-0003Mu-Aj for qemu-devel@nongnu.org; Mon, 07 Mar 2011 05:18:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PwXVp-0002qQ-II for qemu-devel@nongnu.org; Mon, 07 Mar 2011 05:18:03 -0500 Received: from mtagate4.uk.ibm.com ([194.196.100.164]:43793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PwXVp-0002pu-Ah for qemu-devel@nongnu.org; Mon, 07 Mar 2011 05:18:01 -0500 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate4.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p27AHxUn010875 for ; Mon, 7 Mar 2011 10:17:59 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p27AI4qx1282102 for ; Mon, 7 Mar 2011 10:18:12 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p27AHo74031362 for ; Mon, 7 Mar 2011 03:17:50 -0700 From: Stefan Hajnoczi Date: Mon, 7 Mar 2011 10:17:31 +0000 Message-Id: <1299493051-23647-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1299493051-23647-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1299493051-23647-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/2] trace: Trace posix-aio-compat.c completion and cancellation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi This patch adds paio_complete() and paio_cancel() trace events to complement the paio_submit() event. Signed-off-by: Stefan Hajnoczi --- posix-aio-compat.c | 5 +++++ trace-events | 2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/posix-aio-compat.c b/posix-aio-compat.c index fa5494d..6d4df9d 100644 --- a/posix-aio-compat.c +++ b/posix-aio-compat.c @@ -455,6 +455,9 @@ static int posix_aio_process_queue(void *opaque) } else { ret = -ret; } + + trace_paio_complete(acb, acb->common.opaque, ret); + /* remove the request */ *pacb = acb->next; /* call the callback */ @@ -537,6 +540,8 @@ static void paio_cancel(BlockDriverAIOCB *blockacb) struct qemu_paiocb *acb = (struct qemu_paiocb *)blockacb; int active = 0; + trace_paio_cancel(acb, acb->common.opaque); + mutex_lock(&lock); if (!acb->active) { QTAILQ_REMOVE(&request_list, acb, node); diff --git a/trace-events b/trace-events index 26e6915..414b04a 100644 --- a/trace-events +++ b/trace-events @@ -62,6 +62,8 @@ disable virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "re # posix-aio-compat.c disable paio_submit(void *acb, void *opaque, int64_t sector_num, int nb_sectors, int type) "acb %p opaque %p sector_num %"PRId64" nb_sectors %d type %d" +disable paio_complete(void *acb, void *opaque, int ret) "acb %p opaque %p ret %d" +disable paio_cancel(void *acb, void *opaque) "acb %p opaque %p" # ioport.c disable cpu_in(unsigned int addr, unsigned int val) "addr %#x value %u" -- 1.7.2.3