diff options
author | John Snow <jsnow@redhat.com> | 2017-09-18 15:01:25 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2017-09-18 15:01:25 -0400 |
commit | 3eee2611dd89b2713eab4e33a6195add1fa6af32 (patch) | |
tree | bc06f91c5af08625226e3084a65c7d11fddf7916 /hw/ide/piix.c | |
parent | 4c93950659487c7ad4f85571ee78524c1e3a94b3 (diff) |
IDE: replace DEBUG_IDE with tracing system
Remove the DEBUG_IDE preprocessor definition with something more
appropriately flexible, using the trace-events subsystem.
This will be less prone to bitrot and will more effectively allow
us to target just the functions we care about.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170901001502.29915-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/ide/piix.c')
-rw-r--r-- | hw/ide/piix.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 7e2d76705d..dfb21f65fa 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -33,6 +33,7 @@ #include "sysemu/dma.h" #include "hw/ide/pci.h" +#include "trace.h" static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size) { @@ -54,9 +55,8 @@ static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size) val = 0xff; break; } -#ifdef DEBUG_IDE - printf("bmdma: readb 0x%02x : 0x%02x\n", (uint8_t)addr, val); -#endif + + trace_bmdma_read(addr, val); return val; } @@ -69,9 +69,8 @@ static void bmdma_write(void *opaque, hwaddr addr, return; } -#ifdef DEBUG_IDE - printf("bmdma: writeb 0x%02x : 0x%02x\n", (uint8_t)addr, (uint8_t)val); -#endif + trace_bmdma_write(addr, val); + switch(addr & 3) { case 0: bmdma_cmd_writeb(bm, val); |