Skip to contentSkip to conversation

hw/display/xenfb.c: Add trace_xenfb_key_event

PATCH Superseded Liang Yan 1 participant 1 message Aug 23, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Liang Yan

author
#0 lore raw

PATCH 1/1 hw/display/xenfb.c: Add trace_xenfb_key_event

It may be better to add a trace event to monitor the last moment of a key event from QEMU to guest VM

---
 hw/display/trace-events | 1 +
 hw/display/xenfb.c      | 2 ++
 2 files changed, 3 insertions(+)
hw/display/trace-events +1 -0
index ed8cca0755..da498c1def 100644
@@ -6,6 +6,7 @@ jazz_led_write(uint64_t addr, uint8_t new) "write addr=0x%"PRIx64": 0x%x"
 
 # hw/display/xenfb.c
 xenfb_mouse_event(void *opaque, int dx, int dy, int dz, int button_state, int abs_pointer_wanted) "%p x %d y %d z %d bs 0x%x abs %d"
+xenfb_key_event(void *opaque, int scancode, int button_state) "%p scancode %d bs 0x%x"
 xenfb_input_connected(void *xendev, int abs_pointer_wanted) "%p abs %d"
 
 # hw/display/g364fb.c
hw/display/xenfb.c +2 -0
index df8b78f6f4..afc43f33a2 100644
@@ -290,6 +290,8 @@ static void xenfb_key_event(void *opaque, int scancode)
 	scancode |= 0x80;
 	xenfb->extended = 0;
     }
+
+    trace_xenfb_key_event(opaque, scancode2linux[scancode], down);
     xenfb_send_key(xenfb, down, scancode2linux[scancode]);
 }
 
Signature · 7 lines
2.14.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel