-#define TRACE_EVENT_LIB \
- extern struct trace_event * const __start___trace_events_ptrs[] \
- __attribute__((weak, visibility("hidden"))); \
- extern struct trace_event * const __stop___trace_events_ptrs[] \
- __attribute__((weak, visibility("hidden"))); \
- static void __attribute__((constructor)) \
- __trace_events__init(void) \
- { \
- trace_event_register_lib(__start___trace_events_ptrs, \
- __stop___trace_events_ptrs - \
- __start___trace_events_ptrs); \
- } \
- \
- static void __attribute__((destructor)) \
- __trace_event__destroy(void) \
- { \
- trace_event_unregister_lib(__start___trace_events_ptrs);\
- }
-
-#define DECLARE_TRACE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
-#define DEFINE_TRACE_EVENT(template, name, proto, args) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
-#define DEFINE_TRACE_EVENT_PRINT(template, name, proto, args, print) \
- DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
+/*
+ * Tracepoint Loglevel Declaration Facility
+ *
+ * This is a place-holder the tracepoint loglevel declaration,
+ * overridden by the tracer implementation.
+ *
+ * Typical use of these loglevels:
+ *
+ * 1) Declare the mapping between loglevel names and an integer values
+ * within TRACEPOINT_LOGLEVEL_ENUM, using TP_LOGLEVEL for each tuple.
+ * Do _NOT_ add comma (,) nor semicolon (;) between the
+ * TRACEPOINT_LOGLEVEL_ENUM entries. Do _NOT_ add comma (,) nor
+ * semicolon (;) after the TRACEPOINT_LOGLEVEL_ENUM declaration. The
+ * name should be a proper C99 identifier.
+ *
+ * TRACEPOINT_LOGLEVEL_ENUM(
+ * TP_LOGLEVEL( < loglevel_name >, < value > )
+ * TP_LOGLEVEL( < loglevel_name >, < value > )
+ * ...
+ * )
+ *
+ * e.g.:
+ *
+ * TRACEPOINT_LOGLEVEL_ENUM(
+ * TP_LOGLEVEL(LOG_EMERG, 0)
+ * TP_LOGLEVEL(LOG_ALERT, 1)
+ * TP_LOGLEVEL(LOG_CRIT, 2)
+ * TP_LOGLEVEL(LOG_ERR, 3)
+ * TP_LOGLEVEL(LOG_WARNING, 4)
+ * TP_LOGLEVEL(LOG_NOTICE, 5)
+ * TP_LOGLEVEL(LOG_INFO, 6)
+ * TP_LOGLEVEL(LOG_DEBUG, 7)
+ * )
+ *
+ * 2) Then, declare tracepoint loglevels for tracepoints. A
+ * TRACEPOINT_EVENT should be declared prior to the the
+ * TRACEPOINT_LOGLEVEL for a given tracepoint name. The first field
+ * is the name of the tracepoint, the second field is the loglevel
+ * name.
+ *
+ * TRACEPOINT_LOGLEVEL(< [com_company_]project_[component_]event >,
+ * < loglevel_name >)
+ *
+ * The TRACEPOINT_SYSTEM must be defined when declaring a
+ * TRACEPOINT_LOGLEVEL_ENUM and TRACEPOINT_LOGLEVEL. The tracepoint
+ * loglevel enumeration apply to the entire TRACEPOINT_SYSTEM. Only one
+ * tracepoint loglevel enumeration should be declared per tracepoint
+ * system.
+ */