Fix: btrfs: Remove fsid/metadata_fsid fields from btrfs_info
[lttng-modules.git] / instrumentation / events / lttng-module / scsi.h
... / ...
CommitLineData
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM scsi
3
4#if !defined(LTTNG_TRACE_SCSI_H) || defined(TRACE_HEADER_MULTI_READ)
5#define LTTNG_TRACE_SCSI_H
6
7#include <probes/lttng-tracepoint-event.h>
8#include <scsi/scsi_cmnd.h>
9#include <scsi/scsi_host.h>
10#include <linux/trace_seq.h>
11#include <linux/version.h>
12
13#ifndef _TRACE_SCSI_DEF
14#define _TRACE_SCSI_DEF
15
16#define scsi_opcode_name(opcode) { opcode, #opcode }
17
18#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0) \
19 || LTTNG_SLE_KERNEL_RANGE(4,4,9,36,0,0, 4,5,0,0,0,0))
20
21#define show_opcode_name(val) \
22 __print_symbolic(val, \
23 scsi_opcode_name(TEST_UNIT_READY), \
24 scsi_opcode_name(REZERO_UNIT), \
25 scsi_opcode_name(REQUEST_SENSE), \
26 scsi_opcode_name(FORMAT_UNIT), \
27 scsi_opcode_name(READ_BLOCK_LIMITS), \
28 scsi_opcode_name(REASSIGN_BLOCKS), \
29 scsi_opcode_name(INITIALIZE_ELEMENT_STATUS), \
30 scsi_opcode_name(READ_6), \
31 scsi_opcode_name(WRITE_6), \
32 scsi_opcode_name(SEEK_6), \
33 scsi_opcode_name(READ_REVERSE), \
34 scsi_opcode_name(WRITE_FILEMARKS), \
35 scsi_opcode_name(SPACE), \
36 scsi_opcode_name(INQUIRY), \
37 scsi_opcode_name(RECOVER_BUFFERED_DATA), \
38 scsi_opcode_name(MODE_SELECT), \
39 scsi_opcode_name(RESERVE), \
40 scsi_opcode_name(RELEASE), \
41 scsi_opcode_name(COPY), \
42 scsi_opcode_name(ERASE), \
43 scsi_opcode_name(MODE_SENSE), \
44 scsi_opcode_name(START_STOP), \
45 scsi_opcode_name(RECEIVE_DIAGNOSTIC), \
46 scsi_opcode_name(SEND_DIAGNOSTIC), \
47 scsi_opcode_name(ALLOW_MEDIUM_REMOVAL), \
48 scsi_opcode_name(SET_WINDOW), \
49 scsi_opcode_name(READ_CAPACITY), \
50 scsi_opcode_name(READ_10), \
51 scsi_opcode_name(WRITE_10), \
52 scsi_opcode_name(SEEK_10), \
53 scsi_opcode_name(POSITION_TO_ELEMENT), \
54 scsi_opcode_name(WRITE_VERIFY), \
55 scsi_opcode_name(VERIFY), \
56 scsi_opcode_name(SEARCH_HIGH), \
57 scsi_opcode_name(SEARCH_EQUAL), \
58 scsi_opcode_name(SEARCH_LOW), \
59 scsi_opcode_name(SET_LIMITS), \
60 scsi_opcode_name(PRE_FETCH), \
61 scsi_opcode_name(READ_POSITION), \
62 scsi_opcode_name(SYNCHRONIZE_CACHE), \
63 scsi_opcode_name(LOCK_UNLOCK_CACHE), \
64 scsi_opcode_name(READ_DEFECT_DATA), \
65 scsi_opcode_name(MEDIUM_SCAN), \
66 scsi_opcode_name(COMPARE), \
67 scsi_opcode_name(COPY_VERIFY), \
68 scsi_opcode_name(WRITE_BUFFER), \
69 scsi_opcode_name(READ_BUFFER), \
70 scsi_opcode_name(UPDATE_BLOCK), \
71 scsi_opcode_name(READ_LONG), \
72 scsi_opcode_name(WRITE_LONG), \
73 scsi_opcode_name(CHANGE_DEFINITION), \
74 scsi_opcode_name(WRITE_SAME), \
75 scsi_opcode_name(UNMAP), \
76 scsi_opcode_name(READ_TOC), \
77 scsi_opcode_name(LOG_SELECT), \
78 scsi_opcode_name(LOG_SENSE), \
79 scsi_opcode_name(XDWRITEREAD_10), \
80 scsi_opcode_name(MODE_SELECT_10), \
81 scsi_opcode_name(RESERVE_10), \
82 scsi_opcode_name(RELEASE_10), \
83 scsi_opcode_name(MODE_SENSE_10), \
84 scsi_opcode_name(PERSISTENT_RESERVE_IN), \
85 scsi_opcode_name(PERSISTENT_RESERVE_OUT), \
86 scsi_opcode_name(VARIABLE_LENGTH_CMD), \
87 scsi_opcode_name(REPORT_LUNS), \
88 scsi_opcode_name(MAINTENANCE_IN), \
89 scsi_opcode_name(MAINTENANCE_OUT), \
90 scsi_opcode_name(MOVE_MEDIUM), \
91 scsi_opcode_name(EXCHANGE_MEDIUM), \
92 scsi_opcode_name(READ_12), \
93 scsi_opcode_name(WRITE_12), \
94 scsi_opcode_name(WRITE_VERIFY_12), \
95 scsi_opcode_name(SEARCH_HIGH_12), \
96 scsi_opcode_name(SEARCH_EQUAL_12), \
97 scsi_opcode_name(SEARCH_LOW_12), \
98 scsi_opcode_name(READ_ELEMENT_STATUS), \
99 scsi_opcode_name(SEND_VOLUME_TAG), \
100 scsi_opcode_name(WRITE_LONG_2), \
101 scsi_opcode_name(READ_16), \
102 scsi_opcode_name(WRITE_16), \
103 scsi_opcode_name(VERIFY_16), \
104 scsi_opcode_name(WRITE_SAME_16), \
105 scsi_opcode_name(ZBC_OUT), \
106 scsi_opcode_name(ZBC_IN), \
107 scsi_opcode_name(SERVICE_ACTION_IN_16), \
108 scsi_opcode_name(READ_32), \
109 scsi_opcode_name(WRITE_32), \
110 scsi_opcode_name(WRITE_SAME_32), \
111 scsi_opcode_name(ATA_16), \
112 scsi_opcode_name(ATA_12))
113
114#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) \
115 || LTTNG_RHEL_KERNEL_RANGE(3,10,0,327,0,0, 3,11,0,0,0,0))
116
117#define show_opcode_name(val) \
118 __print_symbolic(val, \
119 scsi_opcode_name(TEST_UNIT_READY), \
120 scsi_opcode_name(REZERO_UNIT), \
121 scsi_opcode_name(REQUEST_SENSE), \
122 scsi_opcode_name(FORMAT_UNIT), \
123 scsi_opcode_name(READ_BLOCK_LIMITS), \
124 scsi_opcode_name(REASSIGN_BLOCKS), \
125 scsi_opcode_name(INITIALIZE_ELEMENT_STATUS), \
126 scsi_opcode_name(READ_6), \
127 scsi_opcode_name(WRITE_6), \
128 scsi_opcode_name(SEEK_6), \
129 scsi_opcode_name(READ_REVERSE), \
130 scsi_opcode_name(WRITE_FILEMARKS), \
131 scsi_opcode_name(SPACE), \
132 scsi_opcode_name(INQUIRY), \
133 scsi_opcode_name(RECOVER_BUFFERED_DATA), \
134 scsi_opcode_name(MODE_SELECT), \
135 scsi_opcode_name(RESERVE), \
136 scsi_opcode_name(RELEASE), \
137 scsi_opcode_name(COPY), \
138 scsi_opcode_name(ERASE), \
139 scsi_opcode_name(MODE_SENSE), \
140 scsi_opcode_name(START_STOP), \
141 scsi_opcode_name(RECEIVE_DIAGNOSTIC), \
142 scsi_opcode_name(SEND_DIAGNOSTIC), \
143 scsi_opcode_name(ALLOW_MEDIUM_REMOVAL), \
144 scsi_opcode_name(SET_WINDOW), \
145 scsi_opcode_name(READ_CAPACITY), \
146 scsi_opcode_name(READ_10), \
147 scsi_opcode_name(WRITE_10), \
148 scsi_opcode_name(SEEK_10), \
149 scsi_opcode_name(POSITION_TO_ELEMENT), \
150 scsi_opcode_name(WRITE_VERIFY), \
151 scsi_opcode_name(VERIFY), \
152 scsi_opcode_name(SEARCH_HIGH), \
153 scsi_opcode_name(SEARCH_EQUAL), \
154 scsi_opcode_name(SEARCH_LOW), \
155 scsi_opcode_name(SET_LIMITS), \
156 scsi_opcode_name(PRE_FETCH), \
157 scsi_opcode_name(READ_POSITION), \
158 scsi_opcode_name(SYNCHRONIZE_CACHE), \
159 scsi_opcode_name(LOCK_UNLOCK_CACHE), \
160 scsi_opcode_name(READ_DEFECT_DATA), \
161 scsi_opcode_name(MEDIUM_SCAN), \
162 scsi_opcode_name(COMPARE), \
163 scsi_opcode_name(COPY_VERIFY), \
164 scsi_opcode_name(WRITE_BUFFER), \
165 scsi_opcode_name(READ_BUFFER), \
166 scsi_opcode_name(UPDATE_BLOCK), \
167 scsi_opcode_name(READ_LONG), \
168 scsi_opcode_name(WRITE_LONG), \
169 scsi_opcode_name(CHANGE_DEFINITION), \
170 scsi_opcode_name(WRITE_SAME), \
171 scsi_opcode_name(UNMAP), \
172 scsi_opcode_name(READ_TOC), \
173 scsi_opcode_name(LOG_SELECT), \
174 scsi_opcode_name(LOG_SENSE), \
175 scsi_opcode_name(XDWRITEREAD_10), \
176 scsi_opcode_name(MODE_SELECT_10), \
177 scsi_opcode_name(RESERVE_10), \
178 scsi_opcode_name(RELEASE_10), \
179 scsi_opcode_name(MODE_SENSE_10), \
180 scsi_opcode_name(PERSISTENT_RESERVE_IN), \
181 scsi_opcode_name(PERSISTENT_RESERVE_OUT), \
182 scsi_opcode_name(VARIABLE_LENGTH_CMD), \
183 scsi_opcode_name(REPORT_LUNS), \
184 scsi_opcode_name(MAINTENANCE_IN), \
185 scsi_opcode_name(MAINTENANCE_OUT), \
186 scsi_opcode_name(MOVE_MEDIUM), \
187 scsi_opcode_name(EXCHANGE_MEDIUM), \
188 scsi_opcode_name(READ_12), \
189 scsi_opcode_name(WRITE_12), \
190 scsi_opcode_name(WRITE_VERIFY_12), \
191 scsi_opcode_name(SEARCH_HIGH_12), \
192 scsi_opcode_name(SEARCH_EQUAL_12), \
193 scsi_opcode_name(SEARCH_LOW_12), \
194 scsi_opcode_name(READ_ELEMENT_STATUS), \
195 scsi_opcode_name(SEND_VOLUME_TAG), \
196 scsi_opcode_name(WRITE_LONG_2), \
197 scsi_opcode_name(READ_16), \
198 scsi_opcode_name(WRITE_16), \
199 scsi_opcode_name(VERIFY_16), \
200 scsi_opcode_name(WRITE_SAME_16), \
201 scsi_opcode_name(SERVICE_ACTION_IN_16), \
202 scsi_opcode_name(SAI_READ_CAPACITY_16), \
203 scsi_opcode_name(SAI_GET_LBA_STATUS), \
204 scsi_opcode_name(MI_REPORT_TARGET_PGS), \
205 scsi_opcode_name(MO_SET_TARGET_PGS), \
206 scsi_opcode_name(READ_32), \
207 scsi_opcode_name(WRITE_32), \
208 scsi_opcode_name(WRITE_SAME_32), \
209 scsi_opcode_name(ATA_16), \
210 scsi_opcode_name(ATA_12))
211
212#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) */
213
214#define show_opcode_name(val) \
215 __print_symbolic(val, \
216 scsi_opcode_name(TEST_UNIT_READY), \
217 scsi_opcode_name(REZERO_UNIT), \
218 scsi_opcode_name(REQUEST_SENSE), \
219 scsi_opcode_name(FORMAT_UNIT), \
220 scsi_opcode_name(READ_BLOCK_LIMITS), \
221 scsi_opcode_name(REASSIGN_BLOCKS), \
222 scsi_opcode_name(INITIALIZE_ELEMENT_STATUS), \
223 scsi_opcode_name(READ_6), \
224 scsi_opcode_name(WRITE_6), \
225 scsi_opcode_name(SEEK_6), \
226 scsi_opcode_name(READ_REVERSE), \
227 scsi_opcode_name(WRITE_FILEMARKS), \
228 scsi_opcode_name(SPACE), \
229 scsi_opcode_name(INQUIRY), \
230 scsi_opcode_name(RECOVER_BUFFERED_DATA), \
231 scsi_opcode_name(MODE_SELECT), \
232 scsi_opcode_name(RESERVE), \
233 scsi_opcode_name(RELEASE), \
234 scsi_opcode_name(COPY), \
235 scsi_opcode_name(ERASE), \
236 scsi_opcode_name(MODE_SENSE), \
237 scsi_opcode_name(START_STOP), \
238 scsi_opcode_name(RECEIVE_DIAGNOSTIC), \
239 scsi_opcode_name(SEND_DIAGNOSTIC), \
240 scsi_opcode_name(ALLOW_MEDIUM_REMOVAL), \
241 scsi_opcode_name(SET_WINDOW), \
242 scsi_opcode_name(READ_CAPACITY), \
243 scsi_opcode_name(READ_10), \
244 scsi_opcode_name(WRITE_10), \
245 scsi_opcode_name(SEEK_10), \
246 scsi_opcode_name(POSITION_TO_ELEMENT), \
247 scsi_opcode_name(WRITE_VERIFY), \
248 scsi_opcode_name(VERIFY), \
249 scsi_opcode_name(SEARCH_HIGH), \
250 scsi_opcode_name(SEARCH_EQUAL), \
251 scsi_opcode_name(SEARCH_LOW), \
252 scsi_opcode_name(SET_LIMITS), \
253 scsi_opcode_name(PRE_FETCH), \
254 scsi_opcode_name(READ_POSITION), \
255 scsi_opcode_name(SYNCHRONIZE_CACHE), \
256 scsi_opcode_name(LOCK_UNLOCK_CACHE), \
257 scsi_opcode_name(READ_DEFECT_DATA), \
258 scsi_opcode_name(MEDIUM_SCAN), \
259 scsi_opcode_name(COMPARE), \
260 scsi_opcode_name(COPY_VERIFY), \
261 scsi_opcode_name(WRITE_BUFFER), \
262 scsi_opcode_name(READ_BUFFER), \
263 scsi_opcode_name(UPDATE_BLOCK), \
264 scsi_opcode_name(READ_LONG), \
265 scsi_opcode_name(WRITE_LONG), \
266 scsi_opcode_name(CHANGE_DEFINITION), \
267 scsi_opcode_name(WRITE_SAME), \
268 scsi_opcode_name(UNMAP), \
269 scsi_opcode_name(READ_TOC), \
270 scsi_opcode_name(LOG_SELECT), \
271 scsi_opcode_name(LOG_SENSE), \
272 scsi_opcode_name(XDWRITEREAD_10), \
273 scsi_opcode_name(MODE_SELECT_10), \
274 scsi_opcode_name(RESERVE_10), \
275 scsi_opcode_name(RELEASE_10), \
276 scsi_opcode_name(MODE_SENSE_10), \
277 scsi_opcode_name(PERSISTENT_RESERVE_IN), \
278 scsi_opcode_name(PERSISTENT_RESERVE_OUT), \
279 scsi_opcode_name(VARIABLE_LENGTH_CMD), \
280 scsi_opcode_name(REPORT_LUNS), \
281 scsi_opcode_name(MAINTENANCE_IN), \
282 scsi_opcode_name(MAINTENANCE_OUT), \
283 scsi_opcode_name(MOVE_MEDIUM), \
284 scsi_opcode_name(EXCHANGE_MEDIUM), \
285 scsi_opcode_name(READ_12), \
286 scsi_opcode_name(WRITE_12), \
287 scsi_opcode_name(WRITE_VERIFY_12), \
288 scsi_opcode_name(SEARCH_HIGH_12), \
289 scsi_opcode_name(SEARCH_EQUAL_12), \
290 scsi_opcode_name(SEARCH_LOW_12), \
291 scsi_opcode_name(READ_ELEMENT_STATUS), \
292 scsi_opcode_name(SEND_VOLUME_TAG), \
293 scsi_opcode_name(WRITE_LONG_2), \
294 scsi_opcode_name(READ_16), \
295 scsi_opcode_name(WRITE_16), \
296 scsi_opcode_name(VERIFY_16), \
297 scsi_opcode_name(WRITE_SAME_16), \
298 scsi_opcode_name(SERVICE_ACTION_IN), \
299 scsi_opcode_name(SAI_READ_CAPACITY_16), \
300 scsi_opcode_name(SAI_GET_LBA_STATUS), \
301 scsi_opcode_name(MI_REPORT_TARGET_PGS), \
302 scsi_opcode_name(MO_SET_TARGET_PGS), \
303 scsi_opcode_name(READ_32), \
304 scsi_opcode_name(WRITE_32), \
305 scsi_opcode_name(WRITE_SAME_32), \
306 scsi_opcode_name(ATA_16), \
307 scsi_opcode_name(ATA_12))
308
309#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)) */
310
311#define scsi_hostbyte_name(result) { result, #result }
312#define show_hostbyte_name(val) \
313 __print_symbolic(val, \
314 scsi_hostbyte_name(DID_OK), \
315 scsi_hostbyte_name(DID_NO_CONNECT), \
316 scsi_hostbyte_name(DID_BUS_BUSY), \
317 scsi_hostbyte_name(DID_TIME_OUT), \
318 scsi_hostbyte_name(DID_BAD_TARGET), \
319 scsi_hostbyte_name(DID_ABORT), \
320 scsi_hostbyte_name(DID_PARITY), \
321 scsi_hostbyte_name(DID_ERROR), \
322 scsi_hostbyte_name(DID_RESET), \
323 scsi_hostbyte_name(DID_BAD_INTR), \
324 scsi_hostbyte_name(DID_PASSTHROUGH), \
325 scsi_hostbyte_name(DID_SOFT_ERROR), \
326 scsi_hostbyte_name(DID_IMM_RETRY), \
327 scsi_hostbyte_name(DID_REQUEUE), \
328 scsi_hostbyte_name(DID_TRANSPORT_DISRUPTED), \
329 scsi_hostbyte_name(DID_TRANSPORT_FAILFAST))
330
331#define scsi_driverbyte_name(result) { result, #result }
332#define show_driverbyte_name(val) \
333 __print_symbolic(val, \
334 scsi_driverbyte_name(DRIVER_OK), \
335 scsi_driverbyte_name(DRIVER_BUSY), \
336 scsi_driverbyte_name(DRIVER_SOFT), \
337 scsi_driverbyte_name(DRIVER_MEDIA), \
338 scsi_driverbyte_name(DRIVER_ERROR), \
339 scsi_driverbyte_name(DRIVER_INVALID), \
340 scsi_driverbyte_name(DRIVER_TIMEOUT), \
341 scsi_driverbyte_name(DRIVER_HARD), \
342 scsi_driverbyte_name(DRIVER_SENSE))
343
344#define scsi_msgbyte_name(result) { result, #result }
345#define show_msgbyte_name(val) \
346 __print_symbolic(val, \
347 scsi_msgbyte_name(COMMAND_COMPLETE), \
348 scsi_msgbyte_name(EXTENDED_MESSAGE), \
349 scsi_msgbyte_name(SAVE_POINTERS), \
350 scsi_msgbyte_name(RESTORE_POINTERS), \
351 scsi_msgbyte_name(DISCONNECT), \
352 scsi_msgbyte_name(INITIATOR_ERROR), \
353 scsi_msgbyte_name(ABORT_TASK_SET), \
354 scsi_msgbyte_name(MESSAGE_REJECT), \
355 scsi_msgbyte_name(NOP), \
356 scsi_msgbyte_name(MSG_PARITY_ERROR), \
357 scsi_msgbyte_name(LINKED_CMD_COMPLETE), \
358 scsi_msgbyte_name(LINKED_FLG_CMD_COMPLETE), \
359 scsi_msgbyte_name(TARGET_RESET), \
360 scsi_msgbyte_name(ABORT_TASK), \
361 scsi_msgbyte_name(CLEAR_TASK_SET), \
362 scsi_msgbyte_name(INITIATE_RECOVERY), \
363 scsi_msgbyte_name(RELEASE_RECOVERY), \
364 scsi_msgbyte_name(CLEAR_ACA), \
365 scsi_msgbyte_name(LOGICAL_UNIT_RESET), \
366 scsi_msgbyte_name(SIMPLE_QUEUE_TAG), \
367 scsi_msgbyte_name(HEAD_OF_QUEUE_TAG), \
368 scsi_msgbyte_name(ORDERED_QUEUE_TAG), \
369 scsi_msgbyte_name(IGNORE_WIDE_RESIDUE), \
370 scsi_msgbyte_name(ACA), \
371 scsi_msgbyte_name(QAS_REQUEST), \
372 scsi_msgbyte_name(BUS_DEVICE_RESET), \
373 scsi_msgbyte_name(ABORT))
374
375#define scsi_statusbyte_name(result) { result, #result }
376#define show_statusbyte_name(val) \
377 __print_symbolic(val, \
378 scsi_statusbyte_name(SAM_STAT_GOOD), \
379 scsi_statusbyte_name(SAM_STAT_CHECK_CONDITION), \
380 scsi_statusbyte_name(SAM_STAT_CONDITION_MET), \
381 scsi_statusbyte_name(SAM_STAT_BUSY), \
382 scsi_statusbyte_name(SAM_STAT_INTERMEDIATE), \
383 scsi_statusbyte_name(SAM_STAT_INTERMEDIATE_CONDITION_MET), \
384 scsi_statusbyte_name(SAM_STAT_RESERVATION_CONFLICT), \
385 scsi_statusbyte_name(SAM_STAT_COMMAND_TERMINATED), \
386 scsi_statusbyte_name(SAM_STAT_TASK_SET_FULL), \
387 scsi_statusbyte_name(SAM_STAT_ACA_ACTIVE), \
388 scsi_statusbyte_name(SAM_STAT_TASK_ABORTED))
389
390#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
391#define scsi_prot_op_name(result) { result, #result }
392#define show_prot_op_name(val) \
393 __print_symbolic(val, \
394 scsi_prot_op_name(SCSI_PROT_NORMAL), \
395 scsi_prot_op_name(SCSI_PROT_READ_INSERT), \
396 scsi_prot_op_name(SCSI_PROT_WRITE_STRIP), \
397 scsi_prot_op_name(SCSI_PROT_READ_STRIP), \
398 scsi_prot_op_name(SCSI_PROT_WRITE_INSERT), \
399 scsi_prot_op_name(SCSI_PROT_READ_PASS), \
400 scsi_prot_op_name(SCSI_PROT_WRITE_PASS))
401#endif
402
403const char *scsi_trace_parse_cdb(struct trace_seq*, unsigned char*, int);
404#define __parse_cdb(cdb, len) scsi_trace_parse_cdb(p, cdb, len)
405#endif
406
407LTTNG_TRACEPOINT_EVENT(scsi_dispatch_cmd_start,
408
409 TP_PROTO(struct scsi_cmnd *cmd),
410
411 TP_ARGS(cmd),
412
413 TP_FIELDS(
414 ctf_integer(unsigned int, host_no, cmd->device->host->host_no)
415 ctf_integer(unsigned int, channel, cmd->device->channel)
416 ctf_integer(unsigned int, id, cmd->device->id)
417 ctf_integer(unsigned int, lun, cmd->device->lun)
418 ctf_integer(unsigned int, opcode, cmd->cmnd[0])
419 ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
420 ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
421 ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
422#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
423 ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
424#endif
425 ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len)
426 )
427)
428
429LTTNG_TRACEPOINT_EVENT(scsi_dispatch_cmd_error,
430
431 TP_PROTO(struct scsi_cmnd *cmd, int rtn),
432
433 TP_ARGS(cmd, rtn),
434
435 TP_FIELDS(
436 ctf_integer(unsigned int, host_no, cmd->device->host->host_no)
437 ctf_integer(unsigned int, channel, cmd->device->channel)
438 ctf_integer(unsigned int, id, cmd->device->id)
439 ctf_integer(unsigned int, lun, cmd->device->lun)
440 ctf_integer(int, rtn, rtn)
441 ctf_integer(unsigned int, opcode, cmd->cmnd[0])
442 ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
443 ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
444 ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
445#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
446 ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
447#endif
448 ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len)
449 )
450)
451
452LTTNG_TRACEPOINT_EVENT_CLASS(scsi_cmd_done_timeout_template,
453
454 TP_PROTO(struct scsi_cmnd *cmd),
455
456 TP_ARGS(cmd),
457
458 TP_FIELDS(
459 ctf_integer(unsigned int, host_no, cmd->device->host->host_no)
460 ctf_integer(unsigned int, channel, cmd->device->channel)
461 ctf_integer(unsigned int, id, cmd->device->id)
462 ctf_integer(unsigned int, lun, cmd->device->lun)
463 ctf_integer(int, result, cmd->result)
464 ctf_integer(unsigned int, opcode, cmd->cmnd[0])
465 ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
466 ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
467 ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
468#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
469 ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
470#endif
471 ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, cmd->cmd_len)
472 )
473)
474
475LTTNG_TRACEPOINT_EVENT_INSTANCE(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_done,
476 TP_PROTO(struct scsi_cmnd *cmd),
477 TP_ARGS(cmd))
478
479LTTNG_TRACEPOINT_EVENT_INSTANCE(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_timeout,
480 TP_PROTO(struct scsi_cmnd *cmd),
481 TP_ARGS(cmd))
482
483LTTNG_TRACEPOINT_EVENT(scsi_eh_wakeup,
484
485 TP_PROTO(struct Scsi_Host *shost),
486
487 TP_ARGS(shost),
488
489 TP_FIELDS(
490 ctf_integer(unsigned int, host_no, shost->host_no)
491 )
492)
493
494#endif /* LTTNG_TRACE_SCSI_H */
495
496/* This part must be outside protection */
497#include <probes/define_trace.h>
This page took 0.025178 seconds and 4 git commands to generate.