Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "yann.morin@orange.com" <yann.morin@orange.com>,
	"buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH] support/scripts/check-host-libs: add new check on host binaries/libs
Date: Wed, 21 Sep 2022 11:05:00 +0200	[thread overview]
Message-ID: <20220921110500.5128d0b9@windsurf> (raw)
In-Reply-To: <9ce68f90a18642ad96e8010fd87dd15f@AcuMS.aculab.com>

Hello,

On Wed, 21 Sep 2022 08:23:54 +0000
David Laight <David.Laight@ACULAB.COM> wrote:

> Think a bit further and you can remove the exec of cmp, eg:
> 
> $ time find /usr/lib -type f | (ELF="$(printf '\x7f\x45\x4c\x46')"; while read f; do read l <"$f" && [ "${l#$ELF}" != "$l" ] && echo $f; done )| wc -l

Thanks for the input and proposal. Isn't read l <"$f" going to read
each file entirely in memory?

> That takes a few seconds on my system.

On my system, your command took 19 seconds. When doing this kind of
test, make sure to drop the contents of the page cache first by doing:

echo 3 > /proc/sys/vm/drop_caches

Before each experiment. On my machine, with the page cache contents
dropped, it takes 19-20 seconds to run your command the first time.
Subsequent runs only last 12 seconds.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-09-21  9:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20  6:45 [Buildroot] [PATCH] support/scripts/check-host-libs: add new check on host binaries/libs Thomas Petazzoni
2022-09-20  7:46 ` yann.morin
2022-09-20  8:35   ` Thomas Petazzoni
2022-09-20  9:11     ` yann.morin
2022-09-20  9:19       ` Thomas Petazzoni via buildroot
2022-09-20  9:40         ` yann.morin
2022-09-20  9:54           ` Thomas Petazzoni
2022-09-20 19:48             ` Arnout Vandecappelle
2022-09-21  7:26               ` yann.morin
2022-09-21  8:23               ` David Laight
2022-09-21  8:41                 ` yann.morin
2022-09-21  9:05                 ` Thomas Petazzoni via buildroot [this message]
2022-09-21  9:09                   ` yann.morin
2022-09-21  9:24                   ` David Laight
2023-04-16 20:10 ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220921110500.5128d0b9@windsurf \
    --to=buildroot@buildroot.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin@orange.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox