xref: /openbmc/linux/include/trace/events/qla.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1598a90f2SRajan Shanmugavelu /* SPDX-License-Identifier: GPL-2.0 */
2598a90f2SRajan Shanmugavelu #if !defined(_TRACE_QLA_H_) || defined(TRACE_HEADER_MULTI_READ)
3598a90f2SRajan Shanmugavelu #define _TRACE_QLA_H_
4598a90f2SRajan Shanmugavelu 
5598a90f2SRajan Shanmugavelu #include <linux/tracepoint.h>
6598a90f2SRajan Shanmugavelu 
7598a90f2SRajan Shanmugavelu #undef TRACE_SYSTEM
8598a90f2SRajan Shanmugavelu #define TRACE_SYSTEM qla
9598a90f2SRajan Shanmugavelu 
10598a90f2SRajan Shanmugavelu #define QLA_MSG_MAX 256
11598a90f2SRajan Shanmugavelu 
12fbbc95a4SBart Van Assche #pragma GCC diagnostic push
13fbbc95a4SBart Van Assche #ifndef __clang__
14fbbc95a4SBart Van Assche #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
15fbbc95a4SBart Van Assche #endif
16fbbc95a4SBart Van Assche 
17598a90f2SRajan Shanmugavelu DECLARE_EVENT_CLASS(qla_log_event,
18598a90f2SRajan Shanmugavelu 	TP_PROTO(const char *buf,
19598a90f2SRajan Shanmugavelu 		struct va_format *vaf),
20598a90f2SRajan Shanmugavelu 
21598a90f2SRajan Shanmugavelu 	TP_ARGS(buf, vaf),
22598a90f2SRajan Shanmugavelu 
23598a90f2SRajan Shanmugavelu 	TP_STRUCT__entry(
24598a90f2SRajan Shanmugavelu 		__string(buf, buf)
25*74003fc4SSteven Rostedt (Google) 		__vstring(msg, vaf->fmt, vaf->va)
26598a90f2SRajan Shanmugavelu 	),
27598a90f2SRajan Shanmugavelu 	TP_fast_assign(
28598a90f2SRajan Shanmugavelu 		__assign_str(buf, buf);
29*74003fc4SSteven Rostedt (Google) 		__assign_vstr(msg, vaf->fmt, vaf->va);
30598a90f2SRajan Shanmugavelu 	),
31598a90f2SRajan Shanmugavelu 
32598a90f2SRajan Shanmugavelu 	TP_printk("%s %s", __get_str(buf), __get_str(msg))
33598a90f2SRajan Shanmugavelu );
34598a90f2SRajan Shanmugavelu 
35fbbc95a4SBart Van Assche #pragma GCC diagnostic pop
36fbbc95a4SBart Van Assche 
37598a90f2SRajan Shanmugavelu DEFINE_EVENT(qla_log_event, ql_dbg_log,
38598a90f2SRajan Shanmugavelu 	TP_PROTO(const char *buf, struct va_format *vaf),
39598a90f2SRajan Shanmugavelu 	TP_ARGS(buf, vaf)
40598a90f2SRajan Shanmugavelu );
41598a90f2SRajan Shanmugavelu 
42598a90f2SRajan Shanmugavelu #endif /* _TRACE_QLA_H */
43598a90f2SRajan Shanmugavelu 
44598a90f2SRajan Shanmugavelu #define TRACE_INCLUDE_FILE qla
45598a90f2SRajan Shanmugavelu 
46598a90f2SRajan Shanmugavelu #include <trace/define_trace.h>
47