mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-01 04:07:13 +00:00
trace: Trace posix-aio-compat.c completion and cancellation
This patch adds paio_complete() and paio_cancel() trace events to complement the paio_submit() event. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
a13aac04e1
commit
ddca9fb2b5
@ -455,6 +455,9 @@ static int posix_aio_process_queue(void *opaque)
|
|||||||
} else {
|
} else {
|
||||||
ret = -ret;
|
ret = -ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trace_paio_complete(acb, acb->common.opaque, ret);
|
||||||
|
|
||||||
/* remove the request */
|
/* remove the request */
|
||||||
*pacb = acb->next;
|
*pacb = acb->next;
|
||||||
/* call the callback */
|
/* call the callback */
|
||||||
@ -537,6 +540,8 @@ static void paio_cancel(BlockDriverAIOCB *blockacb)
|
|||||||
struct qemu_paiocb *acb = (struct qemu_paiocb *)blockacb;
|
struct qemu_paiocb *acb = (struct qemu_paiocb *)blockacb;
|
||||||
int active = 0;
|
int active = 0;
|
||||||
|
|
||||||
|
trace_paio_cancel(acb, acb->common.opaque);
|
||||||
|
|
||||||
mutex_lock(&lock);
|
mutex_lock(&lock);
|
||||||
if (!acb->active) {
|
if (!acb->active) {
|
||||||
QTAILQ_REMOVE(&request_list, acb, node);
|
QTAILQ_REMOVE(&request_list, acb, node);
|
||||||
|
@ -62,6 +62,8 @@ disable virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "re
|
|||||||
|
|
||||||
# posix-aio-compat.c
|
# 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_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
|
# ioport.c
|
||||||
disable cpu_in(unsigned int addr, unsigned int val) "addr %#x value %u"
|
disable cpu_in(unsigned int addr, unsigned int val) "addr %#x value %u"
|
||||||
|
Loading…
Reference in New Issue
Block a user