On Mon, Jun 29, 2020 at 10:59 AM Sunil Kumar Kori <sk...@marvell.com> wrote: > >diff --git a/lib/librte_eal/common/eal_common_thread.c > >b/lib/librte_eal/common/eal_common_thread.c > >index afb30236c5..3b30cc99d9 100644 > >--- a/lib/librte_eal/common/eal_common_thread.c > >+++ b/lib/librte_eal/common/eal_common_thread.c > >@@ -20,6 +20,7 @@ > > #include "eal_internal_cfg.h" > > #include "eal_private.h" > > #include "eal_thread.h" > >+#include "eal_trace.h" > > > > RTE_DEFINE_PER_LCORE(unsigned int, _lcore_id) = LCORE_ID_ANY; > >RTE_DEFINE_PER_LCORE(int, _thread_id) = -1; @@ -161,6 +162,14 @@ > >rte_thread_init(unsigned int lcore_id, rte_cpuset_t *cpuset) > > __rte_trace_mem_per_thread_alloc(); > > } > > > >+void > >+rte_thread_uninit(void) > >+{ > > Need to check whether trace is enabled or not similar to trace_mem_free().
The internal trace api abstracts this. It should be in the trace code itself, in the same way it is done for allocating the trace buffer. But is an additional check needed? The check on the trace buffer being initialised in __rte_trace_mem_per_thread_free should be enough. -- David Marchand