On Mon, May 4, 2020 at 2:02 AM David Marchand <david.march...@redhat.com> wrote: > > RTE_TRACE_POINT_DEFINE and RTE_TRACE_POINT_REGISTER must come in pairs. > Merge them and let RTE_TRACE_POINT_REGISTER handle the constructor part.
Initially, I thought of doing the same. But, later I realized that this largely grows the number of constructors been called. I had concerns about the boot time of the application and/or loading the shared library, that the reason why spitting as two so that constructor registers a burst of traces like rte_log. > > Signed-off-by: David Marchand <david.march...@redhat.com> > --- > app/test/test_trace_register.c | 12 +- > doc/guides/prog_guide/trace_lib.rst | 12 +- > lib/librte_cryptodev/cryptodev_trace_points.c | 84 +++---- > .../common/eal_common_trace_points.c | 164 ++++++-------- > lib/librte_eal/include/rte_eal_trace.h | 122 +++++------ > lib/librte_eal/include/rte_trace_point.h | 14 +- > .../include/rte_trace_point_register.h | 6 +- > lib/librte_ethdev/ethdev_trace_points.c | 44 ++-- > lib/librte_eventdev/eventdev_trace_points.c | 205 +++++++----------- > lib/librte_mempool/mempool_trace_points.c | 124 ++++------- > 10 files changed, 309 insertions(+), 478 deletions(-)