blob: 4300178f15d8505650b1962349f5bcd40d112863 [file] [log] [blame]
Stefan Hajnoczi94a420b2010-05-22 17:52:39 +01001# Trace events for debugging and performance instrumentation
2#
3# This file is processed by the tracetool script during the build.
4#
5# To add a new trace event:
6#
7# 1. Choose a name for the trace event. Declare its arguments and format
8# string.
9#
10# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
11# trace_multiwrite_cb(). The source file must #include "trace.h".
12#
13# Format of a trace event:
14#
Stefan Hajnoczi1e2cf2b2010-05-24 11:32:09 +010015# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
Stefan Hajnoczi94a420b2010-05-22 17:52:39 +010016#
17# Example: qemu_malloc(size_t size) "size %zu"
18#
Stefan Hajnoczi1e2cf2b2010-05-24 11:32:09 +010019# The "disable" keyword will build without the trace event.
20# In case of 'simple' trace backend, it will allow the trace event to be
21# compiled, but this would be turned off by default. It can be toggled on via
22# the monitor.
23#
Stefan Hajnoczi94a420b2010-05-22 17:52:39 +010024# The <name> must be a valid as a C function name.
25#
26# Types should be standard C types. Use void * for pointers because the trace
27# system may not have the necessary headers included.
28#
29# The <format-string> should be a sprintf()-compatible format string.
Stefan Hajnoczicd245a12010-05-22 18:09:25 +010030
31# qemu-malloc.c
32disable qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
33disable qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
34disable qemu_free(void *ptr) "ptr %p"
35
36# osdep.c
37disable qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
Blue Swirldda85212010-09-10 23:54:56 +030038disable qemu_vmalloc(size_t size, void *ptr) "size %zu ptr %p"
Stefan Hajnoczicd245a12010-05-22 18:09:25 +010039disable qemu_vfree(void *ptr) "ptr %p"
Stefan Hajnoczi6d519a52010-05-22 18:15:08 +010040
Stefan Hajnoczi64979a42010-05-24 13:19:21 +010041# hw/virtio.c
42disable virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned int idx) "vq %p elem %p len %u idx %u"
43disable virtqueue_flush(void *vq, unsigned int count) "vq %p count %u"
44disable virtqueue_pop(void *vq, void *elem, unsigned int in_num, unsigned int out_num) "vq %p elem %p in_num %u out_num %u"
45disable virtio_queue_notify(void *vdev, int n, void *vq) "vdev %p n %d vq %p"
46disable virtio_irq(void *vq) "vq %p"
47disable virtio_notify(void *vdev, void *vq) "vdev %p vq %p"
48
Stefan Hajnoczi6d519a52010-05-22 18:15:08 +010049# block.c
50disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d"
51disable bdrv_aio_multiwrite(void *mcb, int num_callbacks, int num_reqs) "mcb %p num_callbacks %d num_reqs %d"
52disable bdrv_aio_multiwrite_earlyfail(void *mcb) "mcb %p"
53disable bdrv_aio_multiwrite_latefail(void *mcb, int i) "mcb %p i %d"
Stefan Hajnoczibbf0a442010-10-05 14:28:53 +010054disable bdrv_aio_readv(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p"
55disable bdrv_aio_writev(void *bs, int64_t sector_num, int nb_sectors, void *opaque) "bs %p sector_num %"PRId64" nb_sectors %d opaque %p"
Stefan Hajnoczi6d519a52010-05-22 18:15:08 +010056
57# hw/virtio-blk.c
58disable virtio_blk_req_complete(void *req, int status) "req %p status %d"
59disable virtio_blk_rw_complete(void *req, int ret) "req %p ret %d"
Stefan Hajnoczi9a85d392010-10-05 14:28:50 +010060disable virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu"
Stefan Hajnoczi6d519a52010-05-22 18:15:08 +010061
62# posix-aio-compat.c
Stefan Hajnoczi9a85d392010-10-05 14:28:50 +010063disable 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"
Prerna Saxenabd3c9aa2010-08-11 17:15:11 +053064
65# ioport.c
66disable cpu_in(unsigned int addr, unsigned int val) "addr %#x value %u"
67disable cpu_out(unsigned int addr, unsigned int val) "addr %#x value %u"
Prerna Saxena62dd89d2010-08-11 17:16:03 +053068
69# balloon.c
70# Since requests are raised via monitor, not many tracepoints are needed.
71disable balloon_event(void *opaque, unsigned long addr) "opaque %p addr %lu"