diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-11-24 06:15:28 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-12-05 14:51:38 +0100 |
commit | c57c465800a9d193f9b41c97dbbbb6cd4fb08ff6 (patch) | |
tree | 727a83dbfe34beff4c41c1e11a3b9cd97b39377e /dma-helpers.c | |
parent | e94d13873334b1880746feca59ce84c0eabc1021 (diff) | |
download | qemu-c57c465800a9d193f9b41c97dbbbb6cd4fb08ff6.tar.gz qemu-c57c465800a9d193f9b41c97dbbbb6cd4fb08ff6.tar.bz2 qemu-c57c465800a9d193f9b41c97dbbbb6cd4fb08ff6.zip |
dma-helpers: Add trace events
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'dma-helpers.c')
-rw-r--r-- | dma-helpers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/dma-helpers.c b/dma-helpers.c index bdcd38cd27..9d6b6fa1fd 100644 --- a/dma-helpers.c +++ b/dma-helpers.c @@ -9,6 +9,7 @@ #include "dma.h" #include "block_int.h" +#include "trace.h" void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint) { @@ -83,6 +84,8 @@ static void dma_bdrv_unmap(DMAAIOCB *dbs) static void dma_complete(DMAAIOCB *dbs, int ret) { + trace_dma_complete(dbs, ret, dbs->common.cb); + dma_bdrv_unmap(dbs); if (dbs->common.cb) { dbs->common.cb(dbs->common.opaque, ret); @@ -106,6 +109,8 @@ static void dma_bdrv_cb(void *opaque, int ret) target_phys_addr_t cur_addr, cur_len; void *mem; + trace_dma_bdrv_cb(dbs, ret); + dbs->acb = NULL; dbs->sector_num += dbs->iov.size / 512; dma_bdrv_unmap(dbs); @@ -130,6 +135,7 @@ static void dma_bdrv_cb(void *opaque, int ret) } if (dbs->iov.size == 0) { + trace_dma_map_wait(dbs); cpu_register_map_client(dbs, continue_after_map_failure); return; } @@ -145,6 +151,8 @@ static void dma_aio_cancel(BlockDriverAIOCB *acb) { DMAAIOCB *dbs = container_of(acb, DMAAIOCB, common); + trace_dma_aio_cancel(dbs); + if (dbs->acb) { BlockDriverAIOCB *acb = dbs->acb; dbs->acb = NULL; @@ -168,6 +176,8 @@ BlockDriverAIOCB *dma_bdrv_io( { DMAAIOCB *dbs = qemu_aio_get(&dma_aio_pool, bs, cb, opaque); + trace_dma_bdrv_io(dbs, bs, sector_num, to_dev); + dbs->acb = NULL; dbs->bs = bs; dbs->sg = sg; |