From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] log: do not drop debug logs at compile time Date: Fri, 30 Sep 2016 11:33:16 +0200 Message-ID: <2969629.OOuc7vtRSA@xps13> References: <1474011832-29987-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Olivier Matz , david.marchand@6wind.com To: dev@dpdk.org Return-path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 65ED829CD for ; Fri, 30 Sep 2016 11:33:18 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id b80so32400901wme.0 for ; Fri, 30 Sep 2016 02:33:18 -0700 (PDT) In-Reply-To: <1474011832-29987-1-git-send-email-olivier.matz@6wind.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" 2016-09-16 09:43, Olivier Matz: > Today, all logs whose level is lower than INFO are dropped at > compile-time. This prevents from enabling debug logs at runtime using > --log-level=8. > > The rationale was to remove debug logs from the data path at > compile-time, avoiding a test at run-time. > > This patch changes the behavior of RTE_LOG() to avoid the compile-time > optimization, and introduces the RTE_LOG_DP() macro that has the same > behavior than the previous RTE_LOG(), for the rare cases where debug > logs are in the data path. > > So it is now possible to enable debug logs at run-time by just > specifying --log-level=8. Some drivers still have special compile-time > options to enable more debug log. Maintainers may consider to > remove/reduce them. > > Signed-off-by: Olivier Matz I think it is a good change. However I'm not sure we should take it for 16.11 as it was sent late and there is no review comment. It is neither really a fix nor really a feature. If there are some +1, and no opinions against, it will go in 16.11. Note that some drivers would need some changes to fully benefit of debug logs enabled at run-time.