1*598a90f2SRajan Shanmugavelu /* SPDX-License-Identifier: GPL-2.0 */ 2*598a90f2SRajan Shanmugavelu #if !defined(_TRACE_QLA_H_) || defined(TRACE_HEADER_MULTI_READ) 3*598a90f2SRajan Shanmugavelu #define _TRACE_QLA_H_ 4*598a90f2SRajan Shanmugavelu 5*598a90f2SRajan Shanmugavelu #include <linux/tracepoint.h> 6*598a90f2SRajan Shanmugavelu 7*598a90f2SRajan Shanmugavelu #undef TRACE_SYSTEM 8*598a90f2SRajan Shanmugavelu #define TRACE_SYSTEM qla 9*598a90f2SRajan Shanmugavelu 10*598a90f2SRajan Shanmugavelu #define QLA_MSG_MAX 256 11*598a90f2SRajan Shanmugavelu 12*598a90f2SRajan Shanmugavelu DECLARE_EVENT_CLASS(qla_log_event, 13*598a90f2SRajan Shanmugavelu TP_PROTO(const char *buf, 14*598a90f2SRajan Shanmugavelu struct va_format *vaf), 15*598a90f2SRajan Shanmugavelu 16*598a90f2SRajan Shanmugavelu TP_ARGS(buf, vaf), 17*598a90f2SRajan Shanmugavelu 18*598a90f2SRajan Shanmugavelu TP_STRUCT__entry( 19*598a90f2SRajan Shanmugavelu __string(buf, buf) 20*598a90f2SRajan Shanmugavelu __dynamic_array(char, msg, QLA_MSG_MAX) 21*598a90f2SRajan Shanmugavelu ), 22*598a90f2SRajan Shanmugavelu TP_fast_assign( 23*598a90f2SRajan Shanmugavelu __assign_str(buf, buf); 24*598a90f2SRajan Shanmugavelu vsnprintf(__get_str(msg), QLA_MSG_MAX, vaf->fmt, *vaf->va); 25*598a90f2SRajan Shanmugavelu ), 26*598a90f2SRajan Shanmugavelu 27*598a90f2SRajan Shanmugavelu TP_printk("%s %s", __get_str(buf), __get_str(msg)) 28*598a90f2SRajan Shanmugavelu ); 29*598a90f2SRajan Shanmugavelu 30*598a90f2SRajan Shanmugavelu DEFINE_EVENT(qla_log_event, ql_dbg_log, 31*598a90f2SRajan Shanmugavelu TP_PROTO(const char *buf, struct va_format *vaf), 32*598a90f2SRajan Shanmugavelu TP_ARGS(buf, vaf) 33*598a90f2SRajan Shanmugavelu ); 34*598a90f2SRajan Shanmugavelu 35*598a90f2SRajan Shanmugavelu #endif /* _TRACE_QLA_H */ 36*598a90f2SRajan Shanmugavelu 37*598a90f2SRajan Shanmugavelu #define TRACE_INCLUDE_FILE qla 38*598a90f2SRajan Shanmugavelu 39*598a90f2SRajan Shanmugavelu #include <trace/define_trace.h> 40