0001
0002
0003
0004
0005
0006 #if !defined(__HFI1_TRACE_RX_H) || defined(TRACE_HEADER_MULTI_READ)
0007 #define __HFI1_TRACE_RX_H
0008
0009 #include <linux/tracepoint.h>
0010 #include <linux/trace_seq.h>
0011
0012 #include "hfi.h"
0013
0014 #define tidtype_name(type) { PT_##type, #type }
0015 #define show_tidtype(type) \
0016 __print_symbolic(type, \
0017 tidtype_name(EXPECTED), \
0018 tidtype_name(EAGER), \
0019 tidtype_name(INVALID)) \
0020
0021 #undef TRACE_SYSTEM
0022 #define TRACE_SYSTEM hfi1_rx
0023
0024 TRACE_EVENT(hfi1_rcvhdr,
0025 TP_PROTO(struct hfi1_packet *packet),
0026 TP_ARGS(packet),
0027 TP_STRUCT__entry(DD_DEV_ENTRY(packet->rcd->dd)
0028 __field(u64, eflags)
0029 __field(u32, ctxt)
0030 __field(u32, etype)
0031 __field(u32, hlen)
0032 __field(u32, tlen)
0033 __field(u32, updegr)
0034 __field(u32, etail)
0035 ),
0036 TP_fast_assign(DD_DEV_ASSIGN(packet->rcd->dd);
0037 __entry->eflags = rhf_err_flags(packet->rhf);
0038 __entry->ctxt = packet->rcd->ctxt;
0039 __entry->etype = packet->etype;
0040 __entry->hlen = packet->hlen;
0041 __entry->tlen = packet->tlen;
0042 __entry->updegr = packet->updegr;
0043 __entry->etail = rhf_egr_index(packet->rhf);
0044 ),
0045 TP_printk(
0046 "[%s] ctxt %d eflags 0x%llx etype %d,%s hlen %d tlen %d updegr %d etail %d",
0047 __get_str(dev),
0048 __entry->ctxt,
0049 __entry->eflags,
0050 __entry->etype, show_packettype(__entry->etype),
0051 __entry->hlen,
0052 __entry->tlen,
0053 __entry->updegr,
0054 __entry->etail
0055 )
0056 );
0057
0058 TRACE_EVENT(hfi1_receive_interrupt,
0059 TP_PROTO(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd),
0060 TP_ARGS(dd, rcd),
0061 TP_STRUCT__entry(DD_DEV_ENTRY(dd)
0062 __field(u32, ctxt)
0063 __field(u8, slow_path)
0064 __field(u8, dma_rtail)
0065 ),
0066 TP_fast_assign(DD_DEV_ASSIGN(dd);
0067 __entry->ctxt = rcd->ctxt;
0068 __entry->slow_path = hfi1_is_slowpath(rcd);
0069 __entry->dma_rtail = get_dma_rtail_setting(rcd);
0070 ),
0071 TP_printk("[%s] ctxt %d SlowPath: %d DmaRtail: %d",
0072 __get_str(dev),
0073 __entry->ctxt,
0074 __entry->slow_path,
0075 __entry->dma_rtail
0076 )
0077 );
0078
0079 TRACE_EVENT(hfi1_mmu_invalidate,
0080 TP_PROTO(unsigned int ctxt, u16 subctxt, const char *type,
0081 unsigned long start, unsigned long end),
0082 TP_ARGS(ctxt, subctxt, type, start, end),
0083 TP_STRUCT__entry(
0084 __field(unsigned int, ctxt)
0085 __field(u16, subctxt)
0086 __string(type, type)
0087 __field(unsigned long, start)
0088 __field(unsigned long, end)
0089 ),
0090 TP_fast_assign(
0091 __entry->ctxt = ctxt;
0092 __entry->subctxt = subctxt;
0093 __assign_str(type, type);
0094 __entry->start = start;
0095 __entry->end = end;
0096 ),
0097 TP_printk("[%3u:%02u] MMU Invalidate (%s) 0x%lx - 0x%lx",
0098 __entry->ctxt,
0099 __entry->subctxt,
0100 __get_str(type),
0101 __entry->start,
0102 __entry->end
0103 )
0104 );
0105
0106 #endif
0107
0108 #undef TRACE_INCLUDE_PATH
0109 #undef TRACE_INCLUDE_FILE
0110 #define TRACE_INCLUDE_PATH .
0111 #define TRACE_INCLUDE_FILE trace_rx
0112 #include <trace/define_trace.h>