Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* subsystem name is "db2k" */
- #undef TRACE_SYSTEM
- #define TRACE_SYSTEM db2k
- #if !defined(_TRACE_DB2K_H) || defined(TRACE_HEADER_MULTI_READ)
- #define _TRACE_DB2K_H
- /* this is the "adaptation layer" for our custom tracing */
- #include <linux/tracepoint.h>
- LTTNG_TRACEPOINT_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, 32)
- ) ,
- TP_fast_assign(
- tp_assign(my_int, foo)
- tp_memcpy(msg, bar, 32)
- ),
- TP_printk("bar = %s, foo=%d",
- __entry->msg,
- __entry->my_int)
- )
- #endif
- /* this part must be outside protection */
- #include "../../../probes/define_trace.h"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement