Skip to contentSkip to conversation

Add trace messages to input.c.

PATCH In review Don Koch 2 participants 5 messages Jan 16, 2015 – Jan 22, 2015

lore
Share & tools
lore

Don Koch

author
#0 lore raw

PATCH 1/1 Add trace messages to input.c.

---
 trace-events | 1 +
 ui/input.c   | 1 +
 2 files changed, 2 insertions(+)
trace-events +1 -0
index 97c7ac3..6a60f19 100644
@@ -1136,6 +1136,7 @@ vnc_key_sync_numlock(bool on) "%d"
 vnc_key_sync_capslock(bool on) "%d"
 
 # ui/input.c
+do_mouse_set(void *mon, int index) "%p index %d"
 input_event_key_number(int conidx, int number, const char *qcode, bool down) "con %d, key number 0x%x [%s], down %d"
 input_event_key_qcode(int conidx, const char *qcode, bool down) "con %d, key qcode %s, down %d"
 input_event_btn(int conidx, const char *btn, bool down) "con %d, button %s, down %d"
ui/input.c +1 -0
index 7ba99e5..35dd783 100644
@@ -532,6 +532,7 @@ void do_mouse_set(Monitor *mon, const QDict *qdict)
     int index = qdict_get_int(qdict, "index");
     int found = 0;
 
+    trace_do_mouse_set(mon, index);
     QTAILQ_FOREACH(s, &handlers, node) {
         if (s->id != index) {
             continue;
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · Don Koch

+ trace_do_mouse_set(mon, index);

First, I think we should have a better name for that one, maybe "input_mouse_set" ?

Second I'm wondering what the use case is. The place is a bit strange (tracing management not guest behavior), also all the existing input trace points log the device index so you can already see how the events are routed ...

cheers,
Gerd

author
#2 lore raw
Quoted 7 lines · On Mon, 19 Jan 2015 08:34:22 +0100 Gerd Hoffmann <[email protected]> wrote:
Quoted 3 lines · Don Koch

+ trace_do_mouse_set(mon, index);

First, I think we should have a better name for that one, maybe "input_mouse_set" ?

The trace name or the routine it's in? The trace name was obviously taken from the name of the routine it is in.

Quoted 4 lines

Second I'm wondering what the use case is. The place is a bit strange (tracing management not guest behavior), also all the existing input trace points log the device index so you can already see how the events are routed ...

I believe this was used for debugging vmware mouse support we've been working on.

Thanks,
-d

Quoted 4 lines

cheers,
Gerd

#3 lore raw

Hi,

Quoted 2 lines

I believe this was used for debugging vmware mouse support we've been working on.

Wouldn't it be more useful to trace qemu_input_handler_* calls for that, especially qemu_input_handler_activate? So you also see changes triggered by the guest, such as enabling vmmouse, or initializing the usb-tablet?

cheers,
Gerd

author
#4 lore raw
Quoted 9 lines · On Thu, 22 Jan 2015 11:01:14 +0100 Gerd Hoffmann <[email protected]> wrote:

Hi,

Quoted 2 lines

I believe this was used for debugging vmware mouse support we've been working on.

Wouldn't it be more useful to trace qemu_input_handler_* calls for that, especially qemu_input_handler_activate? So you also see changes triggered by the guest, such as enabling vmmouse, or initializing the usb-tablet?

Could be. This was for an effort done in the past; so, I've forgetten the context. We can drop this change, if you want.

Thanks,
-d

Quoted 4 lines

cheers,
Gerd