From 0f834b91a4768673833ab4917e87d86c237bb1a6 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 23 Mar 2012 10:05:55 +0100 Subject: libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update 23 Mar 2012 --- xorg-server/doc/dtrace/Xserver-DTrace.xml | 153 +++++++++++++++++++++++++++++- 1 file changed, 151 insertions(+), 2 deletions(-) (limited to 'xorg-server/doc/dtrace/Xserver-DTrace.xml') diff --git a/xorg-server/doc/dtrace/Xserver-DTrace.xml b/xorg-server/doc/dtrace/Xserver-DTrace.xml index 5ef062980..91ca254d7 100644 --- a/xorg-server/doc/dtrace/Xserver-DTrace.xml +++ b/xorg-server/doc/dtrace/Xserver-DTrace.xml @@ -52,7 +52,9 @@ DEALINGS IN THE SOFTWARE. facility in Solaris 10, MacOS X 10.5, and later releases. This provider instruments various points in the X server, to allow - tracing what client applications are up to. + tracing what client applications are up to. DTrace probes may be used + with SystemTap + on GNU/Linux systems. @@ -81,7 +83,7 @@ DEALINGS IN THE SOFTWARE. Probes and their arguments - + @@ -89,6 +91,8 @@ DEALINGS IN THE SOFTWARE. + + @@ -99,6 +103,8 @@ DEALINGS IN THE SOFTWARE. arg2 arg3 arg4 + arg5 + arg6 @@ -113,6 +119,8 @@ DEALINGS IN THE SOFTWARE. requestLengthclientIdrequestBuffer + + request-done @@ -122,6 +130,8 @@ DEALINGS IN THE SOFTWARE. sequenceNumber clientId resultCode + + Event Probes @@ -132,7 +142,10 @@ DEALINGS IN THE SOFTWARE. clientId eventCode eventBuffer + + + Client Connection Probes @@ -142,7 +155,11 @@ DEALINGS IN THE SOFTWARE. Called when a new connection is opened from a client clientId clientFD + + + + client-auth @@ -152,12 +169,19 @@ DEALINGS IN THE SOFTWARE. clientPid clientZoneId + + client-disconnect Called when a client connection is closed clientId + + + + + Resource Allocation Probes @@ -170,6 +194,8 @@ DEALINGS IN THE SOFTWARE. resourceValue resourceTypeName + + resource-free @@ -179,6 +205,24 @@ DEALINGS IN THE SOFTWARE. resourceValue resourceTypeName + + + + + Input API probes + + + input-event + Called when an input event was submitted for processing + deviceid + eventtype + button or + keycode or + touchid + flags + nvalues + mask + values @@ -304,6 +348,44 @@ DEALINGS IN THE SOFTWARE. uint32_tNumber of X request in in this connection + + deviceid + int + The device's numerical ID + + + eventtype + int + Protocol event type + + + button, keycode, touchid + uint32_t + The button number, keycode or touch ID + + + flags + uint32_t + Miscellaneous event-specific server flags + + + nvalues + int8_t + Number of bits in mask and number of elements + in values + + + mask + uint8_t* + Binary mask indicating which indices in values contain + valid data + + + values + double* + Valuator values. Values for indices for which the + mask is not set are undefined +
@@ -572,6 +654,73 @@ Xserver$1:::client-disconnect + + Input API monitoring with SystemTap + + + This script can be used to monitor events submitted by drivers to + the server for enqueuing. Due to the integration of the input API + probes, some server-enqueued events will show up too. + + # 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); + } + + + Sample output from a run of this script: + +Event: device 13 type 4 detail 1 flags 0x0 nval: 0 :: +Event: device 13 type 6 detail 0 flags 0xa nval: 1 :: 0: 1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 4 1: -3 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -3 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1 +Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1 +Event: device 13 type 5 detail 1 flags 0x0 nval: 0 :: + + + + + -- cgit v1.2.3