2015-05-26 07:57, Stephen Hemminger: > On Tue, 26 May 2015 15:39:18 +0200 > Maciej Gajdzica <maciejx.t.gajdzica at intel.com> wrote: > > > +#if RTE_LOG_LEVEL == RTE_LOG_DEBUG > > +#define RTE_PIPELINE_STATS_ADD(counter, val) \ > > + ({ (counter) += (val); }) > > + > > +#define RTE_PIPELINE_STATS_ADD_M(counter, mask) \ > > + ({ (counter) += __builtin_popcountll(mask); }) > > +#else > > +#define RTE_PIPELINE_STATS_ADD(counter, val) > > +#define RTE_PIPELINE_STATS_ADD_M(counter, mask) > > +#endif > > This is worse idea than the previous one. > I want statistics done on a per lcore basis, and always available > because real users on production system want statistics (but they > don't want log spam).
If they don't want log spam, they will increase log level with the option --log-level. By the way, maybe that RTE_LOG_INFO would be more appropriate for these statistics in order to build them without having debug checks in drivers.