mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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
This commit is contained in:
parent
d7b7f526b1
commit
c80276b420
3 changed files with 10 additions and 2 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue