diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2010-10-05 14:28:53 +0100 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-10-09 08:17:03 +0000 |
commit | bbf0a440813816410eeee465b71b37100b2ec9ca (patch) | |
tree | 2db13712657dfd63425e86f14f5e2924a9fce2bb | |
parent | ea9c16989b0c814d5dd2a09a576018a6aa320a27 (diff) | |
download | qemu-bbf0a440813816410eeee465b71b37100b2ec9ca.tar.gz qemu-bbf0a440813816410eeee465b71b37100b2ec9ca.tar.bz2 qemu-bbf0a440813816410eeee465b71b37100b2ec9ca.zip |
trace: Trace bdrv_aio_{readv,writev}
Observing block layer aio readv/writev operations is useful for
debugging image formats or understanding guest disk I/O patterns.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | block.c | 4 | ||||
-rw-r--r-- | trace-events | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -1983,6 +1983,8 @@ BlockDriverAIOCB *bdrv_aio_readv(BlockDriverState *bs, int64_t sector_num, BlockDriver *drv = bs->drv; BlockDriverAIOCB *ret; + trace_bdrv_aio_readv(bs, sector_num, nb_sectors, opaque); + if (!drv) return NULL; if (bdrv_check_request(bs, sector_num, nb_sectors)) @@ -2007,6 +2009,8 @@ BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num, BlockDriver *drv = bs->drv; BlockDriverAIOCB *ret; + trace_bdrv_aio_writev(bs, sector_num, nb_sectors, opaque); + if (!drv) return NULL; if (bs->read_only) diff --git a/trace-events b/trace-events index b43317e914..4300178f15 100644 --- a/trace-events +++ b/trace-events @@ -51,6 +51,8 @@ disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d" disable bdrv_aio_multiwrite(void *mcb, int num_callbacks, int num_reqs) "mcb %p num_callbacks %d num_reqs %d" disable bdrv_aio_multiwrite_earlyfail(void *mcb) "mcb %p" disable bdrv_aio_multiwrite_latefail(void *mcb, int i) "mcb %p i %d" +disable bdrv_aio_readv(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p" +disable bdrv_aio_writev(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p" # hw/virtio-blk.c disable virtio_blk_req_complete(void *req, int status) "req %p status %d" |