brintos

brintos / linux-shallow public Read only

0
0
Text · 2.1 KiB · 5827a4c Raw
78 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/*3 * Trace files that want to automate creation of all tracepoints defined4 * in their file should include this file. The following are macros that the5 * trace file may define:6 *7 * TRACE_SYSTEM defines the system the tracepoint is for8 *9 * TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h10 *     This macro may be defined to tell define_trace.h what file to include.11 *     Note, leave off the ".h".12 *13 * TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace14 *     then this macro can define the path to use. Note, the path is relative to15 *     define_trace.h, not the file including it. Full path names for out of tree16 *     modules must be used.17 */18 19#ifdef CREATE_CUSTOM_TRACE_EVENTS20 21/* Prevent recursion */22#undef CREATE_CUSTOM_TRACE_EVENTS23 24#include <linux/stringify.h>25 26#undef TRACE_CUSTOM_EVENT27#define TRACE_CUSTOM_EVENT(name, proto, args, tstruct, assign, print)28 29#undef DEFINE_CUSTOM_EVENT30#define DEFINE_CUSTOM_EVENT(template, name, proto, args)31 32#undef TRACE_INCLUDE33#undef __TRACE_INCLUDE34 35#ifndef TRACE_INCLUDE_FILE36# define TRACE_INCLUDE_FILE TRACE_SYSTEM37# define UNDEF_TRACE_INCLUDE_FILE38#endif39 40#ifndef TRACE_INCLUDE_PATH41# define __TRACE_INCLUDE(system) <trace/events/system.h>42# define UNDEF_TRACE_INCLUDE_PATH43#else44# define __TRACE_INCLUDE(system) __stringify(TRACE_INCLUDE_PATH/system.h)45#endif46 47# define TRACE_INCLUDE(system) __TRACE_INCLUDE(system)48 49/* Let the trace headers be reread */50#define TRACE_CUSTOM_MULTI_READ51 52#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)53 54#ifdef TRACEPOINTS_ENABLED55#include <trace/trace_custom_events.h>56#endif57 58#undef TRACE_CUSTOM_EVENT59#undef DECLARE_CUSTOM_EVENT_CLASS60#undef DEFINE_CUSTOM_EVENT61#undef TRACE_CUSTOM_MULTI_READ62 63/* Only undef what we defined in this file */64#ifdef UNDEF_TRACE_INCLUDE_FILE65# undef TRACE_INCLUDE_FILE66# undef UNDEF_TRACE_INCLUDE_FILE67#endif68 69#ifdef UNDEF_TRACE_INCLUDE_PATH70# undef TRACE_INCLUDE_PATH71# undef UNDEF_TRACE_INCLUDE_PATH72#endif73 74/* We may be processing more files */75#define CREATE_CUSTOM_TRACE_POINTS76 77#endif /* CREATE_CUSTOM_TRACE_POINTS */78