From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdiiy-0004cg-CE for qemu-devel@nongnu.org; Thu, 22 Dec 2011 08:30:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rdiiu-0005G7-77 for qemu-devel@nongnu.org; Thu, 22 Dec 2011 08:30:20 -0500 Received: from mail-gx0-f173.google.com ([209.85.161.173]:39918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdiiu-0005G0-1x for qemu-devel@nongnu.org; Thu, 22 Dec 2011 08:30:16 -0500 Received: by ggnk1 with SMTP id k1so7254348ggn.4 for ; Thu, 22 Dec 2011 05:30:15 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4EF330E2.40508@redhat.com> Date: Thu, 22 Dec 2011 14:30:10 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1324559822-6553-1-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1324559822-6553-1-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio-blk: add virtio_blk_handle_read trace event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org On 12/22/2011 02:17 PM, Stefan Hajnoczi wrote: > There already exists a virtio_blk_handle_write trace event as well as > completion events. Add the virtio_blk_handle_read event so it's easy to > trace virtio-blk requests for both read and write operations. > > Signed-off-by: Stefan Hajnoczi > --- > hw/virtio-blk.c | 2 ++ > trace-events | 1 + > 2 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c > index ef27421..cf275e4 100644 > --- a/hw/virtio-blk.c > +++ b/hw/virtio-blk.c > @@ -340,6 +340,8 @@ static void virtio_blk_handle_read(VirtIOBlockReq *req) > > bdrv_acct_start(req->dev->bs,&req->acct, req->qiov.size, BDRV_ACCT_READ); > > + trace_virtio_blk_handle_read(req, sector, req->qiov.size / 512); > + > if (sector& req->dev->sector_mask) { > virtio_blk_rw_complete(req, -EIO); > return; > diff --git a/trace-events b/trace-events > index 514849a..2875ea8f6 100644 > --- a/trace-events > +++ b/trace-events > @@ -73,6 +73,7 @@ bdrv_co_copy_on_readv(void *bs, int64_t sector_num, int nb_sectors, int64_t clus > virtio_blk_req_complete(void *req, int status) "req %p status %d" > virtio_blk_rw_complete(void *req, int ret) "req %p ret %d" > virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu" > +virtio_blk_handle_read(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu" > > # posix-aio-compat.c > 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" Acked-by: Paolo Bonzini