Go to file
Peter Hutterer c0b0a9bce9 dix: add dtrace probes to input API
For driver debugging, it is helpful to know whether the driver has actually
submitted an event to the server. dtrace hooks can help here.

Note that GetPointerEvents and friends may also be triggered by the server
for other emulated devices, some care must be taken when analysing the
results.

Additional difficulty: proximity events have a run-time assigned type, so
this may make automatic detection a tad harder. If in doubt, go for any
event > 64 since the only two that can have that value are ProximityIn and
ProximityOut.

An example systemtap script is below:

  # Compile+run with
  #       stap -g xorg.stp /usr/bin/Xorg
  #

  function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{
          int i;
          unsigned char *mask = (unsigned char*)THIS->mask_in;
          double *valuators = (double*)THIS->valuators_in;
          char str[128] = {0};
          char *s = str;

  #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7)))

          s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators);
          for (i = 0; i < THIS->nvaluators; i++)
          {
                  s += sprintf(s, "	%d: ", i);
                  if (BitIsSet(mask, i))
                      s += sprintf(s, "%d", (int)valuators[i]);
          }

          sprintf(THIS->__retvalue, "%s", str);
  %}

  probe process(@1).mark("input__event")
  {
      deviceid = $arg1
      type = $arg2
      detail = $arg3
      flags = $arg4
      nvaluators = $arg5

      str = print_valuators(nvaluators, $arg6, $arg7)
      printf("Event: device %d type %d detail %d flags %#x %s\n",
              deviceid, type, detail, flags, str);
  }

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-03-22 11:33:42 +10:00
composite Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
config Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
damageext Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
dbe Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
dix dix: add dtrace probes to input API 2012-03-22 11:33:42 +10:00
doc dix: add dtrace probes to input API 2012-03-22 11:33:42 +10:00
exa Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
fb Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
glx Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
hw Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
include Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
m4 Use XORG_STRICT_OPTION from util-macros 1.14 to set -Werror flags 2011-05-27 19:51:05 -07:00
man Merge remote-tracking branch 'hramrach/pull' 2011-10-19 17:33:07 -07:00
mi Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
miext Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
os Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
randr Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
record Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
render Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
test Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Xext Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
xfixes Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
Xi Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
xkb Indentation: Change '& stuff' to '&stuff' 2012-03-21 14:02:30 -07:00
.gitignore doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00
autogen.sh autogen.sh: Pass --force to autoreconf 2008-07-22 16:55:26 +03:00
configure.ac Bump version number to 1.12.99.0 2012-03-14 11:32:36 -07:00
COPYING Add asprintf() implementation for platforms without it 2010-12-07 11:10:35 -08:00
devbook.am devbook.am: maintenance update from docbook.am 2011-09-21 14:07:52 -07:00
docbook.am docbook.am: embed css styles inside the HTML HEAD element 2011-09-21 14:07:49 -07:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am man: relocate manual pages in the man subdir outside doc 2011-05-13 14:08:17 -07:00
manpages.am Xdmx.man: Show actual configured XKB defaults instead of old hardcoded values 2011-06-21 17:54:14 -07:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: use PKG_CONFIG variable rather than executable name 2010-01-07 12:57:23 -08:00
xorg-server.pc.in xorg-server.pc.in: Remove libpciaccess and pixman-1 from Requires 2011-10-15 21:18:47 -07:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage