Commit | Line | Data |
---|---|---|
b4d0d230 | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
8e8d7f13 DH |
2 | /* AFS tracepoints |
3 | * | |
4 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. | |
5 | * Written by David Howells (dhowells@redhat.com) | |
8e8d7f13 DH |
6 | */ |
7 | #undef TRACE_SYSTEM | |
8 | #define TRACE_SYSTEM afs | |
9 | ||
10 | #if !defined(_TRACE_AFS_H) || defined(TRACE_HEADER_MULTI_READ) | |
11 | #define _TRACE_AFS_H | |
12 | ||
13 | #include <linux/tracepoint.h> | |
14 | ||
341f741f DH |
15 | /* |
16 | * Define enums for tracing information. | |
17 | */ | |
18 | #ifndef __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY | |
19 | #define __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY | |
20 | ||
025db80c DH |
21 | enum afs_fs_operation { |
22 | afs_FS_FetchData = 130, /* AFS Fetch file data */ | |
260f082b | 23 | afs_FS_FetchACL = 131, /* AFS Fetch file ACL */ |
025db80c DH |
24 | afs_FS_FetchStatus = 132, /* AFS Fetch file status */ |
25 | afs_FS_StoreData = 133, /* AFS Store file data */ | |
b10494af | 26 | afs_FS_StoreACL = 134, /* AFS Store file ACL */ |
025db80c DH |
27 | afs_FS_StoreStatus = 135, /* AFS Store file status */ |
28 | afs_FS_RemoveFile = 136, /* AFS Remove a file */ | |
29 | afs_FS_CreateFile = 137, /* AFS Create a file */ | |
30 | afs_FS_Rename = 138, /* AFS Rename or move a file or directory */ | |
31 | afs_FS_Symlink = 139, /* AFS Create a symbolic link */ | |
32 | afs_FS_Link = 140, /* AFS Create a hard link */ | |
33 | afs_FS_MakeDir = 141, /* AFS Create a directory */ | |
34 | afs_FS_RemoveDir = 142, /* AFS Remove a directory */ | |
35 | afs_FS_GetVolumeInfo = 148, /* AFS Get information about a volume */ | |
36 | afs_FS_GetVolumeStatus = 149, /* AFS Get volume status information */ | |
37 | afs_FS_GetRootVolume = 151, /* AFS Get root volume name */ | |
38 | afs_FS_SetLock = 156, /* AFS Request a file lock */ | |
39 | afs_FS_ExtendLock = 157, /* AFS Extend a file lock */ | |
40 | afs_FS_ReleaseLock = 158, /* AFS Release a file lock */ | |
41 | afs_FS_Lookup = 161, /* AFS lookup file in directory */ | |
5cf9dd55 | 42 | afs_FS_InlineBulkStatus = 65536, /* AFS Fetch multiple file statuses with errors */ |
025db80c DH |
43 | afs_FS_FetchData64 = 65537, /* AFS Fetch file data */ |
44 | afs_FS_StoreData64 = 65538, /* AFS Store file data */ | |
45 | afs_FS_GiveUpAllCallBacks = 65539, /* AFS Give up all our callbacks on a server */ | |
46 | afs_FS_GetCapabilities = 65540, /* AFS Get FS server capabilities */ | |
30062bd1 DH |
47 | |
48 | yfs_FS_FetchData = 130, /* YFS Fetch file data */ | |
49 | yfs_FS_FetchACL = 64131, /* YFS Fetch file ACL */ | |
50 | yfs_FS_FetchStatus = 64132, /* YFS Fetch file status */ | |
51 | yfs_FS_StoreACL = 64134, /* YFS Store file ACL */ | |
52 | yfs_FS_StoreStatus = 64135, /* YFS Store file status */ | |
53 | yfs_FS_RemoveFile = 64136, /* YFS Remove a file */ | |
54 | yfs_FS_CreateFile = 64137, /* YFS Create a file */ | |
55 | yfs_FS_Rename = 64138, /* YFS Rename or move a file or directory */ | |
56 | yfs_FS_Symlink = 64139, /* YFS Create a symbolic link */ | |
57 | yfs_FS_Link = 64140, /* YFS Create a hard link */ | |
58 | yfs_FS_MakeDir = 64141, /* YFS Create a directory */ | |
59 | yfs_FS_RemoveDir = 64142, /* YFS Remove a directory */ | |
60 | yfs_FS_GetVolumeStatus = 64149, /* YFS Get volume status information */ | |
61 | yfs_FS_SetVolumeStatus = 64150, /* YFS Set volume status information */ | |
62 | yfs_FS_SetLock = 64156, /* YFS Request a file lock */ | |
63 | yfs_FS_ExtendLock = 64157, /* YFS Extend a file lock */ | |
64 | yfs_FS_ReleaseLock = 64158, /* YFS Release a file lock */ | |
65 | yfs_FS_Lookup = 64161, /* YFS lookup file in directory */ | |
66 | yfs_FS_FlushCPS = 64165, | |
67 | yfs_FS_FetchOpaqueACL = 64168, | |
68 | yfs_FS_WhoAmI = 64170, | |
69 | yfs_FS_RemoveACL = 64171, | |
70 | yfs_FS_RemoveFile2 = 64173, | |
71 | yfs_FS_StoreOpaqueACL2 = 64174, | |
72 | yfs_FS_InlineBulkStatus = 64536, /* YFS Fetch multiple file statuses with errors */ | |
73 | yfs_FS_FetchData64 = 64537, /* YFS Fetch file data */ | |
74 | yfs_FS_StoreData64 = 64538, /* YFS Store file data */ | |
75 | yfs_FS_UpdateSymlink = 64540, | |
025db80c DH |
76 | }; |
77 | ||
78 | enum afs_vl_operation { | |
79 | afs_VL_GetEntryByNameU = 527, /* AFS Get Vol Entry By Name operation ID */ | |
80 | afs_VL_GetAddrsU = 533, /* AFS Get FS server addresses */ | |
81 | afs_YFSVL_GetEndpoints = 64002, /* YFS Get FS & Vol server addresses */ | |
c3e9f888 | 82 | afs_YFSVL_GetCellName = 64014, /* YFS Get actual cell name */ |
025db80c DH |
83 | afs_VL_GetCapabilities = 65537, /* AFS Get VL server capabilities */ |
84 | }; | |
85 | ||
6c881ca0 DH |
86 | enum afs_cm_operation { |
87 | afs_CB_CallBack = 204, /* AFS break callback promises */ | |
88 | afs_CB_InitCallBackState = 205, /* AFS initialise callback state */ | |
89 | afs_CB_Probe = 206, /* AFS probe client */ | |
90 | afs_CB_GetLock = 207, /* AFS get contents of CM lock table */ | |
91 | afs_CB_GetCE = 208, /* AFS get cache file description */ | |
92 | afs_CB_GetXStatsVersion = 209, /* AFS get version of extended statistics */ | |
93 | afs_CB_GetXStats = 210, /* AFS get contents of extended statistics data */ | |
94 | afs_CB_InitCallBackState3 = 213, /* AFS initialise callback state, version 3 */ | |
95 | afs_CB_ProbeUuid = 214, /* AFS check the client hasn't rebooted */ | |
96 | }; | |
97 | ||
98 | enum yfs_cm_operation { | |
99 | yfs_CB_Probe = 206, /* YFS probe client */ | |
100 | yfs_CB_GetLock = 207, /* YFS get contents of CM lock table */ | |
101 | yfs_CB_XStatsVersion = 209, /* YFS get version of extended statistics */ | |
102 | yfs_CB_GetXStats = 210, /* YFS get contents of extended statistics data */ | |
103 | yfs_CB_InitCallBackState3 = 213, /* YFS initialise callback state, version 3 */ | |
104 | yfs_CB_ProbeUuid = 214, /* YFS check the client hasn't rebooted */ | |
105 | yfs_CB_GetServerPrefs = 215, | |
106 | yfs_CB_GetCellServDV = 216, | |
107 | yfs_CB_GetLocalCell = 217, | |
108 | yfs_CB_GetCacheConfig = 218, | |
109 | yfs_CB_GetCellByNum = 65537, | |
110 | yfs_CB_TellMeAboutYourself = 65538, /* get client capabilities */ | |
111 | yfs_CB_CallBack = 64204, | |
112 | }; | |
113 | ||
341f741f DH |
114 | #endif /* end __AFS_DECLARE_TRACE_ENUMS_ONCE_ONLY */ |
115 | ||
116 | /* | |
117 | * Declare tracing information enums and their string mappings for display. | |
118 | */ | |
119 | #define afs_call_traces \ | |
120 | EM(afs_call_trace_alloc, "ALLOC") \ | |
121 | EM(afs_call_trace_free, "FREE ") \ | |
34fa4761 | 122 | EM(afs_call_trace_get, "GET ") \ |
341f741f DH |
123 | EM(afs_call_trace_put, "PUT ") \ |
124 | EM(afs_call_trace_wake, "WAKE ") \ | |
4636cf18 | 125 | E_(afs_call_trace_work, "QUEUE") |
341f741f | 126 | |
45218193 DH |
127 | #define afs_server_traces \ |
128 | EM(afs_server_trace_alloc, "ALLOC ") \ | |
129 | EM(afs_server_trace_callback, "CALLBACK ") \ | |
130 | EM(afs_server_trace_destroy, "DESTROY ") \ | |
131 | EM(afs_server_trace_free, "FREE ") \ | |
132 | EM(afs_server_trace_gc, "GC ") \ | |
977e5f8e | 133 | EM(afs_server_trace_get_by_addr, "GET addr ") \ |
45218193 DH |
134 | EM(afs_server_trace_get_by_uuid, "GET uuid ") \ |
135 | EM(afs_server_trace_get_caps, "GET caps ") \ | |
136 | EM(afs_server_trace_get_install, "GET inst ") \ | |
137 | EM(afs_server_trace_get_new_cbi, "GET cbi ") \ | |
f6cbb368 | 138 | EM(afs_server_trace_get_probe, "GET probe") \ |
45218193 | 139 | EM(afs_server_trace_give_up_cb, "giveup-cb") \ |
7530d3eb | 140 | EM(afs_server_trace_purging, "PURGE ") \ |
45218193 DH |
141 | EM(afs_server_trace_put_call, "PUT call ") \ |
142 | EM(afs_server_trace_put_cbi, "PUT cbi ") \ | |
143 | EM(afs_server_trace_put_find_rsq, "PUT f-rsq") \ | |
f6cbb368 | 144 | EM(afs_server_trace_put_probe, "PUT probe") \ |
45218193 DH |
145 | EM(afs_server_trace_put_slist, "PUT slist") \ |
146 | EM(afs_server_trace_put_slist_isort, "PUT isort") \ | |
147 | EM(afs_server_trace_put_uuid_rsq, "PUT u-req") \ | |
148 | E_(afs_server_trace_update, "UPDATE") | |
149 | ||
cca37d45 DH |
150 | #define afs_volume_traces \ |
151 | EM(afs_volume_trace_alloc, "ALLOC ") \ | |
152 | EM(afs_volume_trace_free, "FREE ") \ | |
153 | EM(afs_volume_trace_get_alloc_sbi, "GET sbi-alloc ") \ | |
32222f09 | 154 | EM(afs_volume_trace_get_callback, "GET callback ") \ |
cca37d45 DH |
155 | EM(afs_volume_trace_get_cell_insert, "GET cell-insrt") \ |
156 | EM(afs_volume_trace_get_new_op, "GET op-new ") \ | |
157 | EM(afs_volume_trace_get_query_alias, "GET cell-alias") \ | |
32222f09 | 158 | EM(afs_volume_trace_put_callback, "PUT callback ") \ |
cca37d45 DH |
159 | EM(afs_volume_trace_put_cell_dup, "PUT cell-dup ") \ |
160 | EM(afs_volume_trace_put_cell_root, "PUT cell-root ") \ | |
161 | EM(afs_volume_trace_put_destroy_sbi, "PUT sbi-destry") \ | |
162 | EM(afs_volume_trace_put_free_fc, "PUT fc-free ") \ | |
163 | EM(afs_volume_trace_put_put_op, "PUT op-put ") \ | |
164 | EM(afs_volume_trace_put_query_alias, "PUT cell-alias") \ | |
165 | EM(afs_volume_trace_put_validate_fc, "PUT fc-validat") \ | |
166 | E_(afs_volume_trace_remove, "REMOVE ") | |
167 | ||
dca54a7b DH |
168 | #define afs_cell_traces \ |
169 | EM(afs_cell_trace_alloc, "ALLOC ") \ | |
170 | EM(afs_cell_trace_free, "FREE ") \ | |
171 | EM(afs_cell_trace_get_queue_dns, "GET q-dns ") \ | |
172 | EM(afs_cell_trace_get_queue_manage, "GET q-mng ") \ | |
173 | EM(afs_cell_trace_get_queue_new, "GET q-new ") \ | |
174 | EM(afs_cell_trace_get_vol, "GET vol ") \ | |
175 | EM(afs_cell_trace_insert, "INSERT ") \ | |
176 | EM(afs_cell_trace_manage, "MANAGE ") \ | |
177 | EM(afs_cell_trace_put_candidate, "PUT candid") \ | |
178 | EM(afs_cell_trace_put_destroy, "PUT destry") \ | |
179 | EM(afs_cell_trace_put_queue_work, "PUT q-work") \ | |
180 | EM(afs_cell_trace_put_queue_fail, "PUT q-fail") \ | |
181 | EM(afs_cell_trace_put_vol, "PUT vol ") \ | |
182 | EM(afs_cell_trace_see_source, "SEE source") \ | |
183 | EM(afs_cell_trace_see_ws, "SEE ws ") \ | |
184 | EM(afs_cell_trace_unuse_alias, "UNU alias ") \ | |
185 | EM(afs_cell_trace_unuse_check_alias, "UNU chk-al") \ | |
186 | EM(afs_cell_trace_unuse_delete, "UNU delete") \ | |
187 | EM(afs_cell_trace_unuse_fc, "UNU fc ") \ | |
188 | EM(afs_cell_trace_unuse_lookup, "UNU lookup") \ | |
189 | EM(afs_cell_trace_unuse_mntpt, "UNU mntpt ") \ | |
2daa6404 | 190 | EM(afs_cell_trace_unuse_no_pin, "UNU no-pin") \ |
dca54a7b DH |
191 | EM(afs_cell_trace_unuse_parse, "UNU parse ") \ |
192 | EM(afs_cell_trace_unuse_pin, "UNU pin ") \ | |
193 | EM(afs_cell_trace_unuse_probe, "UNU probe ") \ | |
194 | EM(afs_cell_trace_unuse_sbi, "UNU sbi ") \ | |
195 | EM(afs_cell_trace_unuse_ws, "UNU ws ") \ | |
196 | EM(afs_cell_trace_use_alias, "USE alias ") \ | |
197 | EM(afs_cell_trace_use_check_alias, "USE chk-al") \ | |
198 | EM(afs_cell_trace_use_fc, "USE fc ") \ | |
199 | EM(afs_cell_trace_use_fc_alias, "USE fc-al ") \ | |
200 | EM(afs_cell_trace_use_lookup, "USE lookup") \ | |
201 | EM(afs_cell_trace_use_mntpt, "USE mntpt ") \ | |
202 | EM(afs_cell_trace_use_pin, "USE pin ") \ | |
203 | EM(afs_cell_trace_use_probe, "USE probe ") \ | |
204 | EM(afs_cell_trace_use_sbi, "USE sbi ") \ | |
205 | E_(afs_cell_trace_wait, "WAIT ") | |
206 | ||
1e5d8493 DH |
207 | #define afs_alist_traces \ |
208 | EM(afs_alist_trace_alloc, "ALLOC ") \ | |
f49b594d | 209 | EM(afs_alist_trace_get_estate, "GET estate") \ |
98f9fda2 DH |
210 | EM(afs_alist_trace_get_vlgetcaps, "GET vgtcap") \ |
211 | EM(afs_alist_trace_get_vlprobe, "GET vprobe") \ | |
1e5d8493 | 212 | EM(afs_alist_trace_get_vlrotate_set, "GET vl-rot") \ |
f49b594d | 213 | EM(afs_alist_trace_put_estate, "PUT estate") \ |
1e5d8493 DH |
214 | EM(afs_alist_trace_put_getaddru, "PUT GtAdrU") \ |
215 | EM(afs_alist_trace_put_parse_empty, "PUT p-empt") \ | |
216 | EM(afs_alist_trace_put_parse_error, "PUT p-err ") \ | |
1e5d8493 DH |
217 | EM(afs_alist_trace_put_server_dup, "PUT sv-dup") \ |
218 | EM(afs_alist_trace_put_server_oom, "PUT sv-oom") \ | |
219 | EM(afs_alist_trace_put_server_update, "PUT sv-upd") \ | |
98f9fda2 DH |
220 | EM(afs_alist_trace_put_vlgetcaps, "PUT vgtcap") \ |
221 | EM(afs_alist_trace_put_vlprobe, "PUT vprobe") \ | |
222 | EM(afs_alist_trace_put_vlrotate_end, "PUT vr-end") \ | |
223 | EM(afs_alist_trace_put_vlrotate_fail, "PUT vr-fai") \ | |
224 | EM(afs_alist_trace_put_vlrotate_next, "PUT vr-nxt") \ | |
225 | EM(afs_alist_trace_put_vlrotate_restart,"PUT vr-rst") \ | |
1e5d8493 DH |
226 | EM(afs_alist_trace_put_vlserver, "PUT vlsrvr") \ |
227 | EM(afs_alist_trace_put_vlserver_old, "PUT vs-old") \ | |
228 | E_(afs_alist_trace_free, "FREE ") | |
229 | ||
f49b594d DH |
230 | #define afs_estate_traces \ |
231 | EM(afs_estate_trace_alloc_probe, "ALLOC prob") \ | |
232 | EM(afs_estate_trace_alloc_server, "ALLOC srvr") \ | |
495f2ae9 | 233 | EM(afs_estate_trace_get_server_state, "GET srv-st") \ |
f49b594d DH |
234 | EM(afs_estate_trace_get_getcaps, "GET getcap") \ |
235 | EM(afs_estate_trace_put_getcaps, "PUT getcap") \ | |
f49b594d | 236 | EM(afs_estate_trace_put_probe, "PUT probe ") \ |
f49b594d | 237 | EM(afs_estate_trace_put_server, "PUT server") \ |
495f2ae9 | 238 | EM(afs_estate_trace_put_server_state, "PUT srv-st") \ |
f49b594d DH |
239 | E_(afs_estate_trace_free, "FREE ") |
240 | ||
025db80c DH |
241 | #define afs_fs_operations \ |
242 | EM(afs_FS_FetchData, "FS.FetchData") \ | |
243 | EM(afs_FS_FetchStatus, "FS.FetchStatus") \ | |
244 | EM(afs_FS_StoreData, "FS.StoreData") \ | |
245 | EM(afs_FS_StoreStatus, "FS.StoreStatus") \ | |
246 | EM(afs_FS_RemoveFile, "FS.RemoveFile") \ | |
247 | EM(afs_FS_CreateFile, "FS.CreateFile") \ | |
248 | EM(afs_FS_Rename, "FS.Rename") \ | |
249 | EM(afs_FS_Symlink, "FS.Symlink") \ | |
250 | EM(afs_FS_Link, "FS.Link") \ | |
251 | EM(afs_FS_MakeDir, "FS.MakeDir") \ | |
252 | EM(afs_FS_RemoveDir, "FS.RemoveDir") \ | |
253 | EM(afs_FS_GetVolumeInfo, "FS.GetVolumeInfo") \ | |
254 | EM(afs_FS_GetVolumeStatus, "FS.GetVolumeStatus") \ | |
255 | EM(afs_FS_GetRootVolume, "FS.GetRootVolume") \ | |
256 | EM(afs_FS_SetLock, "FS.SetLock") \ | |
257 | EM(afs_FS_ExtendLock, "FS.ExtendLock") \ | |
258 | EM(afs_FS_ReleaseLock, "FS.ReleaseLock") \ | |
259 | EM(afs_FS_Lookup, "FS.Lookup") \ | |
5cf9dd55 | 260 | EM(afs_FS_InlineBulkStatus, "FS.InlineBulkStatus") \ |
025db80c DH |
261 | EM(afs_FS_FetchData64, "FS.FetchData64") \ |
262 | EM(afs_FS_StoreData64, "FS.StoreData64") \ | |
263 | EM(afs_FS_GiveUpAllCallBacks, "FS.GiveUpAllCallBacks") \ | |
30062bd1 DH |
264 | EM(afs_FS_GetCapabilities, "FS.GetCapabilities") \ |
265 | EM(yfs_FS_FetchACL, "YFS.FetchACL") \ | |
266 | EM(yfs_FS_FetchStatus, "YFS.FetchStatus") \ | |
267 | EM(yfs_FS_StoreACL, "YFS.StoreACL") \ | |
268 | EM(yfs_FS_StoreStatus, "YFS.StoreStatus") \ | |
269 | EM(yfs_FS_RemoveFile, "YFS.RemoveFile") \ | |
270 | EM(yfs_FS_CreateFile, "YFS.CreateFile") \ | |
271 | EM(yfs_FS_Rename, "YFS.Rename") \ | |
272 | EM(yfs_FS_Symlink, "YFS.Symlink") \ | |
273 | EM(yfs_FS_Link, "YFS.Link") \ | |
274 | EM(yfs_FS_MakeDir, "YFS.MakeDir") \ | |
275 | EM(yfs_FS_RemoveDir, "YFS.RemoveDir") \ | |
276 | EM(yfs_FS_GetVolumeStatus, "YFS.GetVolumeStatus") \ | |
277 | EM(yfs_FS_SetVolumeStatus, "YFS.SetVolumeStatus") \ | |
278 | EM(yfs_FS_SetLock, "YFS.SetLock") \ | |
279 | EM(yfs_FS_ExtendLock, "YFS.ExtendLock") \ | |
280 | EM(yfs_FS_ReleaseLock, "YFS.ReleaseLock") \ | |
281 | EM(yfs_FS_Lookup, "YFS.Lookup") \ | |
282 | EM(yfs_FS_FlushCPS, "YFS.FlushCPS") \ | |
283 | EM(yfs_FS_FetchOpaqueACL, "YFS.FetchOpaqueACL") \ | |
284 | EM(yfs_FS_WhoAmI, "YFS.WhoAmI") \ | |
285 | EM(yfs_FS_RemoveACL, "YFS.RemoveACL") \ | |
286 | EM(yfs_FS_RemoveFile2, "YFS.RemoveFile2") \ | |
287 | EM(yfs_FS_StoreOpaqueACL2, "YFS.StoreOpaqueACL2") \ | |
288 | EM(yfs_FS_InlineBulkStatus, "YFS.InlineBulkStatus") \ | |
289 | EM(yfs_FS_FetchData64, "YFS.FetchData64") \ | |
290 | EM(yfs_FS_StoreData64, "YFS.StoreData64") \ | |
291 | E_(yfs_FS_UpdateSymlink, "YFS.UpdateSymlink") | |
025db80c DH |
292 | |
293 | #define afs_vl_operations \ | |
294 | EM(afs_VL_GetEntryByNameU, "VL.GetEntryByNameU") \ | |
295 | EM(afs_VL_GetAddrsU, "VL.GetAddrsU") \ | |
296 | EM(afs_YFSVL_GetEndpoints, "YFSVL.GetEndpoints") \ | |
c3e9f888 | 297 | EM(afs_YFSVL_GetCellName, "YFSVL.GetCellName") \ |
025db80c DH |
298 | E_(afs_VL_GetCapabilities, "VL.GetCapabilities") |
299 | ||
6c881ca0 DH |
300 | #define afs_cm_operations \ |
301 | EM(afs_CB_CallBack, "CB.CallBack") \ | |
302 | EM(afs_CB_InitCallBackState, "CB.InitCallBackState") \ | |
303 | EM(afs_CB_Probe, "CB.Probe") \ | |
304 | EM(afs_CB_GetLock, "CB.GetLock") \ | |
305 | EM(afs_CB_GetCE, "CB.GetCE") \ | |
306 | EM(afs_CB_GetXStatsVersion, "CB.GetXStatsVersion") \ | |
307 | EM(afs_CB_GetXStats, "CB.GetXStats") \ | |
308 | EM(afs_CB_InitCallBackState3, "CB.InitCallBackState3") \ | |
309 | E_(afs_CB_ProbeUuid, "CB.ProbeUuid") | |
310 | ||
311 | #define yfs_cm_operations \ | |
312 | EM(yfs_CB_Probe, "YFSCB.Probe") \ | |
313 | EM(yfs_CB_GetLock, "YFSCB.GetLock") \ | |
314 | EM(yfs_CB_XStatsVersion, "YFSCB.XStatsVersion") \ | |
315 | EM(yfs_CB_GetXStats, "YFSCB.GetXStats") \ | |
316 | EM(yfs_CB_InitCallBackState3, "YFSCB.InitCallBackState3") \ | |
317 | EM(yfs_CB_ProbeUuid, "YFSCB.ProbeUuid") \ | |
318 | EM(yfs_CB_GetServerPrefs, "YFSCB.GetServerPrefs") \ | |
319 | EM(yfs_CB_GetCellServDV, "YFSCB.GetCellServDV") \ | |
320 | EM(yfs_CB_GetLocalCell, "YFSCB.GetLocalCell") \ | |
321 | EM(yfs_CB_GetCacheConfig, "YFSCB.GetCacheConfig") \ | |
322 | EM(yfs_CB_GetCellByNum, "YFSCB.GetCellByNum") \ | |
323 | EM(yfs_CB_TellMeAboutYourself, "YFSCB.TellMeAboutYourself") \ | |
324 | E_(yfs_CB_CallBack, "YFSCB.CallBack") | |
325 | ||
63a4681f DH |
326 | #define afs_edit_dir_ops \ |
327 | EM(afs_edit_dir_create, "create") \ | |
328 | EM(afs_edit_dir_create_error, "c_fail") \ | |
329 | EM(afs_edit_dir_create_inval, "c_invl") \ | |
330 | EM(afs_edit_dir_create_nospc, "c_nspc") \ | |
331 | EM(afs_edit_dir_delete, "delete") \ | |
332 | EM(afs_edit_dir_delete_error, "d_err ") \ | |
333 | EM(afs_edit_dir_delete_inval, "d_invl") \ | |
334 | E_(afs_edit_dir_delete_noent, "d_nent") | |
335 | ||
336 | #define afs_edit_dir_reasons \ | |
337 | EM(afs_edit_dir_for_create, "Create") \ | |
338 | EM(afs_edit_dir_for_link, "Link ") \ | |
339 | EM(afs_edit_dir_for_mkdir, "MkDir ") \ | |
79ddbfa5 DH |
340 | EM(afs_edit_dir_for_rename_0, "Renam0") \ |
341 | EM(afs_edit_dir_for_rename_1, "Renam1") \ | |
342 | EM(afs_edit_dir_for_rename_2, "Renam2") \ | |
63a4681f | 343 | EM(afs_edit_dir_for_rmdir, "RmDir ") \ |
79ddbfa5 DH |
344 | EM(afs_edit_dir_for_silly_0, "S_Ren0") \ |
345 | EM(afs_edit_dir_for_silly_1, "S_Ren1") \ | |
63a4681f DH |
346 | EM(afs_edit_dir_for_symlink, "Symlnk") \ |
347 | E_(afs_edit_dir_for_unlink, "Unlink") | |
348 | ||
160cb957 DH |
349 | #define afs_eproto_causes \ |
350 | EM(afs_eproto_bad_status, "BadStatus") \ | |
351 | EM(afs_eproto_cb_count, "CbCount") \ | |
352 | EM(afs_eproto_cb_fid_count, "CbFidCount") \ | |
c3e9f888 | 353 | EM(afs_eproto_cellname_len, "CellNameLen") \ |
160cb957 DH |
354 | EM(afs_eproto_file_type, "FileTYpe") \ |
355 | EM(afs_eproto_ibulkst_cb_count, "IBS.CbCount") \ | |
356 | EM(afs_eproto_ibulkst_count, "IBS.FidCount") \ | |
357 | EM(afs_eproto_motd_len, "MotdLen") \ | |
358 | EM(afs_eproto_offline_msg_len, "OfflineMsgLen") \ | |
359 | EM(afs_eproto_volname_len, "VolNameLen") \ | |
360 | EM(afs_eproto_yvl_fsendpt4_len, "YVL.FsEnd4Len") \ | |
361 | EM(afs_eproto_yvl_fsendpt6_len, "YVL.FsEnd6Len") \ | |
362 | EM(afs_eproto_yvl_fsendpt_num, "YVL.FsEndCount") \ | |
363 | EM(afs_eproto_yvl_fsendpt_type, "YVL.FsEndType") \ | |
364 | EM(afs_eproto_yvl_vlendpt4_len, "YVL.VlEnd4Len") \ | |
365 | EM(afs_eproto_yvl_vlendpt6_len, "YVL.VlEnd6Len") \ | |
366 | E_(afs_eproto_yvl_vlendpt_type, "YVL.VlEndType") | |
367 | ||
f51375cd DH |
368 | #define afs_io_errors \ |
369 | EM(afs_io_error_cm_reply, "CM_REPLY") \ | |
370 | EM(afs_io_error_extract, "EXTRACT") \ | |
371 | EM(afs_io_error_fs_probe_fail, "FS_PROBE_FAIL") \ | |
3bf0fb6f DH |
372 | EM(afs_io_error_vl_lookup_fail, "VL_LOOKUP_FAIL") \ |
373 | E_(afs_io_error_vl_probe_fail, "VL_PROBE_FAIL") | |
f51375cd DH |
374 | |
375 | #define afs_file_errors \ | |
376 | EM(afs_file_error_dir_bad_magic, "DIR_BAD_MAGIC") \ | |
377 | EM(afs_file_error_dir_big, "DIR_BIG") \ | |
378 | EM(afs_file_error_dir_missing_page, "DIR_MISSING_PAGE") \ | |
366911cd | 379 | EM(afs_file_error_dir_name_too_long, "DIR_NAME_TOO_LONG") \ |
f51375cd DH |
380 | EM(afs_file_error_dir_over_end, "DIR_ENT_OVER_END") \ |
381 | EM(afs_file_error_dir_small, "DIR_SMALL") \ | |
382 | EM(afs_file_error_dir_unmarked_ext, "DIR_UNMARKED_EXT") \ | |
383 | EM(afs_file_error_mntpt, "MNTPT_READ_FAILED") \ | |
384 | E_(afs_file_error_writeback_fail, "WRITEBACK_FAILED") | |
025db80c | 385 | |
d4696601 DH |
386 | #define afs_flock_types \ |
387 | EM(F_RDLCK, "RDLCK") \ | |
388 | EM(F_WRLCK, "WRLCK") \ | |
389 | E_(F_UNLCK, "UNLCK") | |
390 | ||
391 | #define afs_flock_states \ | |
392 | EM(AFS_VNODE_LOCK_NONE, "NONE") \ | |
393 | EM(AFS_VNODE_LOCK_WAITING_FOR_CB, "WAIT_FOR_CB") \ | |
394 | EM(AFS_VNODE_LOCK_SETTING, "SETTING") \ | |
395 | EM(AFS_VNODE_LOCK_GRANTED, "GRANTED") \ | |
396 | EM(AFS_VNODE_LOCK_EXTENDING, "EXTENDING") \ | |
397 | EM(AFS_VNODE_LOCK_NEED_UNLOCK, "NEED_UNLOCK") \ | |
cdfb26b4 DH |
398 | EM(AFS_VNODE_LOCK_UNLOCKING, "UNLOCKING") \ |
399 | E_(AFS_VNODE_LOCK_DELETED, "DELETED") | |
d4696601 DH |
400 | |
401 | #define afs_flock_events \ | |
402 | EM(afs_flock_acquired, "Acquired") \ | |
403 | EM(afs_flock_callback_break, "Callback") \ | |
404 | EM(afs_flock_defer_unlock, "D-Unlock") \ | |
cdfb26b4 | 405 | EM(afs_flock_extend_fail, "Ext_Fail") \ |
d4696601 DH |
406 | EM(afs_flock_fail_other, "ErrOther") \ |
407 | EM(afs_flock_fail_perm, "ErrPerm ") \ | |
408 | EM(afs_flock_no_lockers, "NoLocker") \ | |
cdfb26b4 | 409 | EM(afs_flock_release_fail, "Rel_Fail") \ |
79ddbfa5 | 410 | EM(afs_flock_silly_delete, "SillyDel") \ |
d4696601 DH |
411 | EM(afs_flock_timestamp, "Timestmp") \ |
412 | EM(afs_flock_try_to_lock, "TryToLck") \ | |
413 | EM(afs_flock_vfs_lock, "VFSLock ") \ | |
414 | EM(afs_flock_vfs_locking, "VFSLking") \ | |
415 | EM(afs_flock_waited, "Waited ") \ | |
416 | EM(afs_flock_waiting, "Waiting ") \ | |
417 | EM(afs_flock_work_extending, "Extendng") \ | |
418 | EM(afs_flock_work_retry, "Retry ") \ | |
419 | EM(afs_flock_work_unlocking, "Unlcking") \ | |
420 | E_(afs_flock_would_block, "EWOULDBL") | |
421 | ||
422 | #define afs_flock_operations \ | |
423 | EM(afs_flock_op_copy_lock, "COPY ") \ | |
424 | EM(afs_flock_op_flock, "->flock ") \ | |
425 | EM(afs_flock_op_grant, "GRANT ") \ | |
426 | EM(afs_flock_op_lock, "->lock ") \ | |
427 | EM(afs_flock_op_release_lock, "RELEASE ") \ | |
428 | EM(afs_flock_op_return_ok, "<-OK ") \ | |
429 | EM(afs_flock_op_return_edeadlk, "<-EDEADL") \ | |
430 | EM(afs_flock_op_return_eagain, "<-EAGAIN") \ | |
431 | EM(afs_flock_op_return_error, "<-ERROR ") \ | |
432 | EM(afs_flock_op_set_lock, "SET ") \ | |
433 | EM(afs_flock_op_unlock, "UNLOCK ") \ | |
434 | E_(afs_flock_op_wake, "WAKE ") | |
435 | ||
051d2525 DH |
436 | #define afs_cb_break_reasons \ |
437 | EM(afs_cb_break_no_break, "no-break") \ | |
438 | EM(afs_cb_break_for_callback, "break-cb") \ | |
16069e13 | 439 | EM(afs_cb_break_for_creation_regress, "creation-regress") \ |
051d2525 | 440 | EM(afs_cb_break_for_deleted, "break-del") \ |
4fe6a946 | 441 | EM(afs_cb_break_for_s_reinit, "s-reinit") \ |
051d2525 | 442 | EM(afs_cb_break_for_unlink, "break-unlink") \ |
16069e13 | 443 | EM(afs_cb_break_for_update_regress, "update-regress") \ |
051d2525 | 444 | EM(afs_cb_break_for_volume_callback, "break-v-cb") \ |
16069e13 | 445 | EM(afs_cb_break_for_vos_release, "break-vos-release") \ |
16069e13 | 446 | E_(afs_cb_break_volume_excluded, "vol-excluded") |
051d2525 | 447 | |
495f2ae9 DH |
448 | #define afs_rotate_traces \ |
449 | EM(afs_rotate_trace_aborted, "Abortd") \ | |
450 | EM(afs_rotate_trace_busy_sleep, "BsySlp") \ | |
451 | EM(afs_rotate_trace_check_vol_status, "VolStt") \ | |
452 | EM(afs_rotate_trace_failed, "Failed") \ | |
453 | EM(afs_rotate_trace_iter, "Iter ") \ | |
454 | EM(afs_rotate_trace_iterate_addr, "ItAddr") \ | |
455 | EM(afs_rotate_trace_next_server, "NextSv") \ | |
456 | EM(afs_rotate_trace_no_more_servers, "NoMore") \ | |
457 | EM(afs_rotate_trace_nomem, "Nomem ") \ | |
458 | EM(afs_rotate_trace_probe_error, "PrbErr") \ | |
459 | EM(afs_rotate_trace_probe_fileserver, "PrbFsv") \ | |
460 | EM(afs_rotate_trace_probe_none, "PrbNon") \ | |
461 | EM(afs_rotate_trace_probe_response, "PrbRsp") \ | |
462 | EM(afs_rotate_trace_probe_superseded, "PrbSup") \ | |
463 | EM(afs_rotate_trace_restart, "Rstart") \ | |
464 | EM(afs_rotate_trace_retry_server, "RtrySv") \ | |
465 | EM(afs_rotate_trace_selected_server, "SlctSv") \ | |
466 | EM(afs_rotate_trace_stale_lock, "StlLck") \ | |
467 | EM(afs_rotate_trace_start, "Start ") \ | |
468 | EM(afs_rotate_trace_stop, "Stop ") \ | |
469 | E_(afs_rotate_trace_stopped, "Stoppd") | |
470 | ||
2daa6404 DH |
471 | /* |
472 | * Generate enums for tracing information. | |
473 | */ | |
474 | #ifndef __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY | |
475 | #define __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY | |
476 | ||
477 | #undef EM | |
478 | #undef E_ | |
479 | #define EM(a, b) a, | |
480 | #define E_(a, b) a | |
481 | ||
1e5d8493 | 482 | enum afs_alist_trace { afs_alist_traces } __mode(byte); |
2daa6404 DH |
483 | enum afs_call_trace { afs_call_traces } __mode(byte); |
484 | enum afs_cb_break_reason { afs_cb_break_reasons } __mode(byte); | |
485 | enum afs_cell_trace { afs_cell_traces } __mode(byte); | |
486 | enum afs_edit_dir_op { afs_edit_dir_ops } __mode(byte); | |
487 | enum afs_edit_dir_reason { afs_edit_dir_reasons } __mode(byte); | |
488 | enum afs_eproto_cause { afs_eproto_causes } __mode(byte); | |
f49b594d | 489 | enum afs_estate_trace { afs_estate_traces } __mode(byte); |
2daa6404 DH |
490 | enum afs_file_error { afs_file_errors } __mode(byte); |
491 | enum afs_flock_event { afs_flock_events } __mode(byte); | |
492 | enum afs_flock_operation { afs_flock_operations } __mode(byte); | |
493 | enum afs_io_error { afs_io_errors } __mode(byte); | |
495f2ae9 | 494 | enum afs_rotate_trace { afs_rotate_traces } __mode(byte); |
2daa6404 DH |
495 | enum afs_server_trace { afs_server_traces } __mode(byte); |
496 | enum afs_volume_trace { afs_volume_traces } __mode(byte); | |
497 | ||
498 | #endif /* end __AFS_GENERATE_TRACE_ENUMS_ONCE_ONLY */ | |
499 | ||
341f741f DH |
500 | /* |
501 | * Export enum symbols via userspace. | |
502 | */ | |
503 | #undef EM | |
504 | #undef E_ | |
505 | #define EM(a, b) TRACE_DEFINE_ENUM(a); | |
506 | #define E_(a, b) TRACE_DEFINE_ENUM(a); | |
507 | ||
1e5d8493 | 508 | afs_alist_traces; |
341f741f | 509 | afs_call_traces; |
495f2ae9 | 510 | afs_cb_break_reasons; |
dca54a7b | 511 | afs_cell_traces; |
6c881ca0 | 512 | afs_cm_operations; |
63a4681f DH |
513 | afs_edit_dir_ops; |
514 | afs_edit_dir_reasons; | |
f51375cd | 515 | afs_eproto_causes; |
f49b594d | 516 | afs_estate_traces; |
f51375cd | 517 | afs_file_errors; |
d4696601 | 518 | afs_flock_operations; |
495f2ae9 DH |
519 | afs_flock_types; |
520 | afs_fs_operations; | |
521 | afs_io_errors; | |
522 | afs_rotate_traces; | |
523 | afs_server_traces; | |
524 | afs_vl_operations; | |
525 | yfs_cm_operations; | |
341f741f DH |
526 | |
527 | /* | |
528 | * Now redefine the EM() and E_() macros to map the enums to the strings that | |
529 | * will be printed in the output. | |
530 | */ | |
531 | #undef EM | |
532 | #undef E_ | |
533 | #define EM(a, b) { a, b }, | |
534 | #define E_(a, b) { a, b } | |
535 | ||
12bdcf33 DH |
536 | TRACE_EVENT(afs_receive_data, |
537 | TP_PROTO(struct afs_call *call, struct iov_iter *iter, | |
8e8d7f13 DH |
538 | bool want_more, int ret), |
539 | ||
12bdcf33 | 540 | TP_ARGS(call, iter, want_more, ret), |
8e8d7f13 DH |
541 | |
542 | TP_STRUCT__entry( | |
a790c258 DH |
543 | __field(loff_t, remain) |
544 | __field(unsigned int, call) | |
545 | __field(enum afs_call_state, state) | |
546 | __field(unsigned short, unmarshall) | |
547 | __field(bool, want_more) | |
548 | __field(int, ret) | |
8e8d7f13 DH |
549 | ), |
550 | ||
551 | TP_fast_assign( | |
a25e21f0 | 552 | __entry->call = call->debug_id; |
8e8d7f13 DH |
553 | __entry->state = call->state; |
554 | __entry->unmarshall = call->unmarshall; | |
12bdcf33 | 555 | __entry->remain = iov_iter_count(iter); |
8e8d7f13 DH |
556 | __entry->want_more = want_more; |
557 | __entry->ret = ret; | |
558 | ), | |
559 | ||
12bdcf33 | 560 | TP_printk("c=%08x r=%llu u=%u w=%u s=%u ret=%d", |
8e8d7f13 | 561 | __entry->call, |
12bdcf33 DH |
562 | __entry->remain, |
563 | __entry->unmarshall, | |
564 | __entry->want_more, | |
565 | __entry->state, | |
566 | __entry->ret) | |
8e8d7f13 DH |
567 | ); |
568 | ||
569 | TRACE_EVENT(afs_notify_call, | |
570 | TP_PROTO(struct rxrpc_call *rxcall, struct afs_call *call), | |
571 | ||
572 | TP_ARGS(rxcall, call), | |
573 | ||
574 | TP_STRUCT__entry( | |
a790c258 DH |
575 | __field(unsigned int, call) |
576 | __field(enum afs_call_state, state) | |
577 | __field(unsigned short, unmarshall) | |
8e8d7f13 DH |
578 | ), |
579 | ||
580 | TP_fast_assign( | |
a25e21f0 | 581 | __entry->call = call->debug_id; |
8e8d7f13 DH |
582 | __entry->state = call->state; |
583 | __entry->unmarshall = call->unmarshall; | |
584 | ), | |
585 | ||
a25e21f0 | 586 | TP_printk("c=%08x s=%u u=%u", |
8e8d7f13 DH |
587 | __entry->call, |
588 | __entry->state, __entry->unmarshall) | |
589 | ); | |
590 | ||
591 | TRACE_EVENT(afs_cb_call, | |
592 | TP_PROTO(struct afs_call *call), | |
593 | ||
594 | TP_ARGS(call), | |
595 | ||
596 | TP_STRUCT__entry( | |
a790c258 DH |
597 | __field(unsigned int, call) |
598 | __field(u32, op) | |
599 | __field(u16, service_id) | |
8e8d7f13 DH |
600 | ), |
601 | ||
602 | TP_fast_assign( | |
a25e21f0 | 603 | __entry->call = call->debug_id; |
8e8d7f13 | 604 | __entry->op = call->operation_ID; |
6c881ca0 | 605 | __entry->service_id = call->service_id; |
8e8d7f13 DH |
606 | ), |
607 | ||
6c881ca0 | 608 | TP_printk("c=%08x %s", |
8e8d7f13 | 609 | __entry->call, |
6c881ca0 DH |
610 | __entry->service_id == 2501 ? |
611 | __print_symbolic(__entry->op, yfs_cm_operations) : | |
612 | __print_symbolic(__entry->op, afs_cm_operations)) | |
8e8d7f13 DH |
613 | ); |
614 | ||
341f741f | 615 | TRACE_EVENT(afs_call, |
2757a4dc | 616 | TP_PROTO(unsigned int call_debug_id, enum afs_call_trace op, |
c56f9ec8 | 617 | int ref, int outstanding, const void *where), |
341f741f | 618 | |
2757a4dc | 619 | TP_ARGS(call_debug_id, op, ref, outstanding, where), |
341f741f DH |
620 | |
621 | TP_STRUCT__entry( | |
a790c258 DH |
622 | __field(unsigned int, call) |
623 | __field(int, op) | |
624 | __field(int, ref) | |
625 | __field(int, outstanding) | |
626 | __field(const void *, where) | |
341f741f DH |
627 | ), |
628 | ||
629 | TP_fast_assign( | |
2757a4dc | 630 | __entry->call = call_debug_id; |
341f741f | 631 | __entry->op = op; |
c56f9ec8 | 632 | __entry->ref = ref; |
341f741f DH |
633 | __entry->outstanding = outstanding; |
634 | __entry->where = where; | |
635 | ), | |
636 | ||
c56f9ec8 | 637 | TP_printk("c=%08x %s r=%d o=%d sp=%pSR", |
341f741f DH |
638 | __entry->call, |
639 | __print_symbolic(__entry->op, afs_call_traces), | |
c56f9ec8 | 640 | __entry->ref, |
341f741f DH |
641 | __entry->outstanding, |
642 | __entry->where) | |
643 | ); | |
644 | ||
025db80c DH |
645 | TRACE_EVENT(afs_make_fs_call, |
646 | TP_PROTO(struct afs_call *call, const struct afs_fid *fid), | |
647 | ||
648 | TP_ARGS(call, fid), | |
649 | ||
650 | TP_STRUCT__entry( | |
a790c258 DH |
651 | __field(unsigned int, call) |
652 | __field(enum afs_fs_operation, op) | |
653 | __field_struct(struct afs_fid, fid) | |
025db80c DH |
654 | ), |
655 | ||
656 | TP_fast_assign( | |
a25e21f0 | 657 | __entry->call = call->debug_id; |
025db80c DH |
658 | __entry->op = call->operation_ID; |
659 | if (fid) { | |
660 | __entry->fid = *fid; | |
661 | } else { | |
662 | __entry->fid.vid = 0; | |
663 | __entry->fid.vnode = 0; | |
664 | __entry->fid.unique = 0; | |
665 | } | |
666 | ), | |
667 | ||
3b6492df | 668 | TP_printk("c=%08x %06llx:%06llx:%06x %s", |
025db80c DH |
669 | __entry->call, |
670 | __entry->fid.vid, | |
671 | __entry->fid.vnode, | |
672 | __entry->fid.unique, | |
673 | __print_symbolic(__entry->op, afs_fs_operations)) | |
674 | ); | |
675 | ||
6c6c1d63 DH |
676 | TRACE_EVENT(afs_make_fs_calli, |
677 | TP_PROTO(struct afs_call *call, const struct afs_fid *fid, | |
678 | unsigned int i), | |
679 | ||
680 | TP_ARGS(call, fid, i), | |
681 | ||
682 | TP_STRUCT__entry( | |
a790c258 DH |
683 | __field(unsigned int, call) |
684 | __field(unsigned int, i) | |
685 | __field(enum afs_fs_operation, op) | |
686 | __field_struct(struct afs_fid, fid) | |
6c6c1d63 DH |
687 | ), |
688 | ||
689 | TP_fast_assign( | |
690 | __entry->call = call->debug_id; | |
691 | __entry->i = i; | |
692 | __entry->op = call->operation_ID; | |
693 | if (fid) { | |
694 | __entry->fid = *fid; | |
695 | } else { | |
696 | __entry->fid.vid = 0; | |
697 | __entry->fid.vnode = 0; | |
698 | __entry->fid.unique = 0; | |
699 | } | |
700 | ), | |
701 | ||
702 | TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u", | |
703 | __entry->call, | |
704 | __entry->fid.vid, | |
705 | __entry->fid.vnode, | |
706 | __entry->fid.unique, | |
707 | __print_symbolic(__entry->op, afs_fs_operations), | |
708 | __entry->i) | |
709 | ); | |
710 | ||
80548b03 DH |
711 | TRACE_EVENT(afs_make_fs_call1, |
712 | TP_PROTO(struct afs_call *call, const struct afs_fid *fid, | |
e49c7b2f | 713 | const struct qstr *name), |
80548b03 DH |
714 | |
715 | TP_ARGS(call, fid, name), | |
716 | ||
717 | TP_STRUCT__entry( | |
a790c258 DH |
718 | __field(unsigned int, call) |
719 | __field(enum afs_fs_operation, op) | |
720 | __field_struct(struct afs_fid, fid) | |
721 | __array(char, name, 24) | |
80548b03 DH |
722 | ), |
723 | ||
724 | TP_fast_assign( | |
e49c7b2f | 725 | unsigned int __len = min_t(unsigned int, name->len, 23); |
80548b03 DH |
726 | __entry->call = call->debug_id; |
727 | __entry->op = call->operation_ID; | |
728 | if (fid) { | |
729 | __entry->fid = *fid; | |
730 | } else { | |
731 | __entry->fid.vid = 0; | |
732 | __entry->fid.vnode = 0; | |
733 | __entry->fid.unique = 0; | |
734 | } | |
e49c7b2f | 735 | memcpy(__entry->name, name->name, __len); |
80548b03 DH |
736 | __entry->name[__len] = 0; |
737 | ), | |
738 | ||
739 | TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\"", | |
740 | __entry->call, | |
741 | __entry->fid.vid, | |
742 | __entry->fid.vnode, | |
743 | __entry->fid.unique, | |
744 | __print_symbolic(__entry->op, afs_fs_operations), | |
745 | __entry->name) | |
746 | ); | |
747 | ||
748 | TRACE_EVENT(afs_make_fs_call2, | |
749 | TP_PROTO(struct afs_call *call, const struct afs_fid *fid, | |
e49c7b2f | 750 | const struct qstr *name, const struct qstr *name2), |
80548b03 DH |
751 | |
752 | TP_ARGS(call, fid, name, name2), | |
753 | ||
754 | TP_STRUCT__entry( | |
a790c258 DH |
755 | __field(unsigned int, call) |
756 | __field(enum afs_fs_operation, op) | |
757 | __field_struct(struct afs_fid, fid) | |
758 | __array(char, name, 24) | |
759 | __array(char, name2, 24) | |
80548b03 DH |
760 | ), |
761 | ||
762 | TP_fast_assign( | |
e49c7b2f DH |
763 | unsigned int __len = min_t(unsigned int, name->len, 23); |
764 | unsigned int __len2 = min_t(unsigned int, name2->len, 23); | |
80548b03 DH |
765 | __entry->call = call->debug_id; |
766 | __entry->op = call->operation_ID; | |
767 | if (fid) { | |
768 | __entry->fid = *fid; | |
769 | } else { | |
770 | __entry->fid.vid = 0; | |
771 | __entry->fid.vnode = 0; | |
772 | __entry->fid.unique = 0; | |
773 | } | |
e49c7b2f | 774 | memcpy(__entry->name, name->name, __len); |
80548b03 | 775 | __entry->name[__len] = 0; |
e49c7b2f | 776 | memcpy(__entry->name2, name2->name, __len2); |
80548b03 DH |
777 | __entry->name2[__len2] = 0; |
778 | ), | |
779 | ||
780 | TP_printk("c=%08x %06llx:%06llx:%06x %s \"%s\" \"%s\"", | |
781 | __entry->call, | |
782 | __entry->fid.vid, | |
783 | __entry->fid.vnode, | |
784 | __entry->fid.unique, | |
785 | __print_symbolic(__entry->op, afs_fs_operations), | |
786 | __entry->name, | |
787 | __entry->name2) | |
788 | ); | |
789 | ||
025db80c DH |
790 | TRACE_EVENT(afs_make_vl_call, |
791 | TP_PROTO(struct afs_call *call), | |
792 | ||
793 | TP_ARGS(call), | |
794 | ||
795 | TP_STRUCT__entry( | |
a790c258 DH |
796 | __field(unsigned int, call) |
797 | __field(enum afs_vl_operation, op) | |
025db80c DH |
798 | ), |
799 | ||
800 | TP_fast_assign( | |
a25e21f0 | 801 | __entry->call = call->debug_id; |
025db80c DH |
802 | __entry->op = call->operation_ID; |
803 | ), | |
804 | ||
a25e21f0 | 805 | TP_printk("c=%08x %s", |
025db80c DH |
806 | __entry->call, |
807 | __print_symbolic(__entry->op, afs_vl_operations)) | |
808 | ); | |
809 | ||
810 | TRACE_EVENT(afs_call_done, | |
811 | TP_PROTO(struct afs_call *call), | |
812 | ||
813 | TP_ARGS(call), | |
814 | ||
815 | TP_STRUCT__entry( | |
a790c258 DH |
816 | __field(unsigned int, call) |
817 | __field(struct rxrpc_call *, rx_call) | |
818 | __field(int, ret) | |
819 | __field(u32, abort_code) | |
025db80c DH |
820 | ), |
821 | ||
822 | TP_fast_assign( | |
a25e21f0 | 823 | __entry->call = call->debug_id; |
025db80c DH |
824 | __entry->rx_call = call->rxcall; |
825 | __entry->ret = call->error; | |
826 | __entry->abort_code = call->abort_code; | |
827 | ), | |
828 | ||
a25e21f0 | 829 | TP_printk(" c=%08x ret=%d ab=%d [%p]", |
025db80c DH |
830 | __entry->call, |
831 | __entry->ret, | |
832 | __entry->abort_code, | |
833 | __entry->rx_call) | |
834 | ); | |
835 | ||
bd80d8a8 DH |
836 | TRACE_EVENT(afs_send_data, |
837 | TP_PROTO(struct afs_call *call, struct msghdr *msg), | |
2c099014 | 838 | |
bd80d8a8 | 839 | TP_ARGS(call, msg), |
2c099014 DH |
840 | |
841 | TP_STRUCT__entry( | |
a790c258 DH |
842 | __field(unsigned int, call) |
843 | __field(unsigned int, flags) | |
844 | __field(loff_t, offset) | |
845 | __field(loff_t, count) | |
2c099014 DH |
846 | ), |
847 | ||
848 | TP_fast_assign( | |
a25e21f0 | 849 | __entry->call = call->debug_id; |
2c099014 | 850 | __entry->flags = msg->msg_flags; |
bd80d8a8 DH |
851 | __entry->offset = msg->msg_iter.xarray_start + msg->msg_iter.iov_offset; |
852 | __entry->count = iov_iter_count(&msg->msg_iter); | |
2c099014 DH |
853 | ), |
854 | ||
bd80d8a8 DH |
855 | TP_printk(" c=%08x o=%llx n=%llx f=%x", |
856 | __entry->call, __entry->offset, __entry->count, | |
2c099014 DH |
857 | __entry->flags) |
858 | ); | |
859 | ||
bd80d8a8 DH |
860 | TRACE_EVENT(afs_sent_data, |
861 | TP_PROTO(struct afs_call *call, struct msghdr *msg, int ret), | |
2c099014 | 862 | |
bd80d8a8 | 863 | TP_ARGS(call, msg, ret), |
2c099014 DH |
864 | |
865 | TP_STRUCT__entry( | |
a790c258 DH |
866 | __field(unsigned int, call) |
867 | __field(int, ret) | |
868 | __field(loff_t, offset) | |
869 | __field(loff_t, count) | |
2c099014 DH |
870 | ), |
871 | ||
872 | TP_fast_assign( | |
a25e21f0 | 873 | __entry->call = call->debug_id; |
2c099014 | 874 | __entry->ret = ret; |
bd80d8a8 DH |
875 | __entry->offset = msg->msg_iter.xarray_start + msg->msg_iter.iov_offset; |
876 | __entry->count = iov_iter_count(&msg->msg_iter); | |
2c099014 DH |
877 | ), |
878 | ||
bd80d8a8 DH |
879 | TP_printk(" c=%08x o=%llx n=%llx r=%x", |
880 | __entry->call, __entry->offset, __entry->count, | |
881 | __entry->ret) | |
2c099014 DH |
882 | ); |
883 | ||
dab17c1a DH |
884 | TRACE_EVENT(afs_dir_check_failed, |
885 | TP_PROTO(struct afs_vnode *vnode, loff_t off, loff_t i_size), | |
886 | ||
887 | TP_ARGS(vnode, off, i_size), | |
888 | ||
889 | TP_STRUCT__entry( | |
a790c258 DH |
890 | __field(struct afs_vnode *, vnode) |
891 | __field(loff_t, off) | |
892 | __field(loff_t, i_size) | |
dab17c1a DH |
893 | ), |
894 | ||
895 | TP_fast_assign( | |
896 | __entry->vnode = vnode; | |
897 | __entry->off = off; | |
898 | __entry->i_size = i_size; | |
899 | ), | |
900 | ||
901 | TP_printk("vn=%p %llx/%llx", | |
902 | __entry->vnode, __entry->off, __entry->i_size) | |
903 | ); | |
904 | ||
98bf40cd DH |
905 | TRACE_EVENT(afs_call_state, |
906 | TP_PROTO(struct afs_call *call, | |
907 | enum afs_call_state from, | |
908 | enum afs_call_state to, | |
909 | int ret, u32 remote_abort), | |
910 | ||
911 | TP_ARGS(call, from, to, ret, remote_abort), | |
912 | ||
913 | TP_STRUCT__entry( | |
a790c258 DH |
914 | __field(unsigned int, call) |
915 | __field(enum afs_call_state, from) | |
916 | __field(enum afs_call_state, to) | |
917 | __field(int, ret) | |
918 | __field(u32, abort) | |
98bf40cd DH |
919 | ), |
920 | ||
921 | TP_fast_assign( | |
a25e21f0 | 922 | __entry->call = call->debug_id; |
98bf40cd DH |
923 | __entry->from = from; |
924 | __entry->to = to; | |
925 | __entry->ret = ret; | |
926 | __entry->abort = remote_abort; | |
927 | ), | |
928 | ||
a25e21f0 | 929 | TP_printk("c=%08x %u->%u r=%d ab=%d", |
98bf40cd DH |
930 | __entry->call, |
931 | __entry->from, __entry->to, | |
932 | __entry->ret, __entry->abort) | |
933 | ); | |
934 | ||
80548b03 DH |
935 | TRACE_EVENT(afs_lookup, |
936 | TP_PROTO(struct afs_vnode *dvnode, const struct qstr *name, | |
40a708bd | 937 | struct afs_fid *fid), |
80548b03 | 938 | |
40a708bd | 939 | TP_ARGS(dvnode, name, fid), |
80548b03 DH |
940 | |
941 | TP_STRUCT__entry( | |
a790c258 DH |
942 | __field_struct(struct afs_fid, dfid) |
943 | __field_struct(struct afs_fid, fid) | |
944 | __array(char, name, 24) | |
80548b03 DH |
945 | ), |
946 | ||
947 | TP_fast_assign( | |
948 | int __len = min_t(int, name->len, 23); | |
949 | __entry->dfid = dvnode->fid; | |
40a708bd | 950 | __entry->fid = *fid; |
80548b03 DH |
951 | memcpy(__entry->name, name->name, __len); |
952 | __entry->name[__len] = 0; | |
953 | ), | |
954 | ||
955 | TP_printk("d=%llx:%llx:%x \"%s\" f=%llx:%x", | |
956 | __entry->dfid.vid, __entry->dfid.vnode, __entry->dfid.unique, | |
957 | __entry->name, | |
958 | __entry->fid.vnode, __entry->fid.unique) | |
959 | ); | |
960 | ||
63a4681f DH |
961 | TRACE_EVENT(afs_edit_dir, |
962 | TP_PROTO(struct afs_vnode *dvnode, | |
963 | enum afs_edit_dir_reason why, | |
964 | enum afs_edit_dir_op op, | |
965 | unsigned int block, | |
966 | unsigned int slot, | |
967 | unsigned int f_vnode, | |
968 | unsigned int f_unique, | |
969 | const char *name), | |
970 | ||
971 | TP_ARGS(dvnode, why, op, block, slot, f_vnode, f_unique, name), | |
972 | ||
973 | TP_STRUCT__entry( | |
a790c258 DH |
974 | __field(unsigned int, vnode) |
975 | __field(unsigned int, unique) | |
976 | __field(enum afs_edit_dir_reason, why) | |
977 | __field(enum afs_edit_dir_op, op) | |
978 | __field(unsigned int, block) | |
979 | __field(unsigned short, slot) | |
980 | __field(unsigned int, f_vnode) | |
981 | __field(unsigned int, f_unique) | |
982 | __array(char, name, 24) | |
63a4681f DH |
983 | ), |
984 | ||
985 | TP_fast_assign( | |
986 | int __len = strlen(name); | |
80548b03 | 987 | __len = min(__len, 23); |
63a4681f DH |
988 | __entry->vnode = dvnode->fid.vnode; |
989 | __entry->unique = dvnode->fid.unique; | |
990 | __entry->why = why; | |
991 | __entry->op = op; | |
992 | __entry->block = block; | |
993 | __entry->slot = slot; | |
994 | __entry->f_vnode = f_vnode; | |
995 | __entry->f_unique = f_unique; | |
996 | memcpy(__entry->name, name, __len); | |
997 | __entry->name[__len] = 0; | |
998 | ), | |
999 | ||
80548b03 | 1000 | TP_printk("d=%x:%x %s %s %u[%u] f=%x:%x \"%s\"", |
63a4681f DH |
1001 | __entry->vnode, __entry->unique, |
1002 | __print_symbolic(__entry->why, afs_edit_dir_reasons), | |
1003 | __print_symbolic(__entry->op, afs_edit_dir_ops), | |
1004 | __entry->block, __entry->slot, | |
1005 | __entry->f_vnode, __entry->f_unique, | |
1006 | __entry->name) | |
1007 | ); | |
1008 | ||
5f702c8e | 1009 | TRACE_EVENT(afs_protocol_error, |
7126ead9 | 1010 | TP_PROTO(struct afs_call *call, enum afs_eproto_cause cause), |
5f702c8e | 1011 | |
7126ead9 | 1012 | TP_ARGS(call, cause), |
5f702c8e DH |
1013 | |
1014 | TP_STRUCT__entry( | |
a790c258 DH |
1015 | __field(unsigned int, call) |
1016 | __field(enum afs_eproto_cause, cause) | |
5f702c8e DH |
1017 | ), |
1018 | ||
1019 | TP_fast_assign( | |
1020 | __entry->call = call ? call->debug_id : 0; | |
160cb957 | 1021 | __entry->cause = cause; |
5f702c8e DH |
1022 | ), |
1023 | ||
7126ead9 DH |
1024 | TP_printk("c=%08x %s", |
1025 | __entry->call, | |
160cb957 | 1026 | __print_symbolic(__entry->cause, afs_eproto_causes)) |
5f702c8e DH |
1027 | ); |
1028 | ||
f51375cd DH |
1029 | TRACE_EVENT(afs_io_error, |
1030 | TP_PROTO(unsigned int call, int error, enum afs_io_error where), | |
1031 | ||
1032 | TP_ARGS(call, error, where), | |
1033 | ||
1034 | TP_STRUCT__entry( | |
a790c258 DH |
1035 | __field(unsigned int, call) |
1036 | __field(int, error) | |
1037 | __field(enum afs_io_error, where) | |
f51375cd DH |
1038 | ), |
1039 | ||
1040 | TP_fast_assign( | |
1041 | __entry->call = call; | |
1042 | __entry->error = error; | |
1043 | __entry->where = where; | |
1044 | ), | |
1045 | ||
1046 | TP_printk("c=%08x r=%d %s", | |
1047 | __entry->call, __entry->error, | |
1048 | __print_symbolic(__entry->where, afs_io_errors)) | |
1049 | ); | |
1050 | ||
1051 | TRACE_EVENT(afs_file_error, | |
1052 | TP_PROTO(struct afs_vnode *vnode, int error, enum afs_file_error where), | |
1053 | ||
1054 | TP_ARGS(vnode, error, where), | |
1055 | ||
1056 | TP_STRUCT__entry( | |
a790c258 DH |
1057 | __field_struct(struct afs_fid, fid) |
1058 | __field(int, error) | |
1059 | __field(enum afs_file_error, where) | |
f51375cd DH |
1060 | ), |
1061 | ||
1062 | TP_fast_assign( | |
1063 | __entry->fid = vnode->fid; | |
1064 | __entry->error = error; | |
1065 | __entry->where = where; | |
1066 | ), | |
1067 | ||
3b6492df | 1068 | TP_printk("%llx:%llx:%x r=%d %s", |
f51375cd DH |
1069 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, |
1070 | __entry->error, | |
1071 | __print_symbolic(__entry->where, afs_file_errors)) | |
1072 | ); | |
1073 | ||
17ba6f0b DH |
1074 | TRACE_EVENT(afs_bulkstat_error, |
1075 | TP_PROTO(struct afs_operation *op, struct afs_fid *fid, unsigned int index, s32 abort), | |
1076 | ||
1077 | TP_ARGS(op, fid, index, abort), | |
1078 | ||
1079 | TP_STRUCT__entry( | |
1080 | __field_struct(struct afs_fid, fid) | |
1081 | __field(unsigned int, op) | |
1082 | __field(unsigned int, index) | |
1083 | __field(s32, abort) | |
1084 | ), | |
1085 | ||
1086 | TP_fast_assign( | |
1087 | __entry->op = op->debug_id; | |
1088 | __entry->fid = *fid; | |
1089 | __entry->index = index; | |
1090 | __entry->abort = abort; | |
1091 | ), | |
1092 | ||
1093 | TP_printk("OP=%08x[%02x] %llx:%llx:%x a=%d", | |
1094 | __entry->op, __entry->index, | |
1095 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, | |
1096 | __entry->abort) | |
1097 | ); | |
1098 | ||
3709a399 DH |
1099 | TRACE_EVENT(afs_cm_no_server, |
1100 | TP_PROTO(struct afs_call *call, struct sockaddr_rxrpc *srx), | |
1101 | ||
1102 | TP_ARGS(call, srx), | |
1103 | ||
1104 | TP_STRUCT__entry( | |
a790c258 DH |
1105 | __field(unsigned int, call) |
1106 | __field(unsigned int, op_id) | |
1107 | __field_struct(struct sockaddr_rxrpc, srx) | |
3709a399 DH |
1108 | ), |
1109 | ||
1110 | TP_fast_assign( | |
1111 | __entry->call = call->debug_id; | |
1112 | __entry->op_id = call->operation_ID; | |
1113 | memcpy(&__entry->srx, srx, sizeof(__entry->srx)); | |
1114 | ), | |
1115 | ||
1116 | TP_printk("c=%08x op=%u %pISpc", | |
1117 | __entry->call, __entry->op_id, &__entry->srx.transport) | |
1118 | ); | |
1119 | ||
1120 | TRACE_EVENT(afs_cm_no_server_u, | |
1121 | TP_PROTO(struct afs_call *call, const uuid_t *uuid), | |
1122 | ||
1123 | TP_ARGS(call, uuid), | |
1124 | ||
1125 | TP_STRUCT__entry( | |
a790c258 DH |
1126 | __field(unsigned int, call) |
1127 | __field(unsigned int, op_id) | |
1128 | __field_struct(uuid_t, uuid) | |
3709a399 DH |
1129 | ), |
1130 | ||
1131 | TP_fast_assign( | |
1132 | __entry->call = call->debug_id; | |
1133 | __entry->op_id = call->operation_ID; | |
1134 | memcpy(&__entry->uuid, uuid, sizeof(__entry->uuid)); | |
1135 | ), | |
1136 | ||
1137 | TP_printk("c=%08x op=%u %pU", | |
1138 | __entry->call, __entry->op_id, &__entry->uuid) | |
1139 | ); | |
1140 | ||
d4696601 DH |
1141 | TRACE_EVENT(afs_flock_ev, |
1142 | TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl, | |
1143 | enum afs_flock_event event, int error), | |
1144 | ||
1145 | TP_ARGS(vnode, fl, event, error), | |
1146 | ||
1147 | TP_STRUCT__entry( | |
a790c258 DH |
1148 | __field_struct(struct afs_fid, fid) |
1149 | __field(enum afs_flock_event, event) | |
1150 | __field(enum afs_lock_state, state) | |
1151 | __field(int, error) | |
1152 | __field(unsigned int, debug_id) | |
d4696601 DH |
1153 | ), |
1154 | ||
1155 | TP_fast_assign( | |
1156 | __entry->fid = vnode->fid; | |
1157 | __entry->event = event; | |
1158 | __entry->state = vnode->lock_state; | |
1159 | __entry->error = error; | |
1160 | __entry->debug_id = fl ? fl->fl_u.afs.debug_id : 0; | |
1161 | ), | |
1162 | ||
1163 | TP_printk("%llx:%llx:%x %04x %s s=%s e=%d", | |
1164 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, | |
1165 | __entry->debug_id, | |
1166 | __print_symbolic(__entry->event, afs_flock_events), | |
1167 | __print_symbolic(__entry->state, afs_flock_states), | |
1168 | __entry->error) | |
1169 | ); | |
1170 | ||
1171 | TRACE_EVENT(afs_flock_op, | |
1172 | TP_PROTO(struct afs_vnode *vnode, struct file_lock *fl, | |
1173 | enum afs_flock_operation op), | |
1174 | ||
1175 | TP_ARGS(vnode, fl, op), | |
1176 | ||
1177 | TP_STRUCT__entry( | |
a790c258 DH |
1178 | __field_struct(struct afs_fid, fid) |
1179 | __field(loff_t, from) | |
1180 | __field(loff_t, len) | |
1181 | __field(enum afs_flock_operation, op) | |
1182 | __field(unsigned char, type) | |
1183 | __field(unsigned int, flags) | |
1184 | __field(unsigned int, debug_id) | |
d4696601 DH |
1185 | ), |
1186 | ||
1187 | TP_fast_assign( | |
1188 | __entry->fid = vnode->fid; | |
1189 | __entry->from = fl->fl_start; | |
1190 | __entry->len = fl->fl_end - fl->fl_start + 1; | |
1191 | __entry->op = op; | |
82a8cb96 JL |
1192 | __entry->type = fl->c.flc_type; |
1193 | __entry->flags = fl->c.flc_flags; | |
d4696601 DH |
1194 | __entry->debug_id = fl->fl_u.afs.debug_id; |
1195 | ), | |
1196 | ||
1197 | TP_printk("%llx:%llx:%x %04x %s t=%s R=%llx/%llx f=%x", | |
1198 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, | |
1199 | __entry->debug_id, | |
1200 | __print_symbolic(__entry->op, afs_flock_operations), | |
1201 | __print_symbolic(__entry->type, afs_flock_types), | |
1202 | __entry->from, __entry->len, __entry->flags) | |
1203 | ); | |
1204 | ||
99987c56 DH |
1205 | TRACE_EVENT(afs_reload_dir, |
1206 | TP_PROTO(struct afs_vnode *vnode), | |
1207 | ||
1208 | TP_ARGS(vnode), | |
1209 | ||
1210 | TP_STRUCT__entry( | |
a790c258 | 1211 | __field_struct(struct afs_fid, fid) |
99987c56 DH |
1212 | ), |
1213 | ||
1214 | TP_fast_assign( | |
1215 | __entry->fid = vnode->fid; | |
1216 | ), | |
1217 | ||
1218 | TP_printk("%llx:%llx:%x", | |
1219 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique) | |
1220 | ); | |
1221 | ||
79ddbfa5 DH |
1222 | TRACE_EVENT(afs_silly_rename, |
1223 | TP_PROTO(struct afs_vnode *vnode, bool done), | |
1224 | ||
1225 | TP_ARGS(vnode, done), | |
1226 | ||
1227 | TP_STRUCT__entry( | |
a790c258 DH |
1228 | __field_struct(struct afs_fid, fid) |
1229 | __field(bool, done) | |
79ddbfa5 DH |
1230 | ), |
1231 | ||
1232 | TP_fast_assign( | |
1233 | __entry->fid = vnode->fid; | |
1234 | __entry->done = done; | |
1235 | ), | |
1236 | ||
1237 | TP_printk("%llx:%llx:%x done=%u", | |
1238 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, | |
1239 | __entry->done) | |
1240 | ); | |
1241 | ||
80548b03 DH |
1242 | TRACE_EVENT(afs_get_tree, |
1243 | TP_PROTO(struct afs_cell *cell, struct afs_volume *volume), | |
1244 | ||
1245 | TP_ARGS(cell, volume), | |
1246 | ||
1247 | TP_STRUCT__entry( | |
a790c258 DH |
1248 | __field(u64, vid) |
1249 | __array(char, cell, 24) | |
1250 | __array(char, volume, 24) | |
80548b03 DH |
1251 | ), |
1252 | ||
1253 | TP_fast_assign( | |
1254 | int __len; | |
1255 | __entry->vid = volume->vid; | |
1256 | __len = min_t(int, cell->name_len, 23); | |
1257 | memcpy(__entry->cell, cell->name, __len); | |
1258 | __entry->cell[__len] = 0; | |
1259 | __len = min_t(int, volume->name_len, 23); | |
1260 | memcpy(__entry->volume, volume->name, __len); | |
1261 | __entry->volume[__len] = 0; | |
1262 | ), | |
1263 | ||
1264 | TP_printk("--- MOUNT %s:%s %llx", | |
1265 | __entry->cell, __entry->volume, __entry->vid) | |
1266 | ); | |
1267 | ||
16069e13 DH |
1268 | TRACE_EVENT(afs_cb_v_break, |
1269 | TP_PROTO(afs_volid_t vid, unsigned int cb_v_break, | |
1270 | enum afs_cb_break_reason reason), | |
1271 | ||
1272 | TP_ARGS(vid, cb_v_break, reason), | |
1273 | ||
1274 | TP_STRUCT__entry( | |
1275 | __field(afs_volid_t, vid) | |
1276 | __field(unsigned int, cb_v_break) | |
1277 | __field(enum afs_cb_break_reason, reason) | |
1278 | ), | |
1279 | ||
1280 | TP_fast_assign( | |
1281 | __entry->vid = vid; | |
1282 | __entry->cb_v_break = cb_v_break; | |
1283 | __entry->reason = reason; | |
1284 | ), | |
1285 | ||
1286 | TP_printk("%llx vb=%x %s", | |
1287 | __entry->vid, | |
1288 | __entry->cb_v_break, | |
1289 | __print_symbolic(__entry->reason, afs_cb_break_reasons)) | |
1290 | ); | |
1291 | ||
051d2525 DH |
1292 | TRACE_EVENT(afs_cb_break, |
1293 | TP_PROTO(struct afs_fid *fid, unsigned int cb_break, | |
1294 | enum afs_cb_break_reason reason, bool skipped), | |
1295 | ||
1296 | TP_ARGS(fid, cb_break, reason, skipped), | |
1297 | ||
1298 | TP_STRUCT__entry( | |
a790c258 DH |
1299 | __field_struct(struct afs_fid, fid) |
1300 | __field(unsigned int, cb_break) | |
1301 | __field(enum afs_cb_break_reason, reason) | |
1302 | __field(bool, skipped) | |
051d2525 DH |
1303 | ), |
1304 | ||
1305 | TP_fast_assign( | |
1306 | __entry->fid = *fid; | |
1307 | __entry->cb_break = cb_break; | |
1308 | __entry->reason = reason; | |
1309 | __entry->skipped = skipped; | |
1310 | ), | |
1311 | ||
1312 | TP_printk("%llx:%llx:%x b=%x s=%u %s", | |
1313 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, | |
1314 | __entry->cb_break, | |
1315 | __entry->skipped, | |
1316 | __print_symbolic(__entry->reason, afs_cb_break_reasons)) | |
1317 | ); | |
1318 | ||
1319 | TRACE_EVENT(afs_cb_miss, | |
1320 | TP_PROTO(struct afs_fid *fid, enum afs_cb_break_reason reason), | |
1321 | ||
1322 | TP_ARGS(fid, reason), | |
1323 | ||
1324 | TP_STRUCT__entry( | |
a790c258 DH |
1325 | __field_struct(struct afs_fid, fid) |
1326 | __field(enum afs_cb_break_reason, reason) | |
051d2525 DH |
1327 | ), |
1328 | ||
1329 | TP_fast_assign( | |
1330 | __entry->fid = *fid; | |
1331 | __entry->reason = reason; | |
1332 | ), | |
1333 | ||
1334 | TP_printk(" %llx:%llx:%x %s", | |
1335 | __entry->fid.vid, __entry->fid.vnode, __entry->fid.unique, | |
1336 | __print_symbolic(__entry->reason, afs_cb_break_reasons)) | |
1337 | ); | |
1338 | ||
45218193 | 1339 | TRACE_EVENT(afs_server, |
2757a4dc | 1340 | TP_PROTO(unsigned int server_debug_id, int ref, int active, |
977e5f8e | 1341 | enum afs_server_trace reason), |
45218193 | 1342 | |
2757a4dc | 1343 | TP_ARGS(server_debug_id, ref, active, reason), |
45218193 DH |
1344 | |
1345 | TP_STRUCT__entry( | |
a790c258 DH |
1346 | __field(unsigned int, server) |
1347 | __field(int, ref) | |
1348 | __field(int, active) | |
1349 | __field(int, reason) | |
45218193 DH |
1350 | ), |
1351 | ||
1352 | TP_fast_assign( | |
2757a4dc | 1353 | __entry->server = server_debug_id; |
977e5f8e DH |
1354 | __entry->ref = ref; |
1355 | __entry->active = active; | |
45218193 DH |
1356 | __entry->reason = reason; |
1357 | ), | |
1358 | ||
977e5f8e | 1359 | TP_printk("s=%08x %s u=%d a=%d", |
45218193 DH |
1360 | __entry->server, |
1361 | __print_symbolic(__entry->reason, afs_server_traces), | |
977e5f8e DH |
1362 | __entry->ref, |
1363 | __entry->active) | |
45218193 DH |
1364 | ); |
1365 | ||
cca37d45 DH |
1366 | TRACE_EVENT(afs_volume, |
1367 | TP_PROTO(afs_volid_t vid, int ref, enum afs_volume_trace reason), | |
1368 | ||
1369 | TP_ARGS(vid, ref, reason), | |
1370 | ||
1371 | TP_STRUCT__entry( | |
a790c258 DH |
1372 | __field(afs_volid_t, vid) |
1373 | __field(int, ref) | |
1374 | __field(enum afs_volume_trace, reason) | |
cca37d45 DH |
1375 | ), |
1376 | ||
1377 | TP_fast_assign( | |
1378 | __entry->vid = vid; | |
1379 | __entry->ref = ref; | |
1380 | __entry->reason = reason; | |
1381 | ), | |
1382 | ||
c56f9ec8 | 1383 | TP_printk("V=%llx %s ur=%d", |
cca37d45 DH |
1384 | __entry->vid, |
1385 | __print_symbolic(__entry->reason, afs_volume_traces), | |
1386 | __entry->ref) | |
1387 | ); | |
1388 | ||
dca54a7b | 1389 | TRACE_EVENT(afs_cell, |
c56f9ec8 | 1390 | TP_PROTO(unsigned int cell_debug_id, int ref, int active, |
dca54a7b DH |
1391 | enum afs_cell_trace reason), |
1392 | ||
c56f9ec8 | 1393 | TP_ARGS(cell_debug_id, ref, active, reason), |
dca54a7b DH |
1394 | |
1395 | TP_STRUCT__entry( | |
a790c258 DH |
1396 | __field(unsigned int, cell) |
1397 | __field(int, ref) | |
1398 | __field(int, active) | |
1399 | __field(int, reason) | |
dca54a7b DH |
1400 | ), |
1401 | ||
1402 | TP_fast_assign( | |
1403 | __entry->cell = cell_debug_id; | |
c56f9ec8 | 1404 | __entry->ref = ref; |
dca54a7b DH |
1405 | __entry->active = active; |
1406 | __entry->reason = reason; | |
1407 | ), | |
1408 | ||
c56f9ec8 | 1409 | TP_printk("L=%08x %s r=%d a=%d", |
dca54a7b DH |
1410 | __entry->cell, |
1411 | __print_symbolic(__entry->reason, afs_cell_traces), | |
c56f9ec8 | 1412 | __entry->ref, |
dca54a7b DH |
1413 | __entry->active) |
1414 | ); | |
1415 | ||
1e5d8493 DH |
1416 | TRACE_EVENT(afs_alist, |
1417 | TP_PROTO(unsigned int alist_debug_id, int ref, enum afs_alist_trace reason), | |
1418 | ||
1419 | TP_ARGS(alist_debug_id, ref, reason), | |
1420 | ||
1421 | TP_STRUCT__entry( | |
1422 | __field(unsigned int, alist) | |
1423 | __field(int, ref) | |
1424 | __field(int, active) | |
1425 | __field(int, reason) | |
1426 | ), | |
1427 | ||
1428 | TP_fast_assign( | |
1429 | __entry->alist = alist_debug_id; | |
1430 | __entry->ref = ref; | |
1431 | __entry->reason = reason; | |
1432 | ), | |
1433 | ||
1434 | TP_printk("AL=%08x %s r=%d", | |
1435 | __entry->alist, | |
1436 | __print_symbolic(__entry->reason, afs_alist_traces), | |
1437 | __entry->ref) | |
1438 | ); | |
1439 | ||
f49b594d DH |
1440 | TRACE_EVENT(afs_estate, |
1441 | TP_PROTO(unsigned int server_debug_id, unsigned int estate_debug_id, | |
1442 | int ref, enum afs_estate_trace reason), | |
1443 | ||
1444 | TP_ARGS(server_debug_id, estate_debug_id, ref, reason), | |
1445 | ||
1446 | TP_STRUCT__entry( | |
1447 | __field(unsigned int, server) | |
1448 | __field(unsigned int, estate) | |
1449 | __field(int, ref) | |
1450 | __field(int, active) | |
1451 | __field(int, reason) | |
1452 | ), | |
1453 | ||
1454 | TP_fast_assign( | |
1455 | __entry->server = server_debug_id; | |
1456 | __entry->estate = estate_debug_id; | |
1457 | __entry->ref = ref; | |
1458 | __entry->reason = reason; | |
1459 | ), | |
1460 | ||
1461 | TP_printk("ES=%08x[%x] %s r=%d", | |
1462 | __entry->server, | |
1463 | __entry->estate, | |
1464 | __print_symbolic(__entry->reason, afs_estate_traces), | |
1465 | __entry->ref) | |
1466 | ); | |
1467 | ||
92f091cd | 1468 | TRACE_EVENT(afs_fs_probe, |
f49b594d | 1469 | TP_PROTO(struct afs_server *server, bool tx, struct afs_endpoint_state *estate, |
92f091cd DH |
1470 | unsigned int addr_index, int error, s32 abort_code, unsigned int rtt_us), |
1471 | ||
f49b594d | 1472 | TP_ARGS(server, tx, estate, addr_index, error, abort_code, rtt_us), |
92f091cd DH |
1473 | |
1474 | TP_STRUCT__entry( | |
1475 | __field(unsigned int, server) | |
f49b594d | 1476 | __field(unsigned int, estate) |
92f091cd DH |
1477 | __field(bool, tx) |
1478 | __field(u16, addr_index) | |
1479 | __field(short, error) | |
1480 | __field(s32, abort_code) | |
1481 | __field(unsigned int, rtt_us) | |
1482 | __field_struct(struct sockaddr_rxrpc, srx) | |
1483 | ), | |
1484 | ||
1485 | TP_fast_assign( | |
f49b594d | 1486 | struct afs_addr_list *alist = estate->addresses; |
92f091cd | 1487 | __entry->server = server->debug_id; |
f49b594d | 1488 | __entry->estate = estate->probe_seq; |
92f091cd DH |
1489 | __entry->tx = tx; |
1490 | __entry->addr_index = addr_index; | |
1491 | __entry->error = error; | |
1492 | __entry->abort_code = abort_code; | |
1493 | __entry->rtt_us = rtt_us; | |
1494 | memcpy(&__entry->srx, rxrpc_kernel_remote_srx(alist->addrs[addr_index].peer), | |
1495 | sizeof(__entry->srx)); | |
1496 | ), | |
1497 | ||
f49b594d DH |
1498 | TP_printk("s=%08x %s pq=%x ax=%u e=%d ac=%d rtt=%d %pISpc", |
1499 | __entry->server, __entry->tx ? "tx" : "rx", __entry->estate, | |
1500 | __entry->addr_index, __entry->error, __entry->abort_code, __entry->rtt_us, | |
92f091cd DH |
1501 | &__entry->srx.transport) |
1502 | ); | |
1503 | ||
e6a7d7f7 DH |
1504 | TRACE_EVENT(afs_vl_probe, |
1505 | TP_PROTO(struct afs_vlserver *server, bool tx, struct afs_addr_list *alist, | |
1506 | unsigned int addr_index, int error, s32 abort_code, unsigned int rtt_us), | |
1507 | ||
1508 | TP_ARGS(server, tx, alist, addr_index, error, abort_code, rtt_us), | |
1509 | ||
1510 | TP_STRUCT__entry( | |
1511 | __field(unsigned int, server) | |
1512 | __field(bool, tx) | |
1513 | __field(unsigned short, flags) | |
1514 | __field(u16, addr_index) | |
1515 | __field(short, error) | |
1516 | __field(s32, abort_code) | |
1517 | __field(unsigned int, rtt_us) | |
1518 | __field_struct(struct sockaddr_rxrpc, srx) | |
1519 | ), | |
1520 | ||
1521 | TP_fast_assign( | |
1522 | __entry->server = server->debug_id; | |
1523 | __entry->tx = tx; | |
1524 | __entry->addr_index = addr_index; | |
1525 | __entry->error = error; | |
1526 | __entry->abort_code = abort_code; | |
1527 | __entry->rtt_us = rtt_us; | |
1528 | memcpy(&__entry->srx, rxrpc_kernel_remote_srx(alist->addrs[addr_index].peer), | |
1529 | sizeof(__entry->srx)); | |
1530 | ), | |
1531 | ||
1532 | TP_printk("vl=%08x %s ax=%u e=%d ac=%d rtt=%d %pISpc", | |
1533 | __entry->server, __entry->tx ? "tx" : "rx", __entry->addr_index, | |
1534 | __entry->error, __entry->abort_code, __entry->rtt_us, | |
1535 | &__entry->srx.transport) | |
1536 | ); | |
1537 | ||
495f2ae9 DH |
1538 | TRACE_EVENT(afs_rotate, |
1539 | TP_PROTO(struct afs_operation *op, enum afs_rotate_trace reason, unsigned int extra), | |
1540 | ||
1541 | TP_ARGS(op, reason, extra), | |
1542 | ||
1543 | TP_STRUCT__entry( | |
1544 | __field(unsigned int, op) | |
1545 | __field(unsigned int, flags) | |
1546 | __field(unsigned int, extra) | |
1547 | __field(unsigned short, iteration) | |
1548 | __field(short, server_index) | |
1549 | __field(short, addr_index) | |
1550 | __field(enum afs_rotate_trace, reason) | |
1551 | ), | |
1552 | ||
1553 | TP_fast_assign( | |
1554 | __entry->op = op->debug_id; | |
1555 | __entry->flags = op->flags; | |
1556 | __entry->iteration = op->nr_iterations; | |
1557 | __entry->server_index = op->server_index; | |
1558 | __entry->addr_index = op->addr_index; | |
1559 | __entry->reason = reason; | |
1560 | __entry->extra = extra; | |
1561 | ), | |
1562 | ||
1563 | TP_printk("OP=%08x it=%02x %s fl=%x sx=%d ax=%d ext=%d", | |
1564 | __entry->op, | |
1565 | __entry->iteration, | |
1566 | __print_symbolic(__entry->reason, afs_rotate_traces), | |
1567 | __entry->flags, | |
1568 | __entry->server_index, | |
1569 | __entry->addr_index, | |
1570 | __entry->extra) | |
1571 | ); | |
1572 | ||
abcbd3bf DH |
1573 | TRACE_EVENT(afs_make_call, |
1574 | TP_PROTO(struct afs_call *call), | |
1575 | ||
1576 | TP_ARGS(call), | |
1577 | ||
1578 | TP_STRUCT__entry( | |
1579 | __field(unsigned int, call) | |
1580 | __field(bool, is_vl) | |
1581 | __field(enum afs_fs_operation, op) | |
1582 | __field_struct(struct afs_fid, fid) | |
1583 | __field_struct(struct sockaddr_rxrpc, srx) | |
1584 | ), | |
1585 | ||
1586 | TP_fast_assign( | |
1587 | __entry->call = call->debug_id; | |
1588 | __entry->op = call->operation_ID; | |
1589 | __entry->fid = call->fid; | |
1590 | memcpy(&__entry->srx, rxrpc_kernel_remote_srx(call->peer), | |
1591 | sizeof(__entry->srx)); | |
1592 | __entry->srx.srx_service = call->service_id; | |
1593 | __entry->is_vl = (__entry->srx.srx_service == VL_SERVICE || | |
1594 | __entry->srx.srx_service == YFS_VL_SERVICE); | |
1595 | ), | |
1596 | ||
1597 | TP_printk("c=%08x %pISpc+%u %s %llx:%llx:%x", | |
1598 | __entry->call, | |
1599 | &__entry->srx.transport, | |
1600 | __entry->srx.srx_service, | |
1601 | __entry->is_vl ? | |
1602 | __print_symbolic(__entry->op, afs_vl_operations) : | |
1603 | __print_symbolic(__entry->op, afs_fs_operations), | |
1604 | __entry->fid.vid, | |
1605 | __entry->fid.vnode, | |
1606 | __entry->fid.unique) | |
1607 | ); | |
1608 | ||
8e8d7f13 DH |
1609 | #endif /* _TRACE_AFS_H */ |
1610 | ||
1611 | /* This part must be outside protection */ | |
1612 | #include <trace/define_trace.h> |