From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=Ln+YUzsmLMTlapkmpCML6twGPO5Zx3QQl4FTw0UTtVM=; b=iMPZ1pjizYv4hwjtc9+TzUFZw1dz98FJFoduso4PzWDEHlh8y7A3KC3UeG+pCwcY5n KP7VSsSqWU7u60Hdqy6fw8FfW8yoos+vFvhp77A8y+lh4v5fpOrhCsrTLyj5m8qzKiAG do5ux2TrAe5S9vHUPCPwRkqy6C5JYgZ/wvt24XjVSEajorcGPcGo/Qi5XAZtUbk/r/KC FKPblNvoTpvr2RvU43o8huMEdrWH6QumXzQxmeF0DCGwdnsyZlPRMpBQ5jQPLgKxamzQ smFUb3dxHkEpR9BYpR2+p5Jj8Pj7bOB+pgRciBgtnyBEvCsP7XY2Qix4KaPCkuLrq6uy A8iQ== X-Gm-Message-State: ALoCoQmgbC8Xr79Oj76f2gPsxEgFlVqEQ0EIpyXwSD5U8y6xELZyZkGnvhI5KBsCN73JguGTKlSU X-Received: by 10.194.118.167 with SMTP id kn7mr17306679wjb.113.1432701154514; Tue, 26 May 2015 21:32:34 -0700 (PDT) Received: from xps13.localnet (159.20.90.92.rev.sfr.net. [92.90.20.159]) by mx.google.com with ESMTPSA id n1sm1582259wix.0.2015.05.26.21.32.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2015 21:32:33 -0700 (PDT) From: Thomas Monjalon To: Stephen Hemminger Date: Wed, 27 May 2015 06:30:49 +0200 Message-ID: <3191422.fnlJdo9ilI@xps13> Organization: 6WIND User-Agent: KMail/4.14.7 (Linux/4.0.1-1-ARCH; KDE/4.14.7; x86_64; ; ) In-Reply-To: <20150526075719.24bed9cf@urahara> References: <1432647558-9062-1-git-send-email-maciejx.t.gajdzica@intel.com> <20150526075719.24bed9cf@urahara> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] pipeline: add statistics for librte_pipeline ports and tables X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2015 04:32:34 -0000 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.