Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* subsystem name is "db2k" */
- /* this is the "Mainline" version */
- #undef TRACE_SYSTEM
- #define TRACE_SYSTEM db2k
- #if !defined(_TRACE_DB2K) || defined(TRACE_HEADER_MULTI_READ)
- #define _TRACE_DB2K_H
- #include <linux/tracepoint.h>
- TRACE_EVENT(
- /* "db2k" is the subsystem name, "hello" is the event name */
- db2k_hello,
- /* tracepoint function prototype */
- TP_PROTO(int foo, const char* bar),
- /* arguments for this tracepoint */
- TP_ARGS(foo, bar),
- TP_STRUCT__entry(
- __field(int, my_int)
- __array(char, msg, TASK_COMM_LEN)
- ) ,
- TP_fast_assign(
- __entry->my_int = foo;
- memcpy(__entry->msg, bar, TASK_COMM_LEN);
- ),
- TP_printk("bar = %s, foo=%d", __entry->msg, __entry->my_int)
- );
- #endif
- /* this part must be outside protection */
- #include <trace/define_trace.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement