linux/include/trace/bpf_probe.h

/* SPDX-License-Identifier: GPL-2.0 */

#undef TRACE_SYSTEM_VAR

#ifdef CONFIG_BPF_EVENTS

#include "stages/stage6_event_callback.h"

#undef __perf_count
#define __perf_count(c)

#undef __perf_task
#define __perf_task(t)

#include <linux/args.h>

/* cast any integer, pointer, or small struct to u64 */
#define UINTTYPE(size)
#define __CAST_TO_U64(x)

#define __CAST1(a,...)
#define __CAST2(a,...)
#define __CAST3(a,...)
#define __CAST4(a,...)
#define __CAST5(a,...)
#define __CAST6(a,...)
#define __CAST7(a,...)
#define __CAST8(a,...)
#define __CAST9(a,...)
#define __CAST10(a,...)
#define __CAST11(a,...)
#define __CAST12(a,...)
/* tracepoints with more than 12 arguments will hit build error */
#define CAST_TO_U64(...)

#define __BPF_DECLARE_TRACE(call, proto, args)

#undef DECLARE_EVENT_CLASS
#define DECLARE_EVENT_CLASS

/*
 * This part is compiled out, it is only here as a build time check
 * to make sure that if the tracepoint handling changes, the
 * bpf probe will fail to compile unless it too is updated.
 */
#define __DEFINE_EVENT

#define FIRST

#define __CHECK_WRITABLE_BUF_SIZE

#undef DEFINE_EVENT_WRITABLE
#define DEFINE_EVENT_WRITABLE

#undef DEFINE_EVENT
#define DEFINE_EVENT

#undef DEFINE_EVENT_PRINT
#define DEFINE_EVENT_PRINT

#undef DECLARE_TRACE
#define DECLARE_TRACE

#undef DECLARE_TRACE_WRITABLE
#define DECLARE_TRACE_WRITABLE

#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)

#undef DECLARE_TRACE_WRITABLE
#undef DEFINE_EVENT_WRITABLE
#undef __CHECK_WRITABLE_BUF_SIZE
#undef __DEFINE_EVENT
#undef FIRST

#endif /* CONFIG_BPF_EVENTS */