Back to home page

OSCL-LXR

 
 

    


0001 #undef TRACE_SYSTEM
0002 #define TRACE_SYSTEM iscsi
0003 
0004 #if !defined(_TRACE_ISCSI_H) || defined(TRACE_HEADER_MULTI_READ)
0005 #define _TRACE_ISCSI_H
0006 
0007 #include <linux/tracepoint.h>
0008 
0009 /* max debug message length */
0010 #define ISCSI_MSG_MAX   256
0011 
0012 /*
0013  * Declare tracepoint helper function.
0014  */
0015 void iscsi_dbg_trace(void (*trace)(struct device *dev, struct va_format *),
0016              struct device *dev, const char *fmt, ...);
0017 
0018 /*
0019  * Declare event class for iscsi debug messages.
0020  */
0021 DECLARE_EVENT_CLASS(iscsi_log_msg,
0022 
0023     TP_PROTO(struct device *dev, struct va_format *vaf),
0024 
0025     TP_ARGS(dev, vaf),
0026 
0027     TP_STRUCT__entry(
0028         __string(dname,     dev_name(dev)       )
0029         __vstring(msg,      vaf->fmt, vaf->va)
0030     ),
0031 
0032     TP_fast_assign(
0033         __assign_str(dname, dev_name(dev));
0034         __assign_vstr(msg, vaf->fmt, vaf->va);
0035     ),
0036 
0037     TP_printk("%s: %s",__get_str(dname),  __get_str(msg)
0038     )
0039 );
0040 
0041 /*
0042  * Define event to capture iscsi connection debug messages.
0043  */
0044 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_conn,
0045     TP_PROTO(struct device *dev, struct va_format *vaf),
0046 
0047     TP_ARGS(dev, vaf)
0048 );
0049 
0050 /*
0051  * Define event to capture iscsi session debug messages.
0052  */
0053 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_session,
0054     TP_PROTO(struct device *dev, struct va_format *vaf),
0055 
0056     TP_ARGS(dev, vaf)
0057 );
0058 
0059 /*
0060  * Define event to capture iscsi error handling debug messages.
0061  */
0062 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_eh,
0063         TP_PROTO(struct device *dev, struct va_format *vaf),
0064 
0065         TP_ARGS(dev, vaf)
0066 );
0067 
0068 /*
0069  * Define event to capture iscsi tcp debug messages.
0070  */
0071 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_tcp,
0072         TP_PROTO(struct device *dev, struct va_format *vaf),
0073 
0074         TP_ARGS(dev, vaf)
0075 );
0076 
0077 /*
0078  * Define event to capture iscsi sw tcp debug messages.
0079  */
0080 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_sw_tcp,
0081     TP_PROTO(struct device *dev, struct va_format *vaf),
0082 
0083     TP_ARGS(dev, vaf)
0084 );
0085 
0086 /*
0087  * Define event to capture iscsi transport session debug messages.
0088  */
0089 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_trans_session,
0090     TP_PROTO(struct device *dev, struct va_format *vaf),
0091 
0092     TP_ARGS(dev, vaf)
0093 );
0094 
0095 /*
0096  * Define event to capture iscsi transport connection debug messages.
0097  */
0098 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_trans_conn,
0099     TP_PROTO(struct device *dev, struct va_format *vaf),
0100 
0101     TP_ARGS(dev, vaf)
0102 );
0103 
0104 #endif /* _TRACE_ISCSI_H */
0105 
0106 /* This part must be outside protection */
0107 #include <trace/define_trace.h>