summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@redhat.com>2019-08-12 09:02:28 +0200
committerDavid Marchand <david.marchand@redhat.com>2019-10-09 10:22:45 +0200
commit35860849cf13402cf4ed821f986f3f7720bf5046 (patch)
tree892f9ad4f85b0fbbb4e545c8fe1ef5501252f7ba
parent8ac3591694e105d47968f5f29b8c19511f21e41c (diff)
downloaddpdk-35860849cf13402cf4ed821f986f3f7720bf5046.zip
dpdk-35860849cf13402cf4ed821f986f3f7720bf5046.tar.gz
dpdk-35860849cf13402cf4ed821f986f3f7720bf5046.tar.xz
buildtools: make experimental symbol check lighter
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>
-rwxr-xr-xbuildtools/check-experimental-syms.sh15
1 files 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