From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wiles, Keith" Subject: Re: [PATCH] log: do not drop debug logs at compile time Date: Mon, 3 Oct 2016 15:27:56 +0000 Message-ID: References: <1474011832-29987-1-git-send-email-olivier.matz@6wind.com> <2969629.OOuc7vtRSA@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , "dev@dpdk.org" , "david.marchand@6wind.com" To: Olivier Matz Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C52685922 for ; Mon, 3 Oct 2016 17:27:58 +0200 (CEST) In-Reply-To: Content-Language: en-US Content-ID: 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" Regards, Keith > On Oct 3, 2016, at 10:02 AM, Olivier Matz wrote: >=20 > Hi Keith, >=20 > On 09/30/2016 05:48 PM, Wiles, Keith wrote: >>> On Sep 30, 2016, at 4:33 AM, Thomas Monjalon wrote: >>>=20 >>> 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=3D8. >>>>=20 >>>> The rationale was to remove debug logs from the data path at >>>> compile-time, avoiding a test at run-time. >>>>=20 >>>> 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. >>>>=20 >>>> So it is now possible to enable debug logs at run-time by just >>>> specifying --log-level=3D8. Some drivers still have special compile-ti= me >>>> options to enable more debug log. Maintainers may consider to >>>> remove/reduce them. >>>>=20 >>>> Signed-off-by: Olivier Matz >>>=20 >>> I think it is a good change. >>> However I'm not sure we should take it for 16.11 as it was sent late an= d >>> 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. >>=20 >> Would this be easier to add a new LOG level instead say DEBUG_DATAPATH a= nd then change the RTE_LOG to exclude the new log level? >>=20 >>=20 >=20 > The log levels are quite standard, I don't feel it would be very clear > to have a new level for that. It would also prevent to have different > log level inside data path. I am not following you here. Having one more log level for DEBUG in the dat= a path is not a big change and you can still have any other log level in th= e data or anyplace else for that matter. >=20 > Regards, > Olivier