trace_iowait.h (1462B)
1/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 2/* 3 * Copyright(c) 2018 Intel Corporation. 4 * 5 */ 6#if !defined(__HFI1_TRACE_IOWAIT_H) || defined(TRACE_HEADER_MULTI_READ) 7#define __HFI1_TRACE_IOWAIT_H 8 9#include <linux/tracepoint.h> 10#include "iowait.h" 11#include "verbs.h" 12 13#undef TRACE_SYSTEM 14#define TRACE_SYSTEM hfi1_iowait 15 16DECLARE_EVENT_CLASS(hfi1_iowait_template, 17 TP_PROTO(struct iowait *wait, u32 flag), 18 TP_ARGS(wait, flag), 19 TP_STRUCT__entry(/* entry */ 20 __field(unsigned long, addr) 21 __field(unsigned long, flags) 22 __field(u32, flag) 23 __field(u32, qpn) 24 ), 25 TP_fast_assign(/* assign */ 26 __entry->addr = (unsigned long)wait; 27 __entry->flags = wait->flags; 28 __entry->flag = (1 << flag); 29 __entry->qpn = iowait_to_qp(wait)->ibqp.qp_num; 30 ), 31 TP_printk(/* print */ 32 "iowait 0x%lx qp %u flags 0x%lx flag 0x%x", 33 __entry->addr, 34 __entry->qpn, 35 __entry->flags, 36 __entry->flag 37 ) 38 ); 39 40DEFINE_EVENT(hfi1_iowait_template, hfi1_iowait_set, 41 TP_PROTO(struct iowait *wait, u32 flag), 42 TP_ARGS(wait, flag)); 43 44DEFINE_EVENT(hfi1_iowait_template, hfi1_iowait_clear, 45 TP_PROTO(struct iowait *wait, u32 flag), 46 TP_ARGS(wait, flag)); 47 48#endif /* __HFI1_TRACE_IOWAIT_H */ 49 50#undef TRACE_INCLUDE_PATH 51#undef TRACE_INCLUDE_FILE 52#define TRACE_INCLUDE_PATH . 53#define TRACE_INCLUDE_FILE trace_iowait 54#include <trace/define_trace.h>