include/trace/events/scsi.h

Source file repositories/reference/linux-study-clean/include/trace/events/scsi.h

File Facts

System
Linux kernel
Corpus path
include/trace/events/scsi.h
Extension
.h
Size
12432 bytes
Lines
361
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

scsi_command_normalize_sense(cmd, &sshdr)) {
			__entry->sense_key = sshdr.sense_key;
			__entry->asc = sshdr.asc;
			__entry->ascq = sshdr.ascq;
		} else {
			__entry->sense_key = 0;
			__entry->asc = 0;
			__entry->ascq = 0;
		}
	),

	TP_printk("host_no=%u channel=%u id=%u lun=%u data_sgl=%u prot_sgl=%u " \
		  "prot_op=%s driver_tag=%d scheduler_tag=%d cmnd=(%s %s raw=%s) " \
		  "result=(driver=%s host=%s message=%s status=%s) "
		  "sense=(key=%#x asc=%#x ascq=%#x)",
		  __entry->host_no, __entry->channel, __entry->id,
		  __entry->lun, __entry->data_sglen, __entry->prot_sglen,
		  show_prot_op_name(__entry->prot_op), __entry->driver_tag,
		  __entry->scheduler_tag, show_opcode_name(__entry->opcode),
		  __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len),
		  __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len),
		  "DRIVER_OK",
		  show_hostbyte_name(((__entry->result) >> 16) & 0xff),
		  "COMMAND_COMPLETE",
		  show_statusbyte_name(__entry->result & 0xff),
		  __entry->sense_key, __entry->asc, __entry->ascq)
);

DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_done,
	     TP_PROTO(struct scsi_cmnd *cmd),
	     TP_ARGS(cmd));

DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_timeout,
	     TP_PROTO(struct scsi_cmnd *cmd),
	     TP_ARGS(cmd));

TRACE_EVENT(scsi_eh_wakeup,

	TP_PROTO(struct Scsi_Host *shost),

	TP_ARGS(shost),

	TP_STRUCT__entry(
		__field( unsigned int,	host_no	)
	),

	TP_fast_assign(
		__entry->host_no	= shost->host_no;
	),

	TP_printk("host_no=%u", __entry->host_no)
);

#endif /*  _TRACE_SCSI_H */

/* This part must be outside protection */
#include <trace/define_trace.h>

Annotation

Implementation Notes