1*4882a593Smuzhiyun /* Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Permission is hereby granted, free of charge, to any person obtaining a 4*4882a593Smuzhiyun * copy of this software and associated documentation files (the "Software"), 5*4882a593Smuzhiyun * to deal in the Software without restriction, including without limitation 6*4882a593Smuzhiyun * the rights to use, copy, modify, merge, publish, distribute, sublicense, 7*4882a593Smuzhiyun * and/or sell copies of the Software, and to permit persons to whom the 8*4882a593Smuzhiyun * Software is furnished to do so, subject to the following conditions: 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * The above copyright notice and this permission notice (including the next 11*4882a593Smuzhiyun * paragraph) shall be included in all copies or substantial portions of the 12*4882a593Smuzhiyun * Software. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*4882a593Smuzhiyun * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*4882a593Smuzhiyun * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18*4882a593Smuzhiyun * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19*4882a593Smuzhiyun * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20*4882a593Smuzhiyun * DEALINGS IN THE SOFTWARE. 21*4882a593Smuzhiyun */ 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun /* 24*4882a593Smuzhiyun * Xserver dtrace provider definition 25*4882a593Smuzhiyun */ 26*4882a593Smuzhiyun #ifdef __APPLE__ 27*4882a593Smuzhiyun #define string char * 28*4882a593Smuzhiyun #define pid_t uint32_t 29*4882a593Smuzhiyun #define zoneid_t uint32_t 30*4882a593Smuzhiyun #elif defined(__FreeBSD__) 31*4882a593Smuzhiyun #define zoneid_t id_t 32*4882a593Smuzhiyun #else 33*4882a593Smuzhiyun #include <sys/types.h> 34*4882a593Smuzhiyun #endif 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun typedef const uint8_t *const_uint8_p; 37*4882a593Smuzhiyun typedef const double *const_double_p; 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun provider Xserver { 40*4882a593Smuzhiyun /* reqType, data, length, client id, request buffer */ 41*4882a593Smuzhiyun probe request__start(string, uint8_t, uint16_t, int, void *); 42*4882a593Smuzhiyun /* reqType, data, sequence, client id, result */ 43*4882a593Smuzhiyun probe request__done(string, uint8_t, uint32_t, int, int); 44*4882a593Smuzhiyun /* client id, client fd */ 45*4882a593Smuzhiyun probe client__connect(int, int); 46*4882a593Smuzhiyun /* client id, client address, client pid, client zone id */ 47*4882a593Smuzhiyun probe client__auth(int, string, pid_t, zoneid_t); 48*4882a593Smuzhiyun /* client id */ 49*4882a593Smuzhiyun probe client__disconnect(int); 50*4882a593Smuzhiyun /* resource id, resource type, value, resource type name */ 51*4882a593Smuzhiyun probe resource__alloc(uint32_t, uint32_t, void *, string); 52*4882a593Smuzhiyun /* resource id, resource type, value, resource type name */ 53*4882a593Smuzhiyun probe resource__free(uint32_t, uint32_t, void *, string); 54*4882a593Smuzhiyun /* client id, event type, event* */ 55*4882a593Smuzhiyun probe send__event(int, uint8_t, void *); 56*4882a593Smuzhiyun /* deviceid, type, button/keycode/touchid, flags, nvalues, mask, values */ 57*4882a593Smuzhiyun probe input__event(int, int, uint32_t, uint32_t, int8_t, const_uint8_p, const_double_p); 58*4882a593Smuzhiyun }; 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun #pragma D attributes Unstable/Unstable/Common provider Xserver provider 61*4882a593Smuzhiyun #pragma D attributes Private/Private/Unknown provider Xserver module 62*4882a593Smuzhiyun #pragma D attributes Private/Private/Unknown provider Xserver function 63*4882a593Smuzhiyun #pragma D attributes Unstable/Unstable/Common provider Xserver name 64*4882a593Smuzhiyun #pragma D attributes Unstable/Unstable/Common provider Xserver args 65*4882a593Smuzhiyun 66