From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3] pipeline: add statistics for librte_pipeline ports and tables Date: Tue, 26 May 2015 07:57:19 -0700 Message-ID: <20150526075719.24bed9cf@urahara> References: <1432647558-9062-1-git-send-email-maciejx.t.gajdzica@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Maciej Gajdzica Return-path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id E40499A92 for ; Tue, 26 May 2015 16:57:17 +0200 (CEST) Received: by padbw4 with SMTP id bw4so94644785pad.0 for ; Tue, 26 May 2015 07:57:17 -0700 (PDT) In-Reply-To: <1432647558-9062-1-git-send-email-maciejx.t.gajdzica@intel.com> 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" 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).