[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 18/22] virtio-blk: add virtio_blk_handle_read trace
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 18/22] virtio-blk: add virtio_blk_handle_read trace event |
Date: |
Thu, 26 Jan 2012 17:38:12 +0100 |
From: Stefan Hajnoczi <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
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 5b416c3..a5a4396 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -346,6 +346,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 ad77e0a..75f6e17 100644
--- a/trace-events
+++ b/trace-events
@@ -83,6 +83,7 @@ qmp_block_stream(void *bs, void *job) "bs %p job %p"
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"
--
1.7.6.5
- [Qemu-devel] [PATCH 09/22] qmp: add block_stream command, (continued)
- [Qemu-devel] [PATCH 09/22] qmp: add block_stream command, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 02/22] block: replace unchecked strdup/malloc/calloc with glib, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 08/22] block: rate-limit streaming operations, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 06/22] block: add BlockJob interface for long-running operations, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 12/22] qmp: add query-block-jobs, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 07/22] block: add image streaming block job, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 15/22] add QERR_BASE_NOT_FOUND, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 11/22] qmp: add block_job_cancel command, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 19/22] block/vdi: Zero unused parts when allocating a new block (fix #919242), Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 13/22] blockdev: make image streaming safe across hotplug, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 18/22] virtio-blk: add virtio_blk_handle_read trace event,
Kevin Wolf <=
- [Qemu-devel] [PATCH 17/22] docs: describe live block operations, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 14/22] block: add bdrv_find_backing_image, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 21/22] qcow: Use bdrv functions to replace file operation, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 20/22] qcow: Return real error code in qcow_open, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 16/22] block: add support for partial streaming, Kevin Wolf, 2012/01/26
- [Qemu-devel] [PATCH 22/22] scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command, Kevin Wolf, 2012/01/26
- Re: [Qemu-devel] [PULL 00/22] Block patches, Anthony Liguori, 2012/01/27