On Mon, May 4, 2020 at 4:47 AM Jerin Jacob <jerinjac...@gmail.com> wrote: > > 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.
I am a bit skeptical. In terms of cycles and looking at __rte_trace_point_register() (which calls malloc), the cost of calling multiple constructors instead of one is negligible. -- David Marchand