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).