From ca32fa67a7f2f7b54e57b2a0772ceacafb6db56f Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Wed, 26 Aug 2020 04:54:09 +0530 Subject: [PATCH] trace: add size_t as generic trace point Add size_t as a generic trace point. Also, update test_generic_trace_point() to validate size_t emitter. Signed-off-by: Pavan Nikhilesh Acked-by: Sunil Kumar Kori --- app/test/test_trace.c | 1 + lib/librte_eal/common/eal_common_trace_points.c | 2 ++ lib/librte_eal/include/rte_eal_trace.h | 6 ++++++ lib/librte_eal/rte_eal_version.map | 3 +++ 4 files changed, 12 insertions(+) diff --git a/app/test/test_trace.c b/app/test/test_trace.c index ddcf416b27..0f9df83c40 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -166,6 +166,7 @@ test_generic_trace_points(void) rte_eal_trace_generic_double(20000.5000004); rte_eal_trace_generic_ptr(&tmp); rte_eal_trace_generic_str("my string"); + rte_eal_trace_generic_size_t(sizeof(void *)); RTE_EAL_TRACE_GENERIC_FUNC; return TEST_SUCCESS; diff --git a/lib/librte_eal/common/eal_common_trace_points.c b/lib/librte_eal/common/eal_common_trace_points.c index 292ec91bed..0b0b254615 100644 --- a/lib/librte_eal/common/eal_common_trace_points.c +++ b/lib/librte_eal/common/eal_common_trace_points.c @@ -36,6 +36,8 @@ RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_ptr, lib.eal.generic.ptr) RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_str, lib.eal.generic.string) +RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_size_t, + lib.eal.generic.size_t) RTE_TRACE_POINT_REGISTER(rte_eal_trace_generic_func, lib.eal.generic.func) diff --git a/lib/librte_eal/include/rte_eal_trace.h b/lib/librte_eal/include/rte_eal_trace.h index 6b1a813c7b..19df549d29 100644 --- a/lib/librte_eal/include/rte_eal_trace.h +++ b/lib/librte_eal/include/rte_eal_trace.h @@ -129,6 +129,12 @@ RTE_TRACE_POINT( rte_trace_point_emit_string(str); ) +RTE_TRACE_POINT( + rte_eal_trace_generic_size_t, + RTE_TRACE_POINT_ARGS(size_t sz), + rte_trace_point_emit_size_t(sz); +) + RTE_TRACE_POINT( rte_eal_trace_generic_func, RTE_TRACE_POINT_ARGS(const char *func), diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index c32461c663..6165293b69 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -397,6 +397,9 @@ EXPERIMENTAL { rte_service_lcore_may_be_active; rte_thread_register; rte_thread_unregister; + + # added in 20.11 + __rte_eal_trace_generic_size_t; }; INTERNAL { -- 2.20.1