From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 03 Oct 2016 08:27:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,438,1473145200"; d="scan'208";a="16176782" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 03 Oct 2016 08:27:57 -0700 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 3 Oct 2016 08:27:57 -0700 Received: from fmsmsx114.amr.corp.intel.com ([169.254.6.222]) by fmsmsx158.amr.corp.intel.com ([169.254.15.158]) with mapi id 14.03.0248.002; Mon, 3 Oct 2016 08:27:57 -0700 From: "Wiles, Keith" To: Olivier Matz CC: Thomas Monjalon , "dev@dpdk.org" , "david.marchand@6wind.com" Thread-Topic: [dpdk-dev] [PATCH] log: do not drop debug logs at compile time Thread-Index: AQHSD+4sqGLXH6F1Bkisr12qzYWg4qCSUNQAgABowoCABKooAIAAByuA 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> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.230.84] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] log: do not drop debug logs at compile time 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: Mon, 03 Oct 2016 15:27:59 -0000 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