Revision d02e4fa4
b/hw/virtio-console.c | ||
---|---|---|
12 | 12 |
|
13 | 13 |
#include "qemu-char.h" |
14 | 14 |
#include "qemu-error.h" |
15 |
#include "trace.h" |
|
15 | 16 |
#include "virtio-serial.h" |
16 | 17 |
|
17 | 18 |
typedef struct VirtConsole { |
... | ... | |
24 | 25 |
static ssize_t flush_buf(VirtIOSerialPort *port, const uint8_t *buf, size_t len) |
25 | 26 |
{ |
26 | 27 |
VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port); |
28 |
ssize_t ret; |
|
27 | 29 |
|
28 |
return qemu_chr_write(vcon->chr, buf, len); |
|
30 |
ret = qemu_chr_write(vcon->chr, buf, len); |
|
31 |
|
|
32 |
trace_virtio_console_flush_buf(port->id, len, ret); |
|
33 |
return ret; |
|
29 | 34 |
} |
30 | 35 |
|
31 | 36 |
/* Callback function that's called when the guest opens the port */ |
... | ... | |
57 | 62 |
{ |
58 | 63 |
VirtConsole *vcon = opaque; |
59 | 64 |
|
65 |
trace_virtio_console_chr_read(vcon->port.id, size); |
|
60 | 66 |
virtio_serial_write(&vcon->port, buf, size); |
61 | 67 |
} |
62 | 68 |
|
... | ... | |
64 | 70 |
{ |
65 | 71 |
VirtConsole *vcon = opaque; |
66 | 72 |
|
73 |
trace_virtio_console_chr_event(vcon->port.id, event); |
|
67 | 74 |
switch (event) { |
68 | 75 |
case CHR_EVENT_OPENED: |
69 | 76 |
virtio_serial_open(&vcon->port); |
b/trace-events | ||
---|---|---|
52 | 52 |
disable virtio_serial_handle_control_message(uint16_t event, uint16_t value) "event %u, value %u" |
53 | 53 |
disable virtio_serial_handle_control_message_port(unsigned int port) "port %u" |
54 | 54 |
|
55 |
# hw/virtio-console.c |
|
56 |
disable virtio_console_flush_buf(unsigned int port, size_t len, ssize_t ret) "port %u, in_len %zu, out_len %zd" |
|
57 |
disable virtio_console_chr_read(unsigned int port, int size) "port %u, size %d" |
|
58 |
disable virtio_console_chr_event(unsigned int port, int event) "port %u, event %d" |
|
59 |
|
|
55 | 60 |
# block.c |
56 | 61 |
disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d" |
57 | 62 |
disable bdrv_aio_multiwrite(void *mcb, int num_callbacks, int num_reqs) "mcb %p num_callbacks %d num_reqs %d" |
Also available in: Unified diff