summaryrefslogtreecommitdiff
path: root/trace-events
blob: b424944e9518df9ad1b067e39fd1924bfa4a692e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# Trace events for debugging and performance instrumentation
#
# This file is processed by the tracetool script during the build.
#
# To add a new trace event:
#
# 1. Choose a name for the trace event.  Declare its arguments and format
#    string.
#
# 2. Call the trace event from code using trace_##name, e.g. multiwrite_cb() ->
#    trace_multiwrite_cb().  The source file must #include "trace.h".
#
# Format of a trace event:
#
# [disable] <name>(<type1> <arg1>[, <type2> <arg2>] ...) "<format-string>"
#
# Example: qemu_malloc(size_t size) "size %zu"
#
# The "disable" keyword will build without the trace event.
# In case of 'simple' trace backend, it will allow the trace event to be
# compiled, but this would be turned off by default. It can be toggled on via
# the monitor.
#
# The <name> must be a valid as a C function name.
#
# Types should be standard C types.  Use void * for pointers because the trace
# system may not have the necessary headers included.
#
# The <format-string> should be a sprintf()-compatible format string.

# qemu-malloc.c
disable qemu_malloc(size_t size, void *ptr) "size %zu ptr %p"
disable qemu_realloc(void *ptr, size_t size, void *newptr) "ptr %p size %zu newptr %p"
disable qemu_free(void *ptr) "ptr %p"

# osdep.c
disable qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
disable qemu_vmalloc(size_t size, void *ptr) "size %zu ptr %p"
disable qemu_vfree(void *ptr) "ptr %p"

# qemu-timer.c
disable qemu_mod_timer(void *ptr, int64_t expire, int64_t interval) "ptr %p expire %d interval %d"
disable qemu_run_timer(void *ptr, int64_t expire, int64_t current_time) "ptr %p expire %d current_time %d"
disable multiticks_assign(void *ptr, int source) "ptr %p source %d"
disable multiticks_reap(int source, int64_t prog, int64_t interval) "source %d prog %d intrval %d"
disable multiticks_program(void *ptr, int64_t expire, int64_t interval) "ptr %p expire %d interval %d"
disable multiticks_inband(void *ptr, int64_t low, int64_t high, int64_t fire) "ptr %p low %d high %d fire %d"
disable multiticks_outofband(void *ptr, int64_t low, int64_t high, int64_t fire) "ptr %p low %d high %d fire %d"

# hw/virtio.c
disable virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned int idx) "vq %p elem %p len %u idx %u"
disable virtqueue_flush(void *vq, unsigned int count) "vq %p count %u"
disable virtqueue_pop(void *vq, void *elem, unsigned int in_num, unsigned int out_num) "vq %p elem %p in_num %u out_num %u"
disable virtio_queue_notify(void *vdev, int n, void *vq) "vdev %p n %d vq %p"
disable virtio_irq(void *vq) "vq %p"
disable virtio_notify(void *vdev, void *vq) "vdev %p vq %p"

# block.c
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"
disable virtio_blk_rw_complete(void *req, int ret) "req %p ret %d"
disable virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu"

# 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"

# ioport.c
disable cpu_in(unsigned int addr, unsigned int val) "addr %#x value %u"
disable cpu_out(unsigned int addr, unsigned int val) "addr %#x value %u"

# balloon.c
# Since requests are raised via monitor, not many tracepoints are needed.
disable balloon_event(void *opaque, unsigned long addr) "opaque %p addr %lu"

