5 #ifndef _RTE_TRACE_POINT_REGISTER_H_
6 #define _RTE_TRACE_POINT_REGISTER_H_
8 #ifdef _RTE_TRACE_POINT_H_
9 #error for registration, include this file first before <rte_trace_point.h>
17 #define RTE_TRACE_POINT_REGISTER(trace, name) \
18 rte_trace_point_t __attribute__((section("__rte_trace_point"))) __##trace; \
19 RTE_INIT(trace##_init) \
21 __rte_trace_point_register(&__##trace, RTE_STR(name), \
22 (void (*)(void)) trace); \
25 #define __rte_trace_point_emit_header_generic(t) \
26 RTE_PER_LCORE(trace_point_sz) = __RTE_TRACE_EVENT_HEADER_SZ
28 #define __rte_trace_point_emit_header_fp(t) \
29 __rte_trace_point_emit_header_generic(t)
31 #define __rte_trace_point_emit(in, type) \
33 RTE_BUILD_BUG_ON(sizeof(type) != sizeof(typeof(in))); \
34 __rte_trace_point_emit_field(sizeof(type), RTE_STR(in), \
38 #define rte_trace_point_emit_string(in) \
41 __rte_trace_point_emit_field(__RTE_TRACE_EMIT_STRING_LEN_MAX, \
42 RTE_STR(in)"[32]", "string_bounded_t"); \
#define RTE_DECLARE_PER_LCORE(type, name)