1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM iscsi
3
4 #if !defined(_TRACE_ISCSI_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_ISCSI_H
6
7 #include <linux/tracepoint.h>
8
9
10 #define ISCSI_MSG_MAX 256
11
12
13
14
15 void iscsi_dbg_trace(void (*trace)(struct device *dev, struct va_format *),
16 struct device *dev, const char *fmt, ...);
17
18
19
20
21 DECLARE_EVENT_CLASS(iscsi_log_msg,
22
23 TP_PROTO(struct device *dev, struct va_format *vaf),
24
25 TP_ARGS(dev, vaf),
26
27 TP_STRUCT__entry(
28 __string(dname, dev_name(dev) )
29 __dynamic_array(char, msg, ISCSI_MSG_MAX )
30 ),
31
32 TP_fast_assign(
33 __assign_str(dname, dev_name(dev));
34 vsnprintf(__get_str(msg), ISCSI_MSG_MAX, vaf->fmt, *vaf->va);
35 ),
36
37 TP_printk("%s: %s",__get_str(dname), __get_str(msg)
38 )
39 );
40
41
42
43
44 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_conn,
45 TP_PROTO(struct device *dev, struct va_format *vaf),
46
47 TP_ARGS(dev, vaf)
48 );
49
50
51
52
53 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_session,
54 TP_PROTO(struct device *dev, struct va_format *vaf),
55
56 TP_ARGS(dev, vaf)
57 );
58
59
60
61
62 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_eh,
63 TP_PROTO(struct device *dev, struct va_format *vaf),
64
65 TP_ARGS(dev, vaf)
66 );
67
68
69
70
71 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_tcp,
72 TP_PROTO(struct device *dev, struct va_format *vaf),
73
74 TP_ARGS(dev, vaf)
75 );
76
77
78
79
80 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_sw_tcp,
81 TP_PROTO(struct device *dev, struct va_format *vaf),
82
83 TP_ARGS(dev, vaf)
84 );
85
86
87
88
89 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_trans_session,
90 TP_PROTO(struct device *dev, struct va_format *vaf),
91
92 TP_ARGS(dev, vaf)
93 );
94
95
96
97
98 DEFINE_EVENT(iscsi_log_msg, iscsi_dbg_trans_conn,
99 TP_PROTO(struct device *dev, struct va_format *vaf),
100
101 TP_ARGS(dev, vaf)
102 );
103
104 #endif
105
106
107 #include <trace/define_trace.h>