# hw/apic.c
disable apic_local_deliver(int vector, uint32_t lvt) "vector %d delivery mode %d"
disable apic_deliver_irq(uint8_t dest, uint8_t dest_mode, uint8_t delivery_mode, uint8_t vector_num, uint8_t polarity, uint8_t trigger_mode) "dest %d dest_mode %d delivery_mode %d vector %d polarity %d trigger_mode %d"
disable cpu_set_apic_base(uint64_t val) "%016"PRIx64""
disable cpu_get_apic_base(uint64_t val) "%016"PRIx64""
disable apic_mem_readl(uint64_t addr, uint32_t val)  "%"PRIx64" = %08x"
disable apic_mem_writel(uint64_t addr, uint32_t val) "%"PRIx64" = %08x"
# coalescing
disable apic_reset_irq_delivered(int apic_irq_delivered) "old coalescing %d"
disable apic_get_irq_delivered(int apic_irq_delivered) "returning coalescing %d"
disable apic_set_irq(int apic_irq_delivered) "coalescing %d"

# hw/cs4231.c
disable cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret) "read dreg %d: 0x%02x"
disable cs4231_mem_readl_reg(uint32_t reg, uint32_t ret) "read reg %d: 0x%08x"
disable cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: 0x%08x -> 0x%08x"
disable cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: 0x%02x -> 0x%02x"

# hw/eccmemctl.c
disable ecc_mem_writel_mer(uint32_t val) "Write memory enable %08x"
disable ecc_mem_writel_mdr(uint32_t val) "Write memory delay %08x"
disable ecc_mem_writel_mfsr(uint32_t val) "Write memory fault status %08x"
disable ecc_mem_writel_vcr(uint32_t val) "Write slot configuration %08x"
disable ecc_mem_writel_dr(uint32_t val) "Write diagnostic %08x"
disable ecc_mem_writel_ecr0(uint32_t val) "Write event count 1 %08x"
disable ecc_mem_writel_ecr1(uint32_t val) "Write event count 2 %08x"
disable ecc_mem_readl_mer(uint32_t ret) "Read memory enable %08x"
disable ecc_mem_readl_mdr(uint32_t ret) "Read memory delay %08x"
disable ecc_mem_readl_mfsr(uint32_t ret) "Read memory fault status %08x"
disable ecc_mem_readl_vcr(uint32_t ret) "Read slot configuration %08x"
disable ecc_mem_readl_mfar0(uint32_t ret) "Read memory fault address 0 %08x"
disable ecc_mem_readl_mfar1(uint32_t ret) "Read memory fault address 1 %08x"
disable ecc_mem_readl_dr(uint32_t ret) "Read diagnostic %08x"
disable ecc_mem_readl_ecr0(uint32_t ret) "Read event count 1 %08x"
disable ecc_mem_readl_ecr1(uint32_t ret) "Read event count 2 %08x"
disable ecc_diag_mem_writeb(uint64_t addr, uint32_t val) "Write diagnostic %"PRId64" = %02x"
disable ecc_diag_mem_readb(uint64_t addr, uint32_t ret) "Read diagnostic %"PRId64"= %02x"

# hw/lance.c
disable lance_mem_readw(uint64_t addr, uint32_t ret) "addr=%"PRIx64"val=0x%04x"
disable lance_mem_writew(uint64_t addr, uint32_t val) "addr=%"PRIx64"val=0x%04x"

# hw/slavio_intctl.c
disable slavio_intctl_mem_readl(uint32_t cpu, uint64_t addr, uint32_t ret) "read cpu %d reg 0x%"PRIx64" = %x"
disable slavio_intctl_mem_writel(uint32_t cpu, uint64_t addr, uint32_t val) "write cpu %d reg 0x%"PRIx64" = %x"
disable slavio_intctl_mem_writel_clear(uint32_t cpu, uint32_t val, uint32_t intreg_pending) "Cleared cpu %d irq mask %x, curmask %x"
disable slavio_intctl_mem_writel_set(uint32_t cpu, uint32_t val, uint32_t intreg_pending) "Set cpu %d irq mask %x, curmask %x"
disable slavio_intctlm_mem_readl(uint64_t addr, uint32_t ret) "read system reg 0x%"PRIx64" = %x"
disable slavio_intctlm_mem_writel(uint64_t addr, uint32_t val) "write system reg 0x%"PRIx64" = %x"
disable slavio_intctlm_mem_writel_enable(uint32_t val, uint32_t intregm_disabled) "Enabled master irq mask %x, curmask %x"
disable slavio_intctlm_mem_writel_disable(uint32_t val, uint32_t intregm_disabled) "Disabled master irq mask %x, curmask %x"
disable slavio_intctlm_mem_writel_target(uint32_t cpu) "Set master irq cpu %d"
disable slavio_check_interrupts(uint32_t pending, uint32_t intregm_disabled) "pending %x disabled %x"
disable slavio_set_irq(uint32_t target_cpu, int irq, uint32_t pil, int level) "Set cpu %d irq %d -> pil %d level %d"
disable slavio_set_timer_irq_cpu(int cpu, int level) "Set cpu %d local timer level %d"

# hw/slavio_misc.c
disable slavio_misc_update_irq_raise(void) "Raise IRQ"
disable slavio_misc_update_irq_lower(void) "Lower IRQ"
disable slavio_set_power_fail(int power_failing, uint8_t config) "Power fail: %d, config: %d"
disable slavio_cfg_mem_writeb(uint32_t val) "Write config %02x"
disable slavio_cfg_mem_readb(uint32_t ret) "Read config %02x"
disable slavio_diag_mem_writeb(uint32_t val) "Write diag %02x"
disable slavio_diag_mem_readb(uint32_t ret) "Read diag %02x"
disable slavio_mdm_mem_writeb(uint32_t val) "Write modem control %02x"
disable slavio_mdm_mem_readb(uint32_t ret) "Read modem control %02x"
disable slavio_aux1_mem_writeb(uint32_t val) "Write aux1 %02x"
disable slavio_aux1_mem_readb(uint32_t ret) "Read aux1 %02x"
disable slavio_aux2_mem_writeb(uint32_t val) "Write aux2 %02x"
disable slavio_aux2_mem_readb(uint32_t ret) "Read aux2 %02x"
disable apc_mem_writeb(uint32_t val) "Write power management %02x"
disable apc_mem_readb(uint32_t ret) "Read power management %02x"
disable slavio_sysctrl_mem_writel(uint32_t val) "Write system control %08x"
disable slavio_sysctrl_mem_readl(uint32_t ret) "Read system control %08x"
disable slavio_led_mem_writew(uint32_t val) "Write diagnostic LED %04x"
disable slavio_led_mem_readw(uint32_t ret) "Read diagnostic LED %04x"

# hw/slavio_timer.c
disable slavio_timer_get_out(uint64_t limit, uint32_t counthigh, uint32_t count) "limit %"PRIx64" count %x%08x"
disable slavio_timer_irq(uint32_t counthigh, uint32_t count) "callback: count %x%08x"
disable slavio_timer_mem_readl_invalid(uint64_t addr) "invalid read address %"PRIx64""
disable slavio_timer_mem_readl(uint64_t addr, uint32_t ret) "read %"PRIx64" = %08x"
disable slavio_timer_mem_writel(uint64_t addr, uint32_t val) "write %"PRIx64" = %08x"
disable slavio_timer_mem_writel_limit(unsigned int timer_index, uint64_t count) "processor %d user timer set to %016"PRIx64""
disable slavio_timer_mem_writel_counter_invalid(void) "not user timer"
disable slavio_timer_mem_writel_status_start(unsigned int timer_index) "processor %d user timer started"
disable slavio_timer_mem_writel_status_stop(unsigned int timer_index) "processor %d user timer stopped"
disable slavio_timer_mem_writel_mode_user(unsigned int timer_index) "processor %d changed from counter to user timer"
disable slavio_timer_mem_writel_mode_counter(unsigned int timer_index) "processor %d changed from user timer to counter"
disable slavio_timer_mem_writel_mode_invalid(void) "not system timer"
disable slavio_timer_mem_writel_invalid(uint64_t addr) "invalid write address %"PRIx64""

