Move all trace-events for files in the hw/audio/ directory to their own file.
Signed-off-by: Daniel P. Berrange <berra...@redhat.com> --- Makefile.objs | 1 + hw/audio/trace-events | 44 ++++++++++++++++++++++++++++++++++++++++++++ trace-events | 18 ------------------ 3 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 hw/audio/trace-events diff --git a/Makefile.objs b/Makefile.objs index 165475c..9d5f64d 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -129,3 +129,4 @@ trace-events-y += hw/char/trace-events trace-events-y += hw/intc/trace-events trace-events-y += hw/net/trace-events trace-events-y += hw/virtio/trace-events +trace-events-y += hw/audio/trace-events diff --git a/hw/audio/trace-events b/hw/audio/trace-events new file mode 100644 index 0000000..fe65163 --- /dev/null +++ b/hw/audio/trace-events @@ -0,0 +1,44 @@ +# 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: g_malloc(size_t size) "size %zu" +# +# The "disable" keyword will build without the trace event. +# +# 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. + +# hw/audio/cs4231.c +cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret) "read dreg %d: 0x%02x" +cs4231_mem_readl_reg(uint32_t reg, uint32_t ret) "read reg %d: 0x%08x" +cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: 0x%08x -> 0x%08x" +cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: 0x%02x -> 0x%02x" + +# hw/audio/milkymist-ac97.c +milkymist_ac97_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x" +milkymist_ac97_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x" +milkymist_ac97_pulse_irq_crrequest(void) "Pulse IRQ CR request" +milkymist_ac97_pulse_irq_crreply(void) "Pulse IRQ CR reply" +milkymist_ac97_pulse_irq_dmaw(void) "Pulse IRQ DMA write" +milkymist_ac97_pulse_irq_dmar(void) "Pulse IRQ DMA read" +milkymist_ac97_in_cb(int avail, uint32_t remaining) "avail %d remaining %u" +milkymist_ac97_in_cb_transferred(int transferred) "transferred %d" +milkymist_ac97_out_cb(int free, uint32_t remaining) "free %d remaining %u" +milkymist_ac97_out_cb_transferred(int transferred) "transferred %d" diff --git a/trace-events b/trace-events index 8e8de59..94f8f70 100644 --- a/trace-events +++ b/trace-events @@ -42,12 +42,6 @@ virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d ac virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d" virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d" -# hw/audio/cs4231.c -cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret) "read dreg %d: 0x%02x" -cs4231_mem_readl_reg(uint32_t reg, uint32_t ret) "read reg %d: 0x%08x" -cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: 0x%08x -> 0x%08x" -cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: 0x%02x -> 0x%02x" - # hw/nvram/ds1225y.c nvram_read(uint32_t addr, uint32_t ret) "read addr %d: 0x%02x" nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: 0x%02x -> 0x%02x" @@ -595,18 +589,6 @@ megasas_mmio_invalid_readl(unsigned long addr) "addr 0x%lx" megasas_mmio_writel(const char *reg, uint32_t val) "reg %s: 0x%x" megasas_mmio_invalid_writel(uint32_t addr, uint32_t val) "addr 0x%x: 0x%x" -# hw/audio/milkymist-ac97.c -milkymist_ac97_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x" -milkymist_ac97_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x" -milkymist_ac97_pulse_irq_crrequest(void) "Pulse IRQ CR request" -milkymist_ac97_pulse_irq_crreply(void) "Pulse IRQ CR reply" -milkymist_ac97_pulse_irq_dmaw(void) "Pulse IRQ DMA write" -milkymist_ac97_pulse_irq_dmar(void) "Pulse IRQ DMA read" -milkymist_ac97_in_cb(int avail, uint32_t remaining) "avail %d remaining %u" -milkymist_ac97_in_cb_transferred(int transferred) "transferred %d" -milkymist_ac97_out_cb(int free, uint32_t remaining) "free %d remaining %u" -milkymist_ac97_out_cb_transferred(int transferred) "transferred %d" - # hw/misc/milkymist-hpdmc.c milkymist_hpdmc_memory_read(uint32_t addr, uint32_t value) "addr=%08x value=%08x" milkymist_hpdmc_memory_write(uint32_t addr, uint32_t value) "addr=%08x value=%08x" -- 2.5.5