From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com, kraxel@redhat.com,
mst@redhat.com
Cc: qemu-trivial@nongnu.org
Subject: [Qemu-trivial] [PATCH 1/4] pckbd: Convert DPRINTF->trace
Date: Tue, 12 Feb 2019 13:47:55 +0000 [thread overview]
Message-ID: <20190212134758.10514-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20190212134758.10514-1-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hw/input/pckbd.c | 19 ++++++-------------
hw/input/trace-events | 7 +++++++
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 72e7d5f6cc..47a606f5e3 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -30,14 +30,7 @@
#include "hw/input/i8042.h"
#include "sysemu/sysemu.h"
-/* debug PC keyboard */
-//#define DEBUG_KBD
-#ifdef DEBUG_KBD
-#define DPRINTF(fmt, ...) \
- do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...)
-#endif
+#include "trace.h"
/* Keyboard Controller Commands */
#define KBD_CCMD_READ_MODE 0x20 /* Read mode bits */
@@ -210,7 +203,7 @@ static uint64_t kbd_read_status(void *opaque, hwaddr addr,
KBDState *s = opaque;
int val;
val = s->status;
- DPRINTF("kbd: read status=0x%02x\n", val);
+ trace_pckbd_kbd_read_status(val);
return val;
}
@@ -224,7 +217,7 @@ static void kbd_queue(KBDState *s, int b, int aux)
static void outport_write(KBDState *s, uint32_t val)
{
- DPRINTF("kbd: write outport=0x%02x\n", val);
+ trace_pckbd_outport_write(val);
s->outport = val;
qemu_set_irq(s->a20_out, (val >> 1) & 1);
if (!(val & 1)) {
@@ -237,7 +230,7 @@ static void kbd_write_command(void *opaque, hwaddr addr,
{
KBDState *s = opaque;
- DPRINTF("kbd: write cmd=0x%02" PRIx64 "\n", val);
+ trace_pckbd_kbd_write_command(val);
/* Bits 3-0 of the output port P2 of the keyboard controller may be pulsed
* low for approximately 6 micro seconds. Bits 3-0 of the KBD_CCMD_PULSE
@@ -326,7 +319,7 @@ static uint64_t kbd_read_data(void *opaque, hwaddr addr,
else
val = ps2_read_data(s->kbd);
- DPRINTF("kbd: read data=0x%02x\n", val);
+ trace_pckbd_kbd_read_data(val);
return val;
}
@@ -335,7 +328,7 @@ static void kbd_write_data(void *opaque, hwaddr addr,
{
KBDState *s = opaque;
- DPRINTF("kbd: write data=0x%02" PRIx64 "\n", val);
+ trace_pckbd_kbd_write_data(val);
switch(s->write_cmd) {
case 0:
diff --git a/hw/input/trace-events b/hw/input/trace-events
index 3965a842ae..8e53ae5bbf 100644
--- a/hw/input/trace-events
+++ b/hw/input/trace-events
@@ -14,6 +14,13 @@ adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x o
adb_mouse_request_change_addr(int devaddr) "change addr to 0x%x"
adb_mouse_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x"
+# hw/input/pckbd.c
+pckbd_kbd_read_data(uint32_t val) "0x%02x"
+pckbd_kbd_read_status(int status) "0x%02x"
+pckbd_outport_write(uint32_t val) "0x%02x"
+pckbd_kbd_write_command(uint64_t val) "0x%02"PRIx64
+pckbd_kbd_write_data(uint64_t val) "0x%02"PRIx64
+
# hw/input/ps2.c
ps2_put_keycode(void *opaque, int keycode) "%p keycode 0x%02x"
ps2_keyboard_event(void *opaque, int qcode, int down, unsigned int modifier, unsigned int modifiers) "%p qcode %d down %d modifier 0x%x modifiers 0x%x"
--
2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com, kraxel@redhat.com,
mst@redhat.com
Cc: qemu-trivial@nongnu.org
Subject: [Qemu-devel] [PATCH 1/4] pckbd: Convert DPRINTF->trace
Date: Tue, 12 Feb 2019 13:47:55 +0000 [thread overview]
Message-ID: <20190212134758.10514-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20190212134758.10514-1-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hw/input/pckbd.c | 19 ++++++-------------
hw/input/trace-events | 7 +++++++
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 72e7d5f6cc..47a606f5e3 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -30,14 +30,7 @@
#include "hw/input/i8042.h"
#include "sysemu/sysemu.h"
-/* debug PC keyboard */
-//#define DEBUG_KBD
-#ifdef DEBUG_KBD
-#define DPRINTF(fmt, ...) \
- do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...)
-#endif
+#include "trace.h"
/* Keyboard Controller Commands */
#define KBD_CCMD_READ_MODE 0x20 /* Read mode bits */
@@ -210,7 +203,7 @@ static uint64_t kbd_read_status(void *opaque, hwaddr addr,
KBDState *s = opaque;
int val;
val = s->status;
- DPRINTF("kbd: read status=0x%02x\n", val);
+ trace_pckbd_kbd_read_status(val);
return val;
}
@@ -224,7 +217,7 @@ static void kbd_queue(KBDState *s, int b, int aux)
static void outport_write(KBDState *s, uint32_t val)
{
- DPRINTF("kbd: write outport=0x%02x\n", val);
+ trace_pckbd_outport_write(val);
s->outport = val;
qemu_set_irq(s->a20_out, (val >> 1) & 1);
if (!(val & 1)) {
@@ -237,7 +230,7 @@ static void kbd_write_command(void *opaque, hwaddr addr,
{
KBDState *s = opaque;
- DPRINTF("kbd: write cmd=0x%02" PRIx64 "\n", val);
+ trace_pckbd_kbd_write_command(val);
/* Bits 3-0 of the output port P2 of the keyboard controller may be pulsed
* low for approximately 6 micro seconds. Bits 3-0 of the KBD_CCMD_PULSE
@@ -326,7 +319,7 @@ static uint64_t kbd_read_data(void *opaque, hwaddr addr,
else
val = ps2_read_data(s->kbd);
- DPRINTF("kbd: read data=0x%02x\n", val);
+ trace_pckbd_kbd_read_data(val);
return val;
}
@@ -335,7 +328,7 @@ static void kbd_write_data(void *opaque, hwaddr addr,
{
KBDState *s = opaque;
- DPRINTF("kbd: write data=0x%02" PRIx64 "\n", val);
+ trace_pckbd_kbd_write_data(val);
switch(s->write_cmd) {
case 0:
diff --git a/hw/input/trace-events b/hw/input/trace-events
index 3965a842ae..8e53ae5bbf 100644
--- a/hw/input/trace-events
+++ b/hw/input/trace-events
@@ -14,6 +14,13 @@ adb_mouse_readreg(int reg, uint8_t val0, uint8_t val1) "reg %d obuf[0] 0x%2.2x o
adb_mouse_request_change_addr(int devaddr) "change addr to 0x%x"
adb_mouse_request_change_addr_and_handler(int devaddr, int handler) "change addr and handler to 0x%x, 0x%x"
+# hw/input/pckbd.c
+pckbd_kbd_read_data(uint32_t val) "0x%02x"
+pckbd_kbd_read_status(int status) "0x%02x"
+pckbd_outport_write(uint32_t val) "0x%02x"
+pckbd_kbd_write_command(uint64_t val) "0x%02"PRIx64
+pckbd_kbd_write_data(uint64_t val) "0x%02"PRIx64
+
# hw/input/ps2.c
ps2_put_keycode(void *opaque, int keycode) "%p keycode 0x%02x"
ps2_keyboard_event(void *opaque, int qcode, int down, unsigned int modifier, unsigned int modifiers) "%p qcode %d down %d modifier 0x%x modifiers 0x%x"
--
2.20.1
next prev parent reply other threads:[~2019-02-12 13:48 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 13:47 [Qemu-trivial] [PATCH 0/4] a few trivials Dr. David Alan Gilbert (git)
2019-02-12 13:47 ` [Qemu-devel] " Dr. David Alan Gilbert (git)
2019-02-12 13:47 ` Dr. David Alan Gilbert (git) [this message]
2019-02-12 13:47 ` [Qemu-devel] [PATCH 1/4] pckbd: Convert DPRINTF->trace Dr. David Alan Gilbert (git)
2019-02-12 14:10 ` [Qemu-trivial] " Philippe Mathieu-Daudé
2019-02-12 14:10 ` Philippe Mathieu-Daudé
2019-02-14 9:54 ` [Qemu-trivial] " Laurent Vivier
2019-02-14 9:54 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
2019-02-12 13:47 ` [Qemu-trivial] [PATCH 2/4] HMP: Prepend errors with 'Error:' Dr. David Alan Gilbert (git)
2019-02-12 13:47 ` [Qemu-devel] " Dr. David Alan Gilbert (git)
2019-02-12 14:11 ` [Qemu-trivial] " Philippe Mathieu-Daudé
2019-02-12 14:11 ` Philippe Mathieu-Daudé
2019-02-14 9:53 ` [Qemu-trivial] " Markus Armbruster
2019-02-14 9:53 ` Markus Armbruster
2019-02-14 9:55 ` [Qemu-trivial] " Laurent Vivier
2019-02-14 9:55 ` [Qemu-devel] " Laurent Vivier
2019-02-12 13:47 ` [Qemu-trivial] [PATCH 3/4] kvm: Add kvm_set_ioeventfd* traces Dr. David Alan Gilbert (git)
2019-02-12 13:47 ` [Qemu-devel] " Dr. David Alan Gilbert (git)
2019-02-12 14:12 ` [Qemu-trivial] " Philippe Mathieu-Daudé
2019-02-12 14:12 ` Philippe Mathieu-Daudé
2019-02-12 14:41 ` [Qemu-trivial] " Cornelia Huck
2019-02-12 14:41 ` Cornelia Huck
2019-02-12 13:47 ` [Qemu-trivial] [PATCH 4/4] wavcapture: Convert to error_report Dr. David Alan Gilbert (git)
2019-02-12 13:47 ` [Qemu-devel] " Dr. David Alan Gilbert (git)
2019-02-14 9:58 ` [Qemu-trivial] " Laurent Vivier
2019-02-14 9:58 ` [Qemu-devel] " Laurent Vivier
2019-02-14 10:01 ` [Qemu-trivial] [Qemu-devel] " Markus Armbruster
2019-02-14 10:01 ` Markus Armbruster
2019-02-12 14:05 ` [Qemu-trivial] [PATCH 0/4] a few trivials Michael S. Tsirkin
2019-02-12 14:05 ` [Qemu-devel] " Michael S. Tsirkin
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=20190212134758.10514-2-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.