* [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix
@ 2011-07-07 13:13 Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 1/3] virtio-serial-bus: Add trace events Amit Shah
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Amit Shah @ 2011-07-07 13:13 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amit Shah, qemu list
Hello,
This series adds some trace events to virtio-serial-bus.c and
virtio-console.c. There's also one trivial patch to remove a trailing
\n from an error_report() string.
Note: some mirrors may not yet have received the update.
The following changes since commit 9312805d33e8b106bae356d13a8071fb37d75554:
pxa2xx_lcd: add proper rotation support (2011-07-04 22:12:21 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/qemu/amit/virtio-serial.git for-anthony
Amit Shah (3):
virtio-serial-bus: Add trace events
virtio-console: Add some trace events
virtio-serial-bus: Fix trailing \n in error_report string
hw/virtio-console.c | 9 ++++++++-
hw/virtio-serial-bus.c | 9 ++++++++-
trace-events | 11 +++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/3] virtio-serial-bus: Add trace events
2011-07-07 13:13 [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Amit Shah
@ 2011-07-07 13:13 ` Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 2/3] virtio-console: Add some " Amit Shah
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Amit Shah @ 2011-07-07 13:13 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amit Shah, qemu list
Add some trace events for messages passed between the guest and host.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
hw/virtio-serial-bus.c | 7 +++++++
trace-events | 6 ++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 7f6db7b..9859f9f 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -19,6 +19,7 @@
#include "monitor.h"
#include "qemu-queue.h"
#include "sysbus.h"
+#include "trace.h"
#include "virtio-serial.h"
/* The virtio-serial bus on top of which the ports will ride as devices */
@@ -221,6 +222,7 @@ static size_t send_control_event(VirtIOSerialPort *port, uint16_t event,
stw_p(&cpkt.event, event);
stw_p(&cpkt.value, value);
+ trace_virtio_serial_send_control_event(port->id, event, value);
return send_control_msg(port, &cpkt, sizeof(cpkt));
}
@@ -302,6 +304,7 @@ void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle)
return;
}
+ trace_virtio_serial_throttle_port(port->id, throttle);
port->throttled = throttle;
if (throttle) {
return;
@@ -328,6 +331,8 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
cpkt.event = lduw_p(&gcpkt->event);
cpkt.value = lduw_p(&gcpkt->value);
+ trace_virtio_serial_handle_control_message(cpkt.event, cpkt.value);
+
if (cpkt.event == VIRTIO_CONSOLE_DEVICE_READY) {
if (!cpkt.value) {
error_report("virtio-serial-bus: Guest failure in adding device %s",
@@ -351,6 +356,8 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
return;
}
+ trace_virtio_serial_handle_control_message_port(port->id);
+
info = DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info);
switch(cpkt.event) {
diff --git a/trace-events b/trace-events
index bebf612..59420e8 100644
--- a/trace-events
+++ b/trace-events
@@ -46,6 +46,12 @@ disable virtio_queue_notify(void *vdev, int n, void *vq) "vdev %p n %d vq %p"
disable virtio_irq(void *vq) "vq %p"
disable virtio_notify(void *vdev, void *vq) "vdev %p vq %p"
+# hw/virtio-serial-bus.c
+disable virtio_serial_send_control_event(unsigned int port, uint16_t event, uint16_t value) "port %u, event %u, value %u"
+disable virtio_serial_throttle_port(unsigned int port, bool throttle) "port %u, throttle %d"
+disable virtio_serial_handle_control_message(uint16_t event, uint16_t value) "event %u, value %u"
+disable virtio_serial_handle_control_message_port(unsigned int port) "port %u"
+
# block.c
disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d"
disable bdrv_aio_multiwrite(void *mcb, int num_callbacks, int num_reqs) "mcb %p num_callbacks %d num_reqs %d"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 2/3] virtio-console: Add some trace events
2011-07-07 13:13 [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 1/3] virtio-serial-bus: Add trace events Amit Shah
@ 2011-07-07 13:13 ` Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 3/3] virtio-serial-bus: Fix trailing \n in error_report string Amit Shah
2011-07-19 15:59 ` [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Amit Shah @ 2011-07-07 13:13 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amit Shah, qemu list
Add some trace events for messages passed between the char layer and the
virtio-serial bus.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
hw/virtio-console.c | 9 ++++++++-
trace-events | 5 +++++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-console.c b/hw/virtio-console.c
index b076331..713a761 100644
--- a/hw/virtio-console.c
+++ b/hw/virtio-console.c
@@ -12,6 +12,7 @@
#include "qemu-char.h"
#include "qemu-error.h"
+#include "trace.h"
#include "virtio-serial.h"
typedef struct VirtConsole {
@@ -24,8 +25,12 @@ typedef struct VirtConsole {
static ssize_t flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len)
{
VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port);
+ ssize_t ret;
- return qemu_chr_write(vcon->chr, buf, len);
+ ret = qemu_chr_write(vcon->chr, buf, len);
+
+ trace_virtio_console_flush_buf(port->id, len, ret);
+ return ret;
}
/* Callback function that's called when the guest opens the port */
@@ -57,6 +62,7 @@ static void chr_read(void *opaque, const uint8_t *buf, int size)
{
VirtConsole *vcon = opaque;
+ trace_virtio_console_chr_read(vcon->port.id, size);
virtio_serial_write(&vcon->port, buf, size);
}
@@ -64,6 +70,7 @@ static void chr_event(void *opaque, int event)
{
VirtConsole *vcon = opaque;
+ trace_virtio_console_chr_event(vcon->port.id, event);
switch (event) {
case CHR_EVENT_OPENED:
virtio_serial_open(&vcon->port);
diff --git a/trace-events b/trace-events
index 59420e8..765a15e 100644
--- a/trace-events
+++ b/trace-events
@@ -52,6 +52,11 @@ disable virtio_serial_throttle_port(unsigned int port, bool throttle) "port %u,
disable virtio_serial_handle_control_message(uint16_t event, uint16_t value) "event %u, value %u"
disable virtio_serial_handle_control_message_port(unsigned int port) "port %u"
+# hw/virtio-console.c
+disable virtio_console_flush_buf(unsigned int port, size_t len, ssize_t ret) "port %u, in_len %zu, out_len %zd"
+disable virtio_console_chr_read(unsigned int port, int size) "port %u, size %d"
+disable virtio_console_chr_event(unsigned int port, int event) "port %u, event %d"
+
# block.c
disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d"
disable bdrv_aio_multiwrite(void *mcb, int num_callbacks, int num_reqs) "mcb %p num_callbacks %d num_reqs %d"
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 3/3] virtio-serial-bus: Fix trailing \n in error_report string
2011-07-07 13:13 [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 1/3] virtio-serial-bus: Add trace events Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 2/3] virtio-console: Add some " Amit Shah
@ 2011-07-07 13:13 ` Amit Shah
2011-07-19 15:59 ` [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Amit Shah @ 2011-07-07 13:13 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amit Shah, qemu list
Markus fixed offenders in the file but one instance sneaked in via
another patch. Fix it.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
hw/virtio-serial-bus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 9859f9f..6d73386 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -351,7 +351,7 @@ static void handle_control_message(VirtIOSerial *vser, void *buf, size_t len)
port = find_port_by_id(vser, ldl_p(&gcpkt->id));
if (!port) {
- error_report("virtio-serial-bus: Unexpected port id %u for device %s\n",
+ error_report("virtio-serial-bus: Unexpected port id %u for device %s",
ldl_p(&gcpkt->id), vser->bus.qbus.name);
return;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix
2011-07-07 13:13 [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Amit Shah
` (2 preceding siblings ...)
2011-07-07 13:13 ` [Qemu-devel] [PATCH 3/3] virtio-serial-bus: Fix trailing \n in error_report string Amit Shah
@ 2011-07-19 15:59 ` Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2011-07-19 15:59 UTC (permalink / raw)
To: Amit Shah; +Cc: qemu list
On 07/07/2011 08:13 AM, Amit Shah wrote:
> Hello,
>
> This series adds some trace events to virtio-serial-bus.c and
> virtio-console.c. There's also one trivial patch to remove a trailing
> \n from an error_report() string.
>
> Note: some mirrors may not yet have received the update.
Pulled. Thanks.
Regards,
Anthony Liguori
>
>
> The following changes since commit 9312805d33e8b106bae356d13a8071fb37d75554:
>
> pxa2xx_lcd: add proper rotation support (2011-07-04 22:12:21 +0200)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/virt/qemu/amit/virtio-serial.git for-anthony
>
>
> Amit Shah (3):
> virtio-serial-bus: Add trace events
> virtio-console: Add some trace events
> virtio-serial-bus: Fix trailing \n in error_report string
>
> hw/virtio-console.c | 9 ++++++++-
> hw/virtio-serial-bus.c | 9 ++++++++-
> trace-events | 11 +++++++++++
> 3 files changed, 27 insertions(+), 2 deletions(-)
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-19 15:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 13:13 [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 1/3] virtio-serial-bus: Add trace events Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 2/3] virtio-console: Add some " Amit Shah
2011-07-07 13:13 ` [Qemu-devel] [PATCH 3/3] virtio-serial-bus: Fix trailing \n in error_report string Amit Shah
2011-07-19 15:59 ` [Qemu-devel] [PULL] virtio-serial: trace events, trivial fix Anthony Liguori
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.