# hw/sparc32_dma.c
disable ledma_memory_read(uint64_t addr) "DMA read addr 0x%"PRIx64""
disable ledma_memory_write(uint64_t addr) "DMA write addr 0x%"PRIx64""
disable sparc32_dma_set_irq_raise(void) "Raise IRQ"
disable sparc32_dma_set_irq_lower(void) "Lower IRQ"
disable espdma_memory_read(uint32_t addr) "DMA read addr 0x%08x"
disable espdma_memory_write(uint32_t addr) "DMA write addr 0x%08x"
disable sparc32_dma_mem_readl(uint64_t addr, uint32_t ret) "read dmareg %"PRIx64": 0x%08x"
disable sparc32_dma_mem_writel(uint64_t addr, uint32_t old, uint32_t val) "write dmareg %"PRIx64": 0x%08x -> 0x%08x"
disable sparc32_dma_enable_raise(void) "Raise DMA enable"
disable sparc32_dma_enable_lower(void) "Lower DMA enable"

# hw/sun4m.c
disable sun4m_cpu_interrupt(unsigned int level) "Set CPU IRQ %d"
disable sun4m_cpu_reset_interrupt(unsigned int level) "Reset CPU IRQ %d"
disable sun4m_cpu_set_irq_raise(int level) "Raise CPU IRQ %d"
disable sun4m_cpu_set_irq_lower(int level) "Lower CPU IRQ %d"

# hw/sun4m_iommu.c
disable sun4m_iommu_mem_readl(uint64_t addr, uint32_t ret) "read reg[%"PRIx64"] = %x"
disable sun4m_iommu_mem_writel(uint64_t addr, uint32_t val) "write reg[%"PRIx64"] = %x"
disable sun4m_iommu_mem_writel_ctrl(uint64_t iostart) "iostart = %"PRIx64""
disable sun4m_iommu_mem_writel_tlbflush(uint32_t val) "tlb flush %x"
disable sun4m_iommu_mem_writel_pgflush(uint32_t val) "page flush %x"
disable sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags addr %"PRIx64" => pte %"PRIx64", *pte = %x"
disable sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x"
disable sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64""

# hw/usb-desc.c
disable usb_desc_device(int addr, int len, int ret) "dev %d query device, len %d, ret %d"
disable usb_desc_device_qualifier(int addr, int len, int ret) "dev %d query device qualifier, len %d, ret %d"
disable usb_desc_config(int addr, int index, int len, int ret) "dev %d query config %d, len %d, ret %d"
disable usb_desc_other_speed_config(int addr, int index, int len, int ret) "dev %d query config %d, len %d, ret %d"
disable usb_desc_string(int addr, int index, int len, int ret) "dev %d query string %d, len %d, ret %d"
disable usb_set_addr(int addr) "dev %d"
disable usb_set_config(int addr, int config, int ret) "dev %d, config %d, ret %d"
disable usb_clear_device_feature(int addr, int feature, int ret) "dev %d, feature %d, ret %d"
disable usb_set_device_feature(int addr, int feature, int ret) "dev %d, feature %d, ret %d"

# vl.c
disable vm_state_notify(int running, int reason) "running %d reason %d"

# block/qed-l2-cache.c
disable qed_alloc_l2_cache_entry(void *l2_cache, void *entry) "l2_cache %p entry %p"
disable qed_unref_l2_cache_entry(void *entry, int ref) "entry %p ref %d"
disable qed_find_l2_cache_entry(void *l2_cache, void *entry, uint64_t offset, int ref) "l2_cache %p entry %p offset %"PRIu64" ref %d"

