-
Notifications
You must be signed in to change notification settings - Fork 31
/
fq.d
106 lines (92 loc) · 3.34 KB
/
fq.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* Copyright (c) 2013 OmniTI Computer Consulting, Inc.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
typedef struct {
uintptr_t route;
uintptr_t sender;
uintptr_t exchange;
uintptr_t payload;
uint32_t payload_len;
uint64_t latency;
} fq_dtrace_msg_t;
typedef struct {
string route;
string exchange;
string sender;
string payload;
uint32_t payload_len;
uint64_t latency;
} fq_msg_t;
translator fq_msg_t <fq_dtrace_msg_t *m> {
route = copyinstr(*(uintptr_t *)copyin((uintptr_t)&m->route, sizeof(uintptr_t)));
exchange = copyinstr(*(uintptr_t *)copyin((uintptr_t)&m->exchange, sizeof(uintptr_t)));
sender = copyinstr(*(uintptr_t *)copyin((uintptr_t)&m->sender, sizeof(uintptr_t)));
payload_len = *(uint32_t *)copyin((uintptr_t)&m->payload_len, sizeof(uint32_t));
payload = copyinstr(*(uintptr_t *)copyin((uintptr_t)&m->payload, sizeof(uintptr_t)), *(uint32_t *)copyin((uintptr_t)&m->payload_len, sizeof(uint32_t)));
latency = *(uint64_t *)copyin((uintptr_t)&m->latency, sizeof(uint64_t));
};
typedef struct {
uintptr_t name;
int32_t isprivate;
int32_t policy;
uintptr_t type;
} fq_dtrace_queue_t;
typedef struct {
string name;
int32_t isprivate;
int32_t policy;
string type;
} fq_queue_t;
translator fq_queue_t <fq_dtrace_queue_t *m> {
name = copyinstr(*(uintptr_t *)copyin((uintptr_t)&m->name, sizeof(uintptr_t)));
type = copyinstr(*(uintptr_t *)copyin((uintptr_t)&m->type, sizeof(uintptr_t)));
isprivate = *(uint32_t *)copyin((uintptr_t)&m->isprivate, sizeof(int32_t));
policy = *(uint32_t *)copyin((uintptr_t)&m->policy, sizeof(int32_t));
};
typedef struct {
int32_t fd;
uintptr_t pretty;
} fq_dtrace_remote_anon_client_t;
typedef struct {
int32_t fd;
string pretty;
} fq_remote_anon_client_t;
typedef struct {
int32_t fd;
uintptr_t pretty;
} fq_dtrace_remote_client_t;
typedef struct {
int32_t fd;
string pretty;
} fq_remote_client_t;
typedef struct {
int32_t fd;
uintptr_t pretty;
} fq_dtrace_remote_data_client_t;
typedef struct {
int32_t fd;
string pretty;
} fq_remote_data_client_t;
translator fq_remote_anon_client_t <fq_dtrace_remote_anon_client_t *c> {
fd = *(uint32_t *)copyin((uintptr_t)&c->fd, sizeof(int32_t));
pretty = copyinstr(*(uintptr_t *)copyin((uintptr_t)&c->pretty, sizeof(uintptr_t)));
};