]> Git Repo - qemu.git/commitdiff
trace: Trace posix-aio-compat.c completion and cancellation
authorStefan Hajnoczi <[email protected]>
Mon, 7 Mar 2011 08:06:10 +0000 (08:06 +0000)
committerStefan Hajnoczi <[email protected]>
Mon, 7 Mar 2011 15:34:46 +0000 (15:34 +0000)
This patch adds paio_complete() and paio_cancel() trace events to
complement the paio_submit() event.

Signed-off-by: Stefan Hajnoczi <[email protected]>
posix-aio-compat.c
trace-events

index fa5494db8ceb683d037e969df5f0c1c7c753610a..6d4df9da300f79d0e4db1dec899a8ca2d155fa6f 100644 (file)
@@ -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);
index 0a26d6a94fd4f02c8c19631aa5e0fddef8eed3f7..90c9e0b5e772639bd529ee38b3fbf518c83b19e2 100644 (file)
@@ -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"
This page took 0.030663 seconds and 4 git commands to generate.