aboutsummaryrefslogtreecommitdiff
path: root/hw/core/empty_slot.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2019-06-24 17:23:48 +0200
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2020-06-09 06:59:44 +0200
commitc0e43084dd63daf63e8f7f5a866f2861a5e8d630 (patch)
tree278b3dbcd5b575834c497f8a29124a7068d11277 /hw/core/empty_slot.c
parent07ddf5cbe2e9499cc2d238e5c864ac3f5bdd25ce (diff)
hw/misc/empty_slot: Convert debug printf() to trace event
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Artyom Tarasenko <atar4qemu@gmail.com> Message-Id: <20200510152840.13558-6-f4bug@amsat.org>
Diffstat (limited to 'hw/core/empty_slot.c')
-rw-r--r--hw/core/empty_slot.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c
index 576b276c4b..d28f7f99c9 100644
--- a/hw/core/empty_slot.c
+++ b/hw/core/empty_slot.c
@@ -14,15 +14,7 @@
#include "qemu/module.h"
#include "hw/qdev-properties.h"
#include "hw/empty_slot.h"
-
-//#define DEBUG_EMPTY_SLOT
-
-#ifdef DEBUG_EMPTY_SLOT
-#define DPRINTF(fmt, ...) \
- do { printf("empty_slot: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) do {} while (0)
-#endif
+#include "trace.h"
#define TYPE_EMPTY_SLOT "empty_slot"
#define EMPTY_SLOT(obj) OBJECT_CHECK(EmptySlot, (obj), TYPE_EMPTY_SLOT)
@@ -38,14 +30,19 @@ typedef struct EmptySlot {
static uint64_t empty_slot_read(void *opaque, hwaddr addr,
unsigned size)
{
- DPRINTF("read from " TARGET_FMT_plx "\n", addr);
+ EmptySlot *s = EMPTY_SLOT(opaque);
+
+ trace_empty_slot_write(addr, size << 1, 0, size, s->name);
+
return 0;
}
static void empty_slot_write(void *opaque, hwaddr addr,
uint64_t val, unsigned size)
{
- DPRINTF("write 0x%x to " TARGET_FMT_plx "\n", (unsigned)val, addr);
+ EmptySlot *s = EMPTY_SLOT(opaque);
+
+ trace_empty_slot_write(addr, size << 1, val, size, s->name);
}
static const MemoryRegionOps empty_slot_ops = {