Project

General

Profile

Bug #6653 » Xserver.d

Richard PALO, 2016-07-07 09:58 AM

 
1
/* Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved.
2
 *
3
 * Permission is hereby granted, free of charge, to any person obtaining a
4
 * copy of this software and associated documentation files (the "Software"),
5
 * to deal in the Software without restriction, including without limitation
6
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7
 * and/or sell copies of the Software, and to permit persons to whom the
8
 * Software is furnished to do so, subject to the following conditions:
9
 *
10
 * The above copyright notice and this permission notice (including the next
11
 * paragraph) shall be included in all copies or substantial portions of the
12
 * Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
 * DEALINGS IN THE SOFTWARE.
21
 */
22

    
23
/*
24
 * Xserver dtrace provider definition
25
 */
26
#ifdef __APPLE__
27
#define string char *
28
#define pid_t uint32_t
29
#define zoneid_t uint32_t
30
#else
31
#include <sys/types.h>
32
#endif
33

    
34
typedef const uint8_t *const_uint8_p;
35
typedef const double *const_double_p;
36

    
37
provider Xserver {
38
	/* reqType, data, length, client id, request buffer */
39
	probe request__start(string, uint8_t, uint16_t, int, void *);
40
	/* reqType, data, sequence, client id, result */
41
	probe request__done(string, uint8_t, uint32_t, int, int);
42
	/* client id, client fd */
43
	probe client__connect(int, int);
44
	/* client id, client address, client pid, client zone id */
45
	probe client__auth(int, string, pid_t, zoneid_t);
46
	/* client id */
47
	probe client__disconnect(int);
48
	/* resource id, resource type, value, resource type name */
49
	probe resource__alloc(uint32_t, uint32_t, void *, string);
50
	/* resource id, resource type, value, resource type name */
51
	probe resource__free(uint32_t, uint32_t, void *, string);
52
	/* client id, event type, event* */
53
	probe send__event(int, uint8_t, void *);
54
	/* deviceid, type, button/keycode/touchid, flags, nvalues, mask, values */
55
	probe input__event(int, int, uint32_t, uint32_t, int8_t, const_uint8_p, const_double_p);
56
};
57

    
58
#pragma D attributes Unstable/Unstable/Common provider Xserver provider
59
#pragma D attributes Private/Private/Unknown  provider Xserver module
60
#pragma D attributes Private/Private/Unknown  provider Xserver function
61
#pragma D attributes Unstable/Unstable/Common provider Xserver name
62
#pragma D attributes Unstable/Unstable/Common provider Xserver args
63

    
(1-1/2)