From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org,
"Richard Henderson" <richard.henderson@linaro.org>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Laurent Vivier" <laurent@vivier.eu>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PULL v2 05/16] hw/isa/apm: Convert debug printf()s to trace events
Date: Wed, 10 Jun 2020 15:10:00 +0200 [thread overview]
Message-ID: <20200610131011.1941209-6-laurent@vivier.eu> (raw)
In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu>
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Convert APM_DPRINTF() to trace events and remove ifdef'ry.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200524164806.12658-1-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/isa/apm.c | 15 +++++----------
hw/isa/trace-events | 4 ++++
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/hw/isa/apm.c b/hw/isa/apm.c
index 6300b1ba7ace..bce266b9574c 100644
--- a/hw/isa/apm.c
+++ b/hw/isa/apm.c
@@ -24,14 +24,8 @@
#include "hw/isa/apm.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
+#include "trace.h"
-//#define DEBUG
-
-#ifdef DEBUG
-# define APM_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)
-#else
-# define APM_DPRINTF(format, ...) do { } while (0)
-#endif
/* fixed I/O location */
#define APM_STS_IOPORT 0xb3
@@ -41,8 +35,8 @@ static void apm_ioport_writeb(void *opaque, hwaddr addr, uint64_t val,
{
APMState *apm = opaque;
addr &= 1;
- APM_DPRINTF("apm_ioport_writeb addr=0x%" HWADDR_PRIx
- " val=0x%02" PRIx64 "\n", addr, val);
+
+ trace_apm_io_write(addr, val);
if (addr == 0) {
apm->apmc = val;
@@ -65,7 +59,8 @@ static uint64_t apm_ioport_readb(void *opaque, hwaddr addr, unsigned size)
} else {
val = apm->apms;
}
- APM_DPRINTF("apm_ioport_readb addr=0x%" HWADDR_PRIx " val=0x%02x\n", addr, val);
+ trace_apm_io_read(addr, val);
+
return val;
}
diff --git a/hw/isa/trace-events b/hw/isa/trace-events
index 202f8938e7b8..3544c6213c39 100644
--- a/hw/isa/trace-events
+++ b/hw/isa/trace-events
@@ -9,3 +9,7 @@ superio_create_ide(int id, uint16_t base, unsigned int irq) "id=%d, base 0x%03x,
# pc87312.c
pc87312_io_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x"
pc87312_io_write(uint32_t addr, uint32_t val) "write addr=0x%x val=0x%x"
+
+# apm.c
+apm_io_read(uint8_t addr, uint8_t val) "read addr=0x%x val=0x%02x"
+apm_io_write(uint8_t addr, uint8_t val) "write addr=0x%x val=0x%02x"
--
2.26.2
next prev parent reply other threads:[~2020-06-10 13:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-10 13:09 [PULL v2 00/16] Trivial branch for 5.1 patches Laurent Vivier
2020-06-10 13:09 ` [PULL v2 01/16] Fix parameter type in vhost migration log path Laurent Vivier
2020-06-10 13:09 ` [PULL v2 02/16] net: Do not include a newline in the id of -nic devices Laurent Vivier
2020-06-10 13:09 ` [PULL v2 03/16] .mailmap: Update Fred Konrad email address Laurent Vivier
2020-06-10 13:09 ` [PULL v2 04/16] hw/unicore32/puv3: Use qemu_log_mask(ERROR) instead of debug printf() Laurent Vivier
2020-06-10 13:10 ` Laurent Vivier [this message]
2020-06-10 13:10 ` [PULL v2 06/16] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf Laurent Vivier
2020-06-10 13:10 ` [PULL v2 07/16] qemu-img: Fix doc typo for 'bitmap' subcommand Laurent Vivier
2020-06-10 13:10 ` [PULL v2 08/16] hw/arm/aspeed: Correct DRAM container region size Laurent Vivier
2020-06-10 13:10 ` [PULL v2 09/16] hw/hppa/dino: Use the IEC binary prefix definitions Laurent Vivier
2020-06-10 13:10 ` [PULL v2 10/16] hw/i386/xen/xen-hvm: " Laurent Vivier
2020-06-10 13:10 ` [PULL v2 11/16] target/i386/cpu: " Laurent Vivier
2020-06-10 13:10 ` [PULL v2 12/16] target/unicore32: Remove unused headers Laurent Vivier
2020-06-10 13:10 ` [PULL v2 13/16] target/unicore32: Replace DPRINTF() by qemu_log_mask(GUEST_ERROR) Laurent Vivier
2020-06-10 13:10 ` [PULL v2 14/16] target/unicore32: Prefer qemu_semihosting_log_out() over curses Laurent Vivier
2020-06-10 13:10 ` [PULL v2 15/16] hw/openrisc/openrisc_sim: Add assertion to silence GCC warning Laurent Vivier
2020-06-10 13:10 ` [PULL v2 16/16] semihosting: remove the pthread include which seems unused Laurent Vivier
2020-06-11 20:19 ` [PULL v2 00/16] Trivial branch for 5.1 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200610131011.1941209-6-laurent@vivier.eu \
--to=laurent@vivier.eu \
--cc=f4bug@amsat.org \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).