input: add trace events for full queues
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 <kraxel@redhat.com>
Message-id: 1466675495-28797-1-git-send-email-kraxel@redhat.com
diff --git a/hw/input/hid.c b/hw/input/hid.c
index d92c746..5e2850e 100644
--- a/hw/input/hid.c
+++ b/hw/input/hid.c
@@ -27,6 +27,7 @@
#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
@@ -234,7 +235,7 @@
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++) {