From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 0BDEA16E for ; Mon, 28 May 2018 15:17:13 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2018 06:17:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,452,1520924400"; d="scan'208";a="45381501" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.55]) by orsmga006.jf.intel.com with SMTP; 28 May 2018 06:17:10 -0700 Received: by (sSMTP sendmail emulation); Mon, 28 May 2018 14:17:09 +0100 Date: Mon, 28 May 2018 14:17:08 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: Pavan Nikhilesh , dev@dpdk.org, Ferruh Yigit Message-ID: <20180528131708.GA8752@bricha3-MOBL.ger.corp.intel.com> References: <20180212161312.31795-1-pbhagavatula@caviumnetworks.com> <4156041.IfarTdeXU8@xps> <20180528091941.GA15204@bricha3-MOBL.ger.corp.intel.com> <3042130.2JFbLzL6mQ@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3042130.2JFbLzL6mQ@xps> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH] devtools: add script to verify map files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2018 13:17:14 -0000 On Mon, May 28, 2018 at 11:31:31AM +0200, Thomas Monjalon wrote: > 28/05/2018 11:21, Bruce Richardson: > > On Sun, May 27, 2018 at 10:50:58PM +0200, Thomas Monjalon wrote: > > > Sorry for having missed this patch during so long. > > > > > > 13/02/2018 11:48, Ferruh Yigit: > > > > On 2/12/2018 4:13 PM, Pavan Nikhilesh wrote: > > > > > This script checks for the symbols specified in the map files against > > > > > the symbols present in the map file directory. > > > > > Currently, the script checks for map files in drivers and lib directory. > > > > > > > > > > Example: > > > > > ./devtools/check-map.py > > > > > > > > > > The following symbols are unused : > > > > > > > > > > Map file : /home/pavan/Work/clean/dpdk/drivers/mempool/dpaa/... > > > > > ['rte_dpaa_pool_table'] > > > > > > > > > > Map file : /home/pavan/Work/clean/dpdk/drivers/bus/fslmc/... > > > > > ['qbman_get_version', 'qbman_swp_send_multiple'] > > > > > > > > > > ... > > > > > > > > > > Signed-off-by: Pavan Nikhilesh > > > > > > > > +1 to improve our tools. > > > > > > > > Acked-by: Ferruh Yigit > > > > > > I agree we must have more tools. > > > > > > I think this check can be a lot simpler as a shell script, > > > instead of Python. It does not need the list features of Python. > > > > > > > While the shell version can be shorter, I always find python scripts to be > > far easier to read, understand and therefore maintain than shell scripts. > > While power-users of shell, like yourself, Thomas, can come up with some > > amazing stuff done in shell, it tends to make them very hard to follow for > > us mere mortals. > > Some processing are simpler in Python. > But here, the python script is mostly calling some shell commands and > filtering like grep. > > For comparison, python version: > http://dpdk.org/ml/archives/dev/2018-February/090772.html > shell version: > http://dpdk.org/ml/archives/dev/2018-May/102993.html > Well, the python script does have a call to grep in it, true. I'm not going to have a problem either way, the python version still reads a little easier, but the shell version is shorter and looks more natural, I suppose. I'm happy enough to go along with whatever others (who may care) think. /Bruce