1 #ifndef __TOOLS_LINUX_TRACEPOINT_H
2 #define __TOOLS_LINUX_TRACEPOINT_H
4 #define PARAMS(args...) args
6 #define TP_PROTO(args...) args
7 #define TP_ARGS(args...) args
8 #define TP_CONDITION(args...) args
10 #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \
11 static inline void trace_##name(proto) \
13 static inline void trace_##name##_rcuidle(proto) \
16 register_trace_##name(void (*probe)(data_proto), \
22 unregister_trace_##name(void (*probe)(data_proto), \
27 static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \
31 trace_##name##_enabled(void) \
36 #define DEFINE_TRACE_FN(name, reg, unreg)
37 #define DEFINE_TRACE(name)
38 #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
39 #define EXPORT_TRACEPOINT_SYMBOL(name)
41 #define DECLARE_TRACE_NOARGS(name) \
42 __DECLARE_TRACE(name, void, , \
43 cpu_online(raw_smp_processor_id()), \
46 #define DECLARE_TRACE(name, proto, args) \
47 __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
48 cpu_online(raw_smp_processor_id()), \
49 PARAMS(void *__data, proto), \
52 #define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
53 #define DEFINE_EVENT(template, name, proto, args) \
54 DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
55 #define DEFINE_EVENT_FN(template, name, proto, args, reg, unreg)\
56 DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
57 #define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
58 DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
59 #define TRACE_EVENT(name, proto, args, struct, assign, print) \
60 DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
62 #endif /* __TOOLS_LINUX_TRACEPOINT_H */