/* SPDX-License-Identifier: GPL-2.0 */ /* * Like the headers that use TRACE_EVENT(), the TRACE_CUSTOM_EVENT() * needs a header that allows for multiple inclusions. * * Test for a unique name (here we have _TRACE_CUSTOM_SCHED_H), * also allowing to continue if TRACE_CUSTOM_MULTI_READ is defined. */ #if !defined(_TRACE_CUSTOM_SCHED_H) || defined(TRACE_CUSTOM_MULTI_READ) #define _TRACE_CUSTOM_SCHED_H /* Include linux/trace_events.h for initial defines of TRACE_CUSTOM_EVENT() */ #include <linux/trace_events.h> /* * TRACE_CUSTOM_EVENT() is just like TRACE_EVENT(). The first parameter * is the event name of an existing event where the TRACE_EVENT has been included * in the C file before including this file. */ TRACE_CUSTOM_EVENT TRACE_CUSTOM_EVENT #endif /* * Just like the headers that create TRACE_EVENTs, the below must * be outside the protection of the above #if block. */ /* * It is required that the Makefile includes: * CFLAGS_<c_file>.o := -I$(src) */ #undef TRACE_INCLUDE_PATH #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_PATH … /* * It is requred that the TRACE_INCLUDE_FILE be the same * as this file without the ".h". */ #define TRACE_INCLUDE_FILE … #include <trace/define_custom_trace.h>