Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 #ifndef _LINUX_TRACEPOINT_H
0003 #define _LINUX_TRACEPOINT_H
0004 
0005 /*
0006  * Kernel Tracepoint API.
0007  *
0008  * See Documentation/trace/tracepoints.rst.
0009  *
0010  * Copyright (C) 2008-2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
0011  *
0012  * Heavily inspired from the Linux Kernel Markers.
0013  */
0014 
0015 #include <linux/smp.h>
0016 #include <linux/srcu.h>
0017 #include <linux/errno.h>
0018 #include <linux/types.h>
0019 #include <linux/cpumask.h>
0020 #include <linux/rcupdate.h>
0021 #include <linux/tracepoint-defs.h>
0022 #include <linux/static_call.h>
0023 
0024 struct module;
0025 struct tracepoint;
0026 struct notifier_block;
0027 
0028 struct trace_eval_map {
0029     const char      *system;
0030     const char      *eval_string;
0031     unsigned long       eval_value;
0032 };
0033 
0034 #define TRACEPOINT_DEFAULT_PRIO 10
0035 
0036 extern struct srcu_struct tracepoint_srcu;
0037 
0038 extern int
0039 tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data);
0040 extern int
0041 tracepoint_probe_register_prio(struct tracepoint *tp, void *probe, void *data,
0042                    int prio);
0043 extern int
0044 tracepoint_probe_register_prio_may_exist(struct tracepoint *tp, void *probe, void *data,
0045                      int prio);
0046 extern int
0047 tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data);
0048 static inline int
0049 tracepoint_probe_register_may_exist(struct tracepoint *tp, void *probe,
0050                     void *data)
0051 {
0052     return tracepoint_probe_register_prio_may_exist(tp, probe, data,
0053                             TRACEPOINT_DEFAULT_PRIO);
0054 }
0055 extern void
0056 for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv),
0057         void *priv);
0058 
0059 #ifdef CONFIG_MODULES
0060 struct tp_module {
0061     struct list_head list;
0062     struct module *mod;
0063 };
0064 
0065 bool trace_module_has_bad_taint(struct module *mod);
0066 extern int register_tracepoint_module_notifier(struct notifier_block *nb);
0067 extern int unregister_tracepoint_module_notifier(struct notifier_block *nb);
0068 #else
0069 static inline bool trace_module_has_bad_taint(struct module *mod)
0070 {
0071     return false;
0072 }
0073 static inline
0074 int register_tracepoint_module_notifier(struct notifier_block *nb)
0075 {
0076     return 0;
0077 }
0078 static inline
0079 int unregister_tracepoint_module_notifier(struct notifier_block *nb)
0080 {
0081     return 0;
0082 }
0083 #endif /* CONFIG_MODULES */
0084 
0085 /*
0086  * tracepoint_synchronize_unregister must be called between the last tracepoint
0087  * probe unregistration and the end of module exit to make sure there is no
0088  * caller executing a probe when it is freed.
0089  */
0090 #ifdef CONFIG_TRACEPOINTS
0091 static inline void tracepoint_synchronize_unregister(void)
0092 {
0093     synchronize_srcu(&tracepoint_srcu);
0094     synchronize_rcu();
0095 }
0096 #else
0097 static inline void tracepoint_synchronize_unregister(void)
0098 { }
0099 #endif
0100 
0101 #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
0102 extern int syscall_regfunc(void);
0103 extern void syscall_unregfunc(void);
0104 #endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */
0105 
0106 #ifndef PARAMS
0107 #define PARAMS(args...) args
0108 #endif
0109 
0110 #define TRACE_DEFINE_ENUM(x)
0111 #define TRACE_DEFINE_SIZEOF(x)
0112 
0113 #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
0114 static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
0115 {
0116     return offset_to_ptr(p);
0117 }
0118 
0119 #define __TRACEPOINT_ENTRY(name)                    \
0120     asm("   .section \"__tracepoints_ptrs\", \"a\"      \n" \
0121         "   .balign 4                   \n" \
0122         "   .long   __tracepoint_" #name " - .      \n" \
0123         "   .previous                   \n")
0124 #else
0125 static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
0126 {
0127     return *p;
0128 }
0129 
0130 #define __TRACEPOINT_ENTRY(name)                     \
0131     static tracepoint_ptr_t __tracepoint_ptr_##name __used       \
0132     __section("__tracepoints_ptrs") = &__tracepoint_##name
0133 #endif
0134 
0135 #endif /* _LINUX_TRACEPOINT_H */
0136 
0137 /*
0138  * Note: we keep the TRACE_EVENT and DECLARE_TRACE outside the include
0139  *  file ifdef protection.
0140  *  This is due to the way trace events work. If a file includes two
0141  *  trace event headers under one "CREATE_TRACE_POINTS" the first include
0142  *  will override the TRACE_EVENT and break the second include.
0143  */
0144 
0145 #ifndef DECLARE_TRACE
0146 
0147 #define TP_PROTO(args...)   args
0148 #define TP_ARGS(args...)    args
0149 #define TP_CONDITION(args...)   args
0150 
0151 /*
0152  * Individual subsystem my have a separate configuration to
0153  * enable their tracepoints. By default, this file will create
0154  * the tracepoints if CONFIG_TRACEPOINTS is defined. If a subsystem
0155  * wants to be able to disable its tracepoints from being created
0156  * it can define NOTRACE before including the tracepoint headers.
0157  */
0158 #if defined(CONFIG_TRACEPOINTS) && !defined(NOTRACE)
0159 #define TRACEPOINTS_ENABLED
0160 #endif
0161 
0162 #ifdef TRACEPOINTS_ENABLED
0163 
0164 #ifdef CONFIG_HAVE_STATIC_CALL
0165 #define __DO_TRACE_CALL(name, args)                 \
0166     do {                                \
0167         struct tracepoint_func *it_func_ptr;            \
0168         void *__data;                       \
0169         it_func_ptr =                       \
0170             rcu_dereference_raw((&__tracepoint_##name)->funcs); \
0171         if (it_func_ptr) {                  \
0172             __data = (it_func_ptr)->data;           \
0173             static_call(tp_func_##name)(__data, args);  \
0174         }                           \
0175     } while (0)
0176 #else
0177 #define __DO_TRACE_CALL(name, args) __traceiter_##name(NULL, args)
0178 #endif /* CONFIG_HAVE_STATIC_CALL */
0179 
0180 /*
0181  * it_func[0] is never NULL because there is at least one element in the array
0182  * when the array itself is non NULL.
0183  */
0184 #define __DO_TRACE(name, args, cond, rcuidle)               \
0185     do {                                \
0186         int __maybe_unused __idx = 0;               \
0187                                     \
0188         if (!(cond))                        \
0189             return;                     \
0190                                     \
0191         /* srcu can't be used from NMI */           \
0192         WARN_ON_ONCE(rcuidle && in_nmi());          \
0193                                     \
0194         /* keep srcu and sched-rcu usage consistent */      \
0195         preempt_disable_notrace();              \
0196                                     \
0197         /*                          \
0198          * For rcuidle callers, use srcu since sched-rcu    \
0199          * doesn't work from the idle path.         \
0200          */                         \
0201         if (rcuidle) {                      \
0202             __idx = srcu_read_lock_notrace(&tracepoint_srcu);\
0203             ct_irq_enter_irqson();              \
0204         }                           \
0205                                     \
0206         __DO_TRACE_CALL(name, TP_ARGS(args));           \
0207                                     \
0208         if (rcuidle) {                      \
0209             ct_irq_exit_irqson();               \
0210             srcu_read_unlock_notrace(&tracepoint_srcu, __idx);\
0211         }                           \
0212                                     \
0213         preempt_enable_notrace();               \
0214     } while (0)
0215 
0216 #ifndef MODULE
0217 #define __DECLARE_TRACE_RCU(name, proto, args, cond)            \
0218     static inline void trace_##name##_rcuidle(proto)        \
0219     {                               \
0220         if (static_key_false(&__tracepoint_##name.key))     \
0221             __DO_TRACE(name,                \
0222                 TP_ARGS(args),              \
0223                 TP_CONDITION(cond), 1);         \
0224     }
0225 #else
0226 #define __DECLARE_TRACE_RCU(name, proto, args, cond)
0227 #endif
0228 
0229 /*
0230  * Make sure the alignment of the structure in the __tracepoints section will
0231  * not add unwanted padding between the beginning of the section and the
0232  * structure. Force alignment to the same alignment as the section start.
0233  *
0234  * When lockdep is enabled, we make sure to always do the RCU portions of
0235  * the tracepoint code, regardless of whether tracing is on. However,
0236  * don't check if the condition is false, due to interaction with idle
0237  * instrumentation. This lets us find RCU issues triggered with tracepoints
0238  * even when this tracepoint is off. This code has no purpose other than
0239  * poking RCU a bit.
0240  */
0241 #define __DECLARE_TRACE(name, proto, args, cond, data_proto)        \
0242     extern int __traceiter_##name(data_proto);          \
0243     DECLARE_STATIC_CALL(tp_func_##name, __traceiter_##name);    \
0244     extern struct tracepoint __tracepoint_##name;           \
0245     static inline void trace_##name(proto)              \
0246     {                               \
0247         if (static_key_false(&__tracepoint_##name.key))     \
0248             __DO_TRACE(name,                \
0249                 TP_ARGS(args),              \
0250                 TP_CONDITION(cond), 0);         \
0251         if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) {     \
0252             rcu_read_lock_sched_notrace();          \
0253             rcu_dereference_sched(__tracepoint_##name.funcs);\
0254             rcu_read_unlock_sched_notrace();        \
0255         }                           \
0256     }                               \
0257     __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args),      \
0258                 PARAMS(cond))               \
0259     static inline int                       \
0260     register_trace_##name(void (*probe)(data_proto), void *data)    \
0261     {                               \
0262         return tracepoint_probe_register(&__tracepoint_##name,  \
0263                         (void *)probe, data);   \
0264     }                               \
0265     static inline int                       \
0266     register_trace_prio_##name(void (*probe)(data_proto), void *data,\
0267                    int prio)                \
0268     {                               \
0269         return tracepoint_probe_register_prio(&__tracepoint_##name, \
0270                           (void *)probe, data, prio); \
0271     }                               \
0272     static inline int                       \
0273     unregister_trace_##name(void (*probe)(data_proto), void *data)  \
0274     {                               \
0275         return tracepoint_probe_unregister(&__tracepoint_##name,\
0276                         (void *)probe, data);   \
0277     }                               \
0278     static inline void                      \
0279     check_trace_callback_type_##name(void (*cb)(data_proto))    \
0280     {                               \
0281     }                               \
0282     static inline bool                      \
0283     trace_##name##_enabled(void)                    \
0284     {                               \
0285         return static_key_false(&__tracepoint_##name.key);  \
0286     }
0287 
0288 /*
0289  * We have no guarantee that gcc and the linker won't up-align the tracepoint
0290  * structures, so we create an array of pointers that will be used for iteration
0291  * on the tracepoints.
0292  */
0293 #define DEFINE_TRACE_FN(_name, _reg, _unreg, proto, args)       \
0294     static const char __tpstrtab_##_name[]              \
0295     __section("__tracepoints_strings") = #_name;            \
0296     extern struct static_call_key STATIC_CALL_KEY(tp_func_##_name); \
0297     int __traceiter_##_name(void *__data, proto);           \
0298     struct tracepoint __tracepoint_##_name  __used          \
0299     __section("__tracepoints") = {                  \
0300         .name = __tpstrtab_##_name,             \
0301         .key = STATIC_KEY_INIT_FALSE,               \
0302         .static_call_key = &STATIC_CALL_KEY(tp_func_##_name),   \
0303         .static_call_tramp = STATIC_CALL_TRAMP_ADDR(tp_func_##_name), \
0304         .iterator = &__traceiter_##_name,           \
0305         .regfunc = _reg,                    \
0306         .unregfunc = _unreg,                    \
0307         .funcs = NULL };                    \
0308     __TRACEPOINT_ENTRY(_name);                  \
0309     int __traceiter_##_name(void *__data, proto)            \
0310     {                               \
0311         struct tracepoint_func *it_func_ptr;            \
0312         void *it_func;                      \
0313                                     \
0314         it_func_ptr =                       \
0315             rcu_dereference_raw((&__tracepoint_##_name)->funcs); \
0316         if (it_func_ptr) {                  \
0317             do {                        \
0318                 it_func = READ_ONCE((it_func_ptr)->func); \
0319                 __data = (it_func_ptr)->data;       \
0320                 ((void(*)(void *, proto))(it_func))(__data, args); \
0321             } while ((++it_func_ptr)->func);        \
0322         }                           \
0323         return 0;                       \
0324     }                               \
0325     DEFINE_STATIC_CALL(tp_func_##_name, __traceiter_##_name);
0326 
0327 #define DEFINE_TRACE(name, proto, args)     \
0328     DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto), PARAMS(args));
0329 
0330 #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)              \
0331     EXPORT_SYMBOL_GPL(__tracepoint_##name);             \
0332     EXPORT_SYMBOL_GPL(__traceiter_##name);              \
0333     EXPORT_STATIC_CALL_GPL(tp_func_##name)
0334 #define EXPORT_TRACEPOINT_SYMBOL(name)                  \
0335     EXPORT_SYMBOL(__tracepoint_##name);             \
0336     EXPORT_SYMBOL(__traceiter_##name);              \
0337     EXPORT_STATIC_CALL(tp_func_##name)
0338 
0339 
0340 #else /* !TRACEPOINTS_ENABLED */
0341 #define __DECLARE_TRACE(name, proto, args, cond, data_proto)        \
0342     static inline void trace_##name(proto)              \
0343     { }                             \
0344     static inline void trace_##name##_rcuidle(proto)        \
0345     { }                             \
0346     static inline int                       \
0347     register_trace_##name(void (*probe)(data_proto),        \
0348                   void *data)               \
0349     {                               \
0350         return -ENOSYS;                     \
0351     }                               \
0352     static inline int                       \
0353     unregister_trace_##name(void (*probe)(data_proto),      \
0354                 void *data)             \
0355     {                               \
0356         return -ENOSYS;                     \
0357     }                               \
0358     static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \
0359     {                               \
0360     }                               \
0361     static inline bool                      \
0362     trace_##name##_enabled(void)                    \
0363     {                               \
0364         return false;                       \
0365     }
0366 
0367 #define DEFINE_TRACE_FN(name, reg, unreg, proto, args)
0368 #define DEFINE_TRACE(name, proto, args)
0369 #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
0370 #define EXPORT_TRACEPOINT_SYMBOL(name)
0371 
0372 #endif /* TRACEPOINTS_ENABLED */
0373 
0374 #ifdef CONFIG_TRACING
0375 /**
0376  * tracepoint_string - register constant persistent string to trace system
0377  * @str - a constant persistent string that will be referenced in tracepoints
0378  *
0379  * If constant strings are being used in tracepoints, it is faster and
0380  * more efficient to just save the pointer to the string and reference
0381  * that with a printf "%s" instead of saving the string in the ring buffer
0382  * and wasting space and time.
0383  *
0384  * The problem with the above approach is that userspace tools that read
0385  * the binary output of the trace buffers do not have access to the string.
0386  * Instead they just show the address of the string which is not very
0387  * useful to users.
0388  *
0389  * With tracepoint_string(), the string will be registered to the tracing
0390  * system and exported to userspace via the debugfs/tracing/printk_formats
0391  * file that maps the string address to the string text. This way userspace
0392  * tools that read the binary buffers have a way to map the pointers to
0393  * the ASCII strings they represent.
0394  *
0395  * The @str used must be a constant string and persistent as it would not
0396  * make sense to show a string that no longer exists. But it is still fine
0397  * to be used with modules, because when modules are unloaded, if they
0398  * had tracepoints, the ring buffers are cleared too. As long as the string
0399  * does not change during the life of the module, it is fine to use
0400  * tracepoint_string() within a module.
0401  */
0402 #define tracepoint_string(str)                      \
0403     ({                              \
0404         static const char *___tp_str __tracepoint_string = str; \
0405         ___tp_str;                      \
0406     })
0407 #define __tracepoint_string __used __section("__tracepoint_str")
0408 #else
0409 /*
0410  * tracepoint_string() is used to save the string address for userspace
0411  * tracing tools. When tracing isn't configured, there's no need to save
0412  * anything.
0413  */
0414 # define tracepoint_string(str) str
0415 # define __tracepoint_string
0416 #endif
0417 
0418 #define DECLARE_TRACE(name, proto, args)                \
0419     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),      \
0420             cpu_online(raw_smp_processor_id()),     \
0421             PARAMS(void *__data, proto))
0422 
0423 #define DECLARE_TRACE_CONDITION(name, proto, args, cond)        \
0424     __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),      \
0425             cpu_online(raw_smp_processor_id()) && (PARAMS(cond)), \
0426             PARAMS(void *__data, proto))
0427 
0428 #define TRACE_EVENT_FLAGS(event, flag)
0429 
0430 #define TRACE_EVENT_PERF_PERM(event, expr...)
0431 
0432 #endif /* DECLARE_TRACE */
0433 
0434 #ifndef TRACE_EVENT
0435 /*
0436  * For use with the TRACE_EVENT macro:
0437  *
0438  * We define a tracepoint, its arguments, its printk format
0439  * and its 'fast binary record' layout.
0440  *
0441  * Firstly, name your tracepoint via TRACE_EVENT(name : the
0442  * 'subsystem_event' notation is fine.
0443  *
0444  * Think about this whole construct as the
0445  * 'trace_sched_switch() function' from now on.
0446  *
0447  *
0448  *  TRACE_EVENT(sched_switch,
0449  *
0450  *  *
0451  *  * A function has a regular function arguments
0452  *  * prototype, declare it via TP_PROTO():
0453  *  *
0454  *
0455  *  TP_PROTO(struct rq *rq, struct task_struct *prev,
0456  *       struct task_struct *next),
0457  *
0458  *  *
0459  *  * Define the call signature of the 'function'.
0460  *  * (Design sidenote: we use this instead of a
0461  *  *  TP_PROTO1/TP_PROTO2/TP_PROTO3 ugliness.)
0462  *  *
0463  *
0464  *  TP_ARGS(rq, prev, next),
0465  *
0466  *  *
0467  *  * Fast binary tracing: define the trace record via
0468  *  * TP_STRUCT__entry(). You can think about it like a
0469  *  * regular C structure local variable definition.
0470  *  *
0471  *  * This is how the trace record is structured and will
0472  *  * be saved into the ring buffer. These are the fields
0473  *  * that will be exposed to user-space in
0474  *  * /sys/kernel/debug/tracing/events/<*>/format.
0475  *  *
0476  *  * The declared 'local variable' is called '__entry'
0477  *  *
0478  *  * __field(pid_t, prev_pid) is equivalent to a standard declaration:
0479  *  *
0480  *  *   pid_t   prev_pid;
0481  *  *
0482  *  * __array(char, prev_comm, TASK_COMM_LEN) is equivalent to:
0483  *  *
0484  *  *   char    prev_comm[TASK_COMM_LEN];
0485  *  *
0486  *
0487  *  TP_STRUCT__entry(
0488  *      __array(    char,   prev_comm,  TASK_COMM_LEN   )
0489  *      __field(    pid_t,  prev_pid            )
0490  *      __field(    int,    prev_prio           )
0491  *      __array(    char,   next_comm,  TASK_COMM_LEN   )
0492  *      __field(    pid_t,  next_pid            )
0493  *      __field(    int,    next_prio           )
0494  *  ),
0495  *
0496  *  *
0497  *  * Assign the entry into the trace record, by embedding
0498  *  * a full C statement block into TP_fast_assign(). You
0499  *  * can refer to the trace record as '__entry' -
0500  *  * otherwise you can put arbitrary C code in here.
0501  *  *
0502  *  * Note: this C code will execute every time a trace event
0503  *  * happens, on an active tracepoint.
0504  *  *
0505  *
0506  *  TP_fast_assign(
0507  *      memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN);
0508  *      __entry->prev_pid   = prev->pid;
0509  *      __entry->prev_prio  = prev->prio;
0510  *      memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN);
0511  *      __entry->next_pid   = next->pid;
0512  *      __entry->next_prio  = next->prio;
0513  *  ),
0514  *
0515  *  *
0516  *  * Formatted output of a trace record via TP_printk().
0517  *  * This is how the tracepoint will appear under ftrace
0518  *  * plugins that make use of this tracepoint.
0519  *  *
0520  *  * (raw-binary tracing wont actually perform this step.)
0521  *  *
0522  *
0523  *  TP_printk("task %s:%d [%d] ==> %s:%d [%d]",
0524  *      __entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
0525  *      __entry->next_comm, __entry->next_pid, __entry->next_prio),
0526  *
0527  * );
0528  *
0529  * This macro construct is thus used for the regular printk format
0530  * tracing setup, it is used to construct a function pointer based
0531  * tracepoint callback (this is used by programmatic plugins and
0532  * can also by used by generic instrumentation like SystemTap), and
0533  * it is also used to expose a structured trace record in
0534  * /sys/kernel/debug/tracing/events/.
0535  *
0536  * A set of (un)registration functions can be passed to the variant
0537  * TRACE_EVENT_FN to perform any (un)registration work.
0538  */
0539 
0540 #define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
0541 #define DEFINE_EVENT(template, name, proto, args)       \
0542     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
0543 #define DEFINE_EVENT_FN(template, name, proto, args, reg, unreg)\
0544     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
0545 #define DEFINE_EVENT_PRINT(template, name, proto, args, print)  \
0546     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
0547 #define DEFINE_EVENT_CONDITION(template, name, proto,       \
0548                    args, cond)          \
0549     DECLARE_TRACE_CONDITION(name, PARAMS(proto),        \
0550                 PARAMS(args), PARAMS(cond))
0551 
0552 #define TRACE_EVENT(name, proto, args, struct, assign, print)   \
0553     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
0554 #define TRACE_EVENT_FN(name, proto, args, struct,       \
0555         assign, print, reg, unreg)          \
0556     DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
0557 #define TRACE_EVENT_FN_COND(name, proto, args, cond, struct,        \
0558         assign, print, reg, unreg)          \
0559     DECLARE_TRACE_CONDITION(name, PARAMS(proto),    \
0560             PARAMS(args), PARAMS(cond))
0561 #define TRACE_EVENT_CONDITION(name, proto, args, cond,      \
0562                   struct, assign, print)        \
0563     DECLARE_TRACE_CONDITION(name, PARAMS(proto),        \
0564                 PARAMS(args), PARAMS(cond))
0565 
0566 #define TRACE_EVENT_FLAGS(event, flag)
0567 
0568 #define TRACE_EVENT_PERF_PERM(event, expr...)
0569 
0570 #define DECLARE_EVENT_NOP(name, proto, args)                \
0571     static inline void trace_##name(proto)              \
0572     { }                             \
0573     static inline bool trace_##name##_enabled(void)         \
0574     {                               \
0575         return false;                       \
0576     }
0577 
0578 #define TRACE_EVENT_NOP(name, proto, args, struct, assign, print)   \
0579     DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
0580 
0581 #define DECLARE_EVENT_CLASS_NOP(name, proto, args, tstruct, assign, print)
0582 #define DEFINE_EVENT_NOP(template, name, proto, args)           \
0583     DECLARE_EVENT_NOP(name, PARAMS(proto), PARAMS(args))
0584 
0585 #endif /* ifdef TRACE_EVENT (see note above) */