Skip to content

Commit

Permalink
hw/block/fdc: Convert from FLOPPY_DPRINTF() macro to trace events
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
philmd authored and stefanhaRH committed Jun 29, 2018
1 parent 4b46fdd commit 1a5396d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/block/fdc.c
Expand Up @@ -40,6 +40,7 @@
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "trace.h"

/********************************************************/
/* debug Floppy devices */
Expand Down Expand Up @@ -934,7 +935,7 @@ static uint32_t fdctrl_read (void *opaque, uint32_t reg)
retval = (uint32_t)(-1);
break;
}
FLOPPY_DPRINTF("read reg%d: 0x%02x\n", reg & 7, retval);
trace_fdc_ioport_read(reg, retval);

return retval;
}
Expand All @@ -943,9 +944,8 @@ static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value)
{
FDCtrl *fdctrl = opaque;

FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value);

reg &= 7;
trace_fdc_ioport_write(reg, value);
switch (reg) {
case FD_REG_DOR:
fdctrl_write_dor(fdctrl, value);
Expand Down
4 changes: 4 additions & 0 deletions hw/block/trace-events
@@ -1,5 +1,9 @@
# See docs/devel/tracing.txt for syntax documentation.

# hw/block/fdc.c
fdc_ioport_read(uint8_t reg, uint8_t value) "read reg 0x%02x val 0x%02x"
fdc_ioport_write(uint8_t reg, uint8_t value) "write reg 0x%02x val 0x%02x"

# hw/block/virtio-blk.c
virtio_blk_req_complete(void *vdev, void *req, int status) "vdev %p req %p status %d"
virtio_blk_rw_complete(void *vdev, void *req, int ret) "vdev %p req %p ret %d"
Expand Down

0 comments on commit 1a5396d

Please sign in to comment.