From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3] pipeline: add statistics for librte_pipeline ports and tables Date: Wed, 27 May 2015 06:30:49 +0200 Message-ID: <3191422.fnlJdo9ilI@xps13> References: <1432647558-9062-1-git-send-email-maciejx.t.gajdzica@intel.com> <20150526075719.24bed9cf@urahara> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Stephen Hemminger Return-path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 9EBF4DE6 for ; Wed, 27 May 2015 06:32:34 +0200 (CEST) Received: by wicmx19 with SMTP id mx19so97513400wic.0 for ; Tue, 26 May 2015 21:32:34 -0700 (PDT) In-Reply-To: <20150526075719.24bed9cf@urahara> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-05-26 07:57, Stephen Hemminger: > On Tue, 26 May 2015 15:39:18 +0200 > Maciej Gajdzica 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.