# block/qed-table.c
disable qed_read_table(void *s, uint64_t offset, void *table) "s %p offset %"PRIu64" table %p"
disable qed_read_table_cb(void *s, void *table, int ret) "s %p table %p ret %d"
disable qed_write_table(void *s, uint64_t offset, void *table, unsigned int index, unsigned int n) "s %p offset %"PRIu64" table %p index %u n %u"
disable qed_write_table_cb(void *s, void *table, int flush, int ret) "s %p table %p flush %d ret %d"

# block/qed.c
disable qed_aio_complete(void *s, void *acb, int ret) "s %p acb %p ret %d"
disable qed_aio_setup(void *s, void *acb, int64_t sector_num, int nb_sectors, void *opaque, int is_write) "s %p acb %p sector_num %"PRId64" nb_sectors %d opaque %p is_write %d"
disable qed_aio_next_io(void *s, void *acb, int ret, uint64_t cur_pos) "s %p acb %p ret %d cur_pos %"PRIu64""
disable qed_aio_read_data(void *s, void *acb, int ret, uint64_t offset, size_t len) "s %p acb %p ret %d offset %"PRIu64" len %zu"
disable qed_aio_write_data(void *s, void *acb, int ret, uint64_t offset, size_t len) "s %p acb %p ret %d offset %"PRIu64" len %zu"
disable qed_aio_write_prefill(void *s, void *acb, uint64_t start, size_t len, uint64_t offset) "s %p acb %p start %"PRIu64" len %zu offset %"PRIu64""
disable qed_aio_write_postfill(void *s, void *acb, uint64_t start, size_t len, uint64_t offset) "s %p acb %p start %"PRIu64" len %zu offset %"PRIu64""
disable qed_aio_write_main(void *s, void *acb, int ret, uint64_t offset, size_t len) "s %p acb %p ret %d offset %"PRIu64" len %zu"

# hw/grlib_gptimer.c
disable grlib_gptimer_enable(int id, uint32_t count) "timer:%d set count 0x%x and run"
disable grlib_gptimer_disabled(int id, uint32_t config) "timer:%d Timer disable config 0x%x"
disable grlib_gptimer_restart(int id, uint32_t reload) "timer:%d reload val: 0x%x"
disable grlib_gptimer_set_scaler(uint32_t scaler, uint32_t freq) "scaler:0x%x freq: 0x%x"
disable grlib_gptimer_hit(int id) "timer:%d HIT"
disable grlib_gptimer_readl(int id, const char *s, uint32_t val) "timer:%d %s 0x%x"
disable grlib_gptimer_writel(int id, const char *s, uint32_t val) "timer:%d %s 0x%x"
disable grlib_gptimer_unknown_register(const char *op, uint64_t val) "%s unknown register 0x%"PRIx64""

# hw/grlib_irqmp.c
disable grlib_irqmp_check_irqs(uint32_t pend, uint32_t force, uint32_t mask, uint32_t lvl1, uint32_t lvl2) "pend:0x%04x force:0x%04x mask:0x%04x lvl1:0x%04x lvl0:0x%04x\n"
disable grlib_irqmp_ack(int intno) "interrupt:%d"
disable grlib_irqmp_set_irq(int irq) "Raise CPU IRQ %d"
disable grlib_irqmp_unknown_register(const char *op, uint64_t val) "%s unknown register 0x%"PRIx64""

# hw/grlib_apbuart.c
disable grlib_apbuart_event(int event) "event:%d"
disable grlib_apbuart_unknown_register(const char *op, uint64_t val) "%s unknown register 0x%"PRIx64""

# hw/leon3.c
disable leon3_set_irq(int intno) "Set CPU IRQ %d"
disable leon3_reset_irq(int intno) "Reset CPU IRQ %d"

# spice-qemu-char.c
disable spice_vmc_write(ssize_t out, int len) "spice wrottn %lu of requested %zd"
disable spice_vmc_read(int bytes, int len) "spice read %lu of requested %zd"
disable spice_vmc_register_interface(void *scd) "spice vmc registered interface %p"
disable spice_vmc_unregister_interface(void *scd) "spice vmc unregistered interface %p"