From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CFC0FA0471 for ; Mon, 12 Aug 2019 09:02:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9811E2C55; Mon, 12 Aug 2019 09:02:40 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 980642C5 for ; Mon, 12 Aug 2019 09:02:38 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16745301D671; Mon, 12 Aug 2019 07:02:38 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-204-32.brq.redhat.com [10.40.204.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id AD8C06012D; Mon, 12 Aug 2019 07:02:35 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: aconole@redhat.com, Neil Horman Date: Mon, 12 Aug 2019 09:02:28 +0200 Message-Id: <1565593348-6431-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 12 Aug 2019 07:02:38 +0000 (UTC) Subject: [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Dumping every object file for every symbol is too heavy. Use a temporary storage. Before: $ rm -rf master && make defconfig O=master $ time make EXTRA_CFLAGS=-g O=master [...] real 2m24.063s user 1m16.985s sys 1m46.372s After: $ rm -rf master && make defconfig O=master $ time make EXTRA_CFLAGS=-g O=master [...] real 1m37.110s user 0m49.417s sys 0m51.803s Signed-off-by: David Marchand --- buildtools/check-experimental-syms.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh index 0f6c62d..47a06fc 100755 --- a/buildtools/check-experimental-syms.sh +++ b/buildtools/check-experimental-syms.sh @@ -18,14 +18,15 @@ then exit 0 fi +DUMPFILE=$(mktemp -t dpdk.${0##*/}.XXX.objdump) +trap 'rm -f "$DUMPFILE"' EXIT +objdump -t $OBJFILE >$DUMPFILE + ret=0 for SYM in `$LIST_SYMBOL -S EXPERIMENTAL $MAPFILE` do - objdump -t $OBJFILE | grep -q "\.text.*$SYM$" - IN_TEXT=$? - objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM$" - IN_EXP=$? - if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ] + if grep -q "\.text.*$SYM$" $DUMPFILE && + ! grep -q "\.text\.experimental.*$SYM$" $DUMPFILE then cat >&2 <<- END_OF_MESSAGE $SYM is not flagged as experimental @@ -37,11 +38,11 @@ do done # Filter out symbols suffixed with a . for icc -for SYM in `objdump -t $OBJFILE |awk '{ +for SYM in `awk '{ if ($2 != "l" && $4 == ".text.experimental" && !($NF ~ /\.$/)) { print $NF } -}'` +}' $DUMPFILE` do $LIST_SYMBOL -S EXPERIMENTAL -s $SYM -q $MAPFILE || { cat >&2 <<- END_OF_MESSAGE -- 1.8.3.1