DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check
@ 2019-08-12  7:02 David Marchand
  2019-08-12 20:13 ` Neil Horman
  0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2019-08-12  7:02 UTC (permalink / raw)
  To: dev; +Cc: aconole, Neil Horman

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 <david.marchand@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check
  2019-08-12  7:02 [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check David Marchand
@ 2019-08-12 20:13 ` Neil Horman
  2019-08-13  6:32   ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Horman @ 2019-08-12 20:13 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, aconole

On Mon, Aug 12, 2019 at 09:02:28AM +0200, David Marchand wrote:
> 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 <david.marchand@redhat.com>
> ---
>  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
> +
When does this temporary file get deleted?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check
  2019-08-12 20:13 ` Neil Horman
@ 2019-08-13  6:32   ` David Marchand
  2019-08-14  0:09     ` Neil Horman
  0 siblings, 1 reply; 5+ messages in thread
From: David Marchand @ 2019-08-13  6:32 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev, Aaron Conole

On Mon, Aug 12, 2019 at 10:14 PM Neil Horman <nhorman@tuxdriver.com> wrote:
>
> On Mon, Aug 12, 2019 at 09:02:28AM +0200, David Marchand wrote:
> > 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 <david.marchand@redhat.com>
> > ---
> >  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

"If a sigspec is EXIT (0) the command arg is executed on exit from the shell."

> > +objdump -t $OBJFILE >$DUMPFILE
> > +
> When does this temporary file get deleted?

It should be enough?

-- 
David Marchand

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check
  2019-08-13  6:32   ` David Marchand
@ 2019-08-14  0:09     ` Neil Horman
  2019-10-09  8:11       ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Horman @ 2019-08-14  0:09 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Aaron Conole

On Tue, Aug 13, 2019 at 08:32:44AM +0200, David Marchand wrote:
> On Mon, Aug 12, 2019 at 10:14 PM Neil Horman <nhorman@tuxdriver.com> wrote:
> >
> > On Mon, Aug 12, 2019 at 09:02:28AM +0200, David Marchand wrote:
> > > 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 <david.marchand@redhat.com>
> > > ---
> > >  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
> 
> "If a sigspec is EXIT (0) the command arg is executed on exit from the shell."
> 
> > > +objdump -t $OBJFILE >$DUMPFILE
> > > +
> > When does this temporary file get deleted?
> 
> It should be enough?
> 
Yes, thank you, I missed that.

Acked-by: Neil Horman <nhorman@tuxdriver.com>

> -- 
> David Marchand
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check
  2019-08-14  0:09     ` Neil Horman
@ 2019-10-09  8:11       ` David Marchand
  0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2019-10-09  8:11 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Aaron Conole, Neil Horman

On Wed, Aug 14, 2019 at 2:09 AM Neil Horman <nhorman@tuxdriver.com> wrote:
> > > On Mon, Aug 12, 2019 at 09:02:28AM +0200, David Marchand wrote:
> > > > 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 <david.marchand@redhat.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
>

Applied.


--
David Marchand

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12  7:02 [dpdk-dev] [PATCH] buildtools: lighter experimental symbol check David Marchand
2019-08-12 20:13 ` Neil Horman
2019-08-13  6:32   ` David Marchand
2019-08-14  0:09     ` Neil Horman
2019-10-09  8:11       ` David Marchand

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox