It isn't unusual to happen, for example during reboot when the guest
doesn't reveice events for a while. So better don't flood stderr
with alarming messages. Turn them into tracepoints instead so they
can be enabled in case they are needed for trouble-shooting.
Signed-off-by: Gerd Hoffmann <[email protected]>
Message-id:
1466675495[email protected]
#include "ui/console.h"
#include "qemu/timer.h"
#include "hw/input/hid.h"
+#include "trace.h"
#define HID_USAGE_ERROR_ROLLOVER 0x01
#define HID_USAGE_POSTFAIL 0x02
key->down,
scancodes);
if (hs->n + count > QUEUE_LENGTH) {
- fprintf(stderr, "usb-kbd: warning: key event queue full\n");
+ trace_hid_kbd_queue_full();
return;
}
for (i = 0; i < count; i++) {
milkymist_softusb_mevt(uint8_t m) "m %d"
milkymist_softusb_kevt(uint8_t m) "m %d"
milkymist_softusb_pulse_irq(void) "Pulse IRQ"
+
+# hw/input/hid.c
+hid_kbd_queue_full(void) "queue full"
+
+# hw/input/virtio
+virtio_input_queue_full(void) "queue full"
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/iov.h"
+#include "trace.h"
#include "hw/qdev.h"
#include "hw/virtio/virtio.h"
virtqueue_get_avail_bytes(vinput->evt, &have, NULL, need, 0);
if (have < need) {
vinput->qindex = 0;
- fprintf(stderr, "%s: ENOSPC in vq, dropping events\n", __func__);
+ trace_virtio_input_queue_full();
return;
}