18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#undef TRACE_SYSTEM 38c2ecf20Sopenharmony_ci#define TRACE_SYSTEM bpf_test_run 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#if !defined(_TRACE_BPF_TEST_RUN_H) || defined(TRACE_HEADER_MULTI_READ) 68c2ecf20Sopenharmony_ci#define _TRACE_BPF_TEST_RUN_H 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <linux/tracepoint.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciDECLARE_EVENT_CLASS(bpf_test_finish, 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci TP_PROTO(int *err), 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci TP_ARGS(err), 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci TP_STRUCT__entry( 178c2ecf20Sopenharmony_ci __field(int, err) 188c2ecf20Sopenharmony_ci ), 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci TP_fast_assign( 218c2ecf20Sopenharmony_ci __entry->err = *err; 228c2ecf20Sopenharmony_ci ), 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci TP_printk("bpf_test_finish with err=%d", __entry->err) 258c2ecf20Sopenharmony_ci); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#ifdef DEFINE_EVENT_WRITABLE 288c2ecf20Sopenharmony_ci#undef BPF_TEST_RUN_DEFINE_EVENT 298c2ecf20Sopenharmony_ci#define BPF_TEST_RUN_DEFINE_EVENT(template, call, proto, args, size) \ 308c2ecf20Sopenharmony_ci DEFINE_EVENT_WRITABLE(template, call, PARAMS(proto), \ 318c2ecf20Sopenharmony_ci PARAMS(args), size) 328c2ecf20Sopenharmony_ci#else 338c2ecf20Sopenharmony_ci#undef BPF_TEST_RUN_DEFINE_EVENT 348c2ecf20Sopenharmony_ci#define BPF_TEST_RUN_DEFINE_EVENT(template, call, proto, args, size) \ 358c2ecf20Sopenharmony_ci DEFINE_EVENT(template, call, PARAMS(proto), PARAMS(args)) 368c2ecf20Sopenharmony_ci#endif 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciBPF_TEST_RUN_DEFINE_EVENT(bpf_test_finish, bpf_test_finish, 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci TP_PROTO(int *err), 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci TP_ARGS(err), 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci sizeof(int) 458c2ecf20Sopenharmony_ci); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#endif 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* This part must be outside protection */ 508c2ecf20Sopenharmony_ci#include <trace/define_trace.h> 51