0001
0002 #undef TRACE_SYSTEM
0003 #define TRACE_SYSTEM bpf_test_run
0004
0005 #if !defined(_TRACE_BPF_TEST_RUN_H) || defined(TRACE_HEADER_MULTI_READ)
0006 #define _TRACE_BPF_TEST_RUN_H
0007
0008 #include <linux/tracepoint.h>
0009
0010 DECLARE_EVENT_CLASS(bpf_test_finish,
0011
0012 TP_PROTO(int *err),
0013
0014 TP_ARGS(err),
0015
0016 TP_STRUCT__entry(
0017 __field(int, err)
0018 ),
0019
0020 TP_fast_assign(
0021 __entry->err = *err;
0022 ),
0023
0024 TP_printk("bpf_test_finish with err=%d", __entry->err)
0025 );
0026
0027 #ifdef DEFINE_EVENT_WRITABLE
0028 #undef BPF_TEST_RUN_DEFINE_EVENT
0029 #define BPF_TEST_RUN_DEFINE_EVENT(template, call, proto, args, size) \
0030 DEFINE_EVENT_WRITABLE(template, call, PARAMS(proto), \
0031 PARAMS(args), size)
0032 #else
0033 #undef BPF_TEST_RUN_DEFINE_EVENT
0034 #define BPF_TEST_RUN_DEFINE_EVENT(template, call, proto, args, size) \
0035 DEFINE_EVENT(template, call, PARAMS(proto), PARAMS(args))
0036 #endif
0037
0038 BPF_TEST_RUN_DEFINE_EVENT(bpf_test_finish, bpf_test_finish,
0039
0040 TP_PROTO(int *err),
0041
0042 TP_ARGS(err),
0043
0044 sizeof(int)
0045 );
0046
0047 #endif
0048
0049
0050 #include <trace/define_trace.h>