diff mbox

Add trace messages to input.c.

Message ID 1421435282-1598-1-git-send-email-dkoch@verizon.com
State New
Headers show

Commit Message

Don Koch Jan. 16, 2015, 7:08 p.m. UTC
Signed-off-by: Don Koch <dkoch@verizon.com>
---
 trace-events | 1 +
 ui/input.c   | 1 +
 2 files changed, 2 insertions(+)

Comments

Gerd Hoffmann Jan. 19, 2015, 7:34 a.m. UTC | #1
On Fr, 2015-01-16 at 14:08 -0500, Don Koch wrote:
> Signed-off-by: Don Koch <dkoch@verizon.com>

> +    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
Don Koch Jan. 19, 2015, 2:31 p.m. UTC | #2
On Mon, 19 Jan 2015 08:34:22 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:

> On Fr, 2015-01-16 at 14:08 -0500, Don Koch wrote:
> > Signed-off-by: Don Koch <dkoch@verizon.com>
> 
> > +    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.

> 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

> cheers,
>   Gerd
> 
>
Gerd Hoffmann Jan. 22, 2015, 10:01 a.m. UTC | #3
Hi,

> 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
Don Koch Jan. 22, 2015, 2:32 p.m. UTC | #4
On Thu, 22 Jan 2015 11:01:14 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:

>   Hi,
> 
> > 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

> cheers,
>   Gerd
> 
>
diff mbox

Patch

diff --git a/trace-events b/trace-events
index 97c7ac3..6a60f19 100644
--- a/trace-events
+++ b/trace-events
@@ -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"
diff --git a/ui/input.c b/ui/input.c
index 7ba99e5..35dd783 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -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;