diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2016-06-23 11:51:35 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-07-12 09:25:28 +0200 |
commit | c80276b4206d534daaaf87305df5805db1b8db02 (patch) | |
tree | fa8fc8e0b65d1cc219fc975a18152614a8e4f0a3 /hw/input/hid.c | |
parent | d7b7f526b18dacda8ee559dc18c13d4430a78b68 (diff) | |
download | qemu-c80276b4206d534daaaf87305df5805db1b8db02.zip qemu-c80276b4206d534daaaf87305df5805db1b8db02.tar.gz qemu-c80276b4206d534daaaf87305df5805db1b8db02.tar.bz2 |
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
Diffstat (limited to 'hw/input/hid.c')
-rw-r--r-- | hw/input/hid.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ static void hid_keyboard_event(DeviceState *dev, QemuConsole *src, 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++) { |