1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47 #if !defined(__HFI1_TRACE_RX_H) || defined(TRACE_HEADER_MULTI_READ)
48 #define __HFI1_TRACE_RX_H
49
50 #include <linux/tracepoint.h>
51 #include <linux/trace_seq.h>
52
53 #include "hfi.h"
54
55 #define tidtype_name(type) { PT_##type, #type }
56 #define show_tidtype(type) \
57 __print_symbolic(type, \
58 tidtype_name(EXPECTED), \
59 tidtype_name(EAGER), \
60 tidtype_name(INVALID)) \
61
62 #undef TRACE_SYSTEM
63 #define TRACE_SYSTEM hfi1_rx
64
65 TRACE_EVENT(hfi1_rcvhdr,
66 TP_PROTO(struct hfi1_packet *packet),
67 TP_ARGS(packet),
68 TP_STRUCT__entry(DD_DEV_ENTRY(packet->rcd->dd)
69 __field(u64, eflags)
70 __field(u32, ctxt)
71 __field(u32, etype)
72 __field(u32, hlen)
73 __field(u32, tlen)
74 __field(u32, updegr)
75 __field(u32, etail)
76 ),
77 TP_fast_assign(DD_DEV_ASSIGN(packet->rcd->dd);
78 __entry->eflags = rhf_err_flags(packet->rhf);
79 __entry->ctxt = packet->rcd->ctxt;
80 __entry->etype = packet->etype;
81 __entry->hlen = packet->hlen;
82 __entry->tlen = packet->tlen;
83 __entry->updegr = packet->updegr;
84 __entry->etail = rhf_egr_index(packet->rhf);
85 ),
86 TP_printk(
87 "[%s] ctxt %d eflags 0x%llx etype %d,%s hlen %d tlen %d updegr %d etail %d",
88 __get_str(dev),
89 __entry->ctxt,
90 __entry->eflags,
91 __entry->etype, show_packettype(__entry->etype),
92 __entry->hlen,
93 __entry->tlen,
94 __entry->updegr,
95 __entry->etail
96 )
97 );
98
99 TRACE_EVENT(hfi1_receive_interrupt,
100 TP_PROTO(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd),
101 TP_ARGS(dd, rcd),
102 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
103 __field(u32, ctxt)
104 __field(u8, slow_path)
105 __field(u8, dma_rtail)
106 ),
107 TP_fast_assign(DD_DEV_ASSIGN(dd);
108 __entry->ctxt = rcd->ctxt;
109 if (rcd->do_interrupt ==
110 &handle_receive_interrupt) {
111 __entry->slow_path = 1;
112 __entry->dma_rtail = 0xFF;
113 } else if (rcd->do_interrupt ==
114 &handle_receive_interrupt_dma_rtail){
115 __entry->dma_rtail = 1;
116 __entry->slow_path = 0;
117 } else if (rcd->do_interrupt ==
118 &handle_receive_interrupt_nodma_rtail) {
119 __entry->dma_rtail = 0;
120 __entry->slow_path = 0;
121 }
122 ),
123 TP_printk("[%s] ctxt %d SlowPath: %d DmaRtail: %d",
124 __get_str(dev),
125 __entry->ctxt,
126 __entry->slow_path,
127 __entry->dma_rtail
128 )
129 );
130
131 TRACE_EVENT(hfi1_mmu_invalidate,
132 TP_PROTO(unsigned int ctxt, u16 subctxt, const char *type,
133 unsigned long start, unsigned long end),
134 TP_ARGS(ctxt, subctxt, type, start, end),
135 TP_STRUCT__entry(
136 __field(unsigned int, ctxt)
137 __field(u16, subctxt)
138 __string(type, type)
139 __field(unsigned long, start)
140 __field(unsigned long, end)
141 ),
142 TP_fast_assign(
143 __entry->ctxt = ctxt;
144 __entry->subctxt = subctxt;
145 __assign_str(type, type);
146 __entry->start = start;
147 __entry->end = end;
148 ),
149 TP_printk("[%3u:%02u] MMU Invalidate (%s) 0x%lx - 0x%lx",
150 __entry->ctxt,
151 __entry->subctxt,
152 __get_str(type),
153 __entry->start,
154 __entry->end
155 )
156 );
157
158 #endif
159
160 #undef TRACE_INCLUDE_PATH
161 #undef TRACE_INCLUDE_FILE
162 #define TRACE_INCLUDE_PATH .
163 #define TRACE_INCLUDE_FILE trace_rx
164 #include <trace/define_trace.h>