5 #ifndef _RTE_TRACE_POINT_REGISTER_H_ 6 #define _RTE_TRACE_POINT_REGISTER_H_ 12 #ifdef _RTE_TRACE_POINT_H_ 13 #error for registration, include this file first before <rte_trace_point.h> 21 #define RTE_TRACE_POINT_REGISTER(trace, name) \ 22 rte_trace_point_t __rte_section("__rte_trace_point") __##trace; \ 23 static const char __##trace##_name[] = RTE_STR(name); \ 24 RTE_INIT(trace##_init) \ 26 __rte_trace_point_register(&__##trace, __##trace##_name, \ 27 (void (*)(void)) trace); \ 30 #define __rte_trace_point_emit_header_generic(t) \ 31 RTE_PER_LCORE(trace_point_sz) = __RTE_TRACE_EVENT_HEADER_SZ 33 #define __rte_trace_point_emit_header_fp(t) \ 34 __rte_trace_point_emit_header_generic(t) 36 #define __rte_trace_point_emit(in, type) \ 38 RTE_BUILD_BUG_ON(sizeof(type) != sizeof(typeof(in))); \ 39 __rte_trace_point_emit_field(sizeof(type), RTE_STR(in), \ 43 #define rte_trace_point_emit_string(in) \ 46 __rte_trace_point_emit_field(__RTE_TRACE_EMIT_STRING_LEN_MAX, \ 47 RTE_STR(in)"[32]", "string_bounded_t"); \ 50 #define rte_trace_point_emit_blob(in, len) \ 53 __rte_trace_point_emit(len, uint8_t); \ 54 __rte_trace_point_emit_field(RTE_TRACE_BLOB_LEN_MAX, \ 55 RTE_STR(in)"[" RTE_STR(RTE_TRACE_BLOB_LEN_MAX)"]", \ #define RTE_DECLARE_PER_LCORE(type, name)