From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Michael S. Tsirkin" <mst@redhat.com>, Michael Tokarev <mjt@tls.msk.ru>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
qemu-trivial@nongnu.org, "Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH v5 1/2] hw/i386/vmport: replace fprintf() by trace events
Date: Fri, 15 Dec 2017 00:43:55 -0300 [thread overview]
Message-ID: <20171215034356.4449-2-f4bug@amsat.org> (raw)
In-Reply-To: <20171215034356.4449-1-f4bug@amsat.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/vmport.c | 8 +++-----
hw/i386/trace-events | 4 ++++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c
index eb880c6def..b5585a009a 100644
--- a/hw/i386/vmport.c
+++ b/hw/i386/vmport.c
@@ -27,8 +27,7 @@
#include "hw/i386/pc.h"
#include "sysemu/hw_accel.h"
#include "hw/qdev.h"
-
-/* #define VMPORT_DEBUG */
+#include "trace.h"
#define VMPORT_CMD_GETVERSION 0x0a
#define VMPORT_CMD_GETRAMSIZE 0x14
@@ -54,6 +53,7 @@ void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque)
return;
}
+ trace_vmport_register(command, func, opaque);
port_state->func[command] = func;
port_state->opaque[command] = opaque;
}
@@ -80,9 +80,7 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr,
return eax;
}
if (!s->func[command]) {
-#ifdef VMPORT_DEBUG
- fprintf(stderr, "vmport: unknown command %x\n", command);
-#endif
+ trace_vmport_ioport_read_unknown_command(command, addr);
return eax;
}
diff --git a/hw/i386/trace-events b/hw/i386/trace-events
index d43b4b6cd3..150549c15e 100644
--- a/hw/i386/trace-events
+++ b/hw/i386/trace-events
@@ -113,3 +113,7 @@ amdvi_mode_invalid(uint8_t level, uint64_t addr)"error: translation level 0x%"PR
amdvi_page_fault(uint64_t addr) "error: page fault accessing guest physical address 0x%"PRIx64
amdvi_iotlb_hit(uint8_t bus, uint8_t slot, uint8_t func, uint64_t addr, uint64_t txaddr) "hit iotlb devid %02x:%02x.%x gpa 0x%"PRIx64" hpa 0x%"PRIx64
amdvi_translation_result(uint8_t bus, uint8_t slot, uint8_t func, uint64_t addr, uint64_t txaddr) "devid: %02x:%02x.%x gpa 0x%"PRIx64" hpa 0x%"PRIx64
+
+# hw/i386/vmport.c
+vmport_register(unsigned char command, void *func, void *opaque) "command: 0x%02x func: %p opaque: %p"
+vmport_ioport_read_unknown_command(unsigned char command, hwaddr addr) "unknown command: 0x%02x addr: 0x%" HWADDR_PRIx
--
2.15.1
next prev parent reply other threads:[~2017-12-15 3:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 3:43 [Qemu-devel] [PATCH v5 0/2] remove i386/pc dependency from non-PC world (part 1) fix Philippe Mathieu-Daudé
2017-12-15 3:43 ` Philippe Mathieu-Daudé [this message]
2017-12-15 3:43 ` [Qemu-devel] [PATCH v5 2/2] misc: drop old i386 dependency Philippe Mathieu-Daudé
2017-12-15 8:22 ` [Qemu-devel] [PATCH v5 0/2] remove i386/pc dependency from non-PC world (part 1) fix Paolo Bonzini
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=20171215034356.4449-2-f4bug@amsat.org \
--to=f4bug@amsat.org \
--cc=ehabkost@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.com \
/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).