trace: add size_t as generic trace point
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Tue, 25 Aug 2020 23:24:09 +0000 (04:54 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 7 Oct 2020 12:44:03 +0000 (14:44 +0200)
Add size_t as a generic trace point. Also, update
test_generic_trace_point() to validate size_t emitter.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Sunil Kumar Kori <skori@mavell.com>
app/test/test_trace.c
lib/librte_eal/common/eal_common_trace_points.c
lib/librte_eal/include/rte_eal_trace.h
lib/librte_eal/rte_eal_version.map

index ddcf416..0f9df83 100644 (file)
@@ -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;
index 292ec91..0b0b254 100644 (file)
@@ -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)
 
index 6b1a813..19df549 100644 (file)
@@ -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),
index c32461c..6165293 100644 (file)
@@ -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 {