7b63fb3b84
The tracepoint symbols __rte_*_trace_* are defined via a macro, adding prefix "__", so they cannot be found by map checker. Those symbols defined by RTE_TRACE_POINT and RTE_TRACE_POINT_FP are checked in source code without the generated prefix. The same logic is applied to per core variables, previously skipped. Fixes:6c232fc44c
("trace: add generic tracepoints") Fixes:4931010619
("trace: add alarm tracepoints") Fixes:52f409d614
("trace: add memory tracepoints") Fixes:402321cfca
("trace: add memzone tracepoints") Fixes:0baa1e01c3
("trace: add thread tracepoints") Fixes:05c4105738
("trace: add interrupt tracepoints") Fixes:78d44153de
("ethdev: add tracepoints") Fixes:32e326869e
("eventdev: add tracepoints") Fixes:4cf30e3f3c
("cryptodev: add tracepoints") Fixes:40b75c73d1
("mempool: add tracepoints") Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com>
35 lines
927 B
Bash
Executable File
35 lines
927 B
Bash
Executable File
#! /bin/sh -e
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright 2018 Mellanox Technologies, Ltd
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
# speed up by ignoring Unicode details
|
|
export LC_ALL=C
|
|
|
|
find_orphan_symbols ()
|
|
{
|
|
for map in $(find lib drivers -name '*.map') ; do
|
|
for sym in $(sed -rn 's,^([^}]*_.*);,\1,p' $map) ; do
|
|
if echo $sym | grep -q '^per_lcore_' ; then
|
|
symsrc=${sym#per_lcore_}
|
|
elif echo $sym | grep -q '^__rte_.*_trace_' ; then
|
|
symsrc=${sym#__}
|
|
else
|
|
symsrc=$sym
|
|
fi
|
|
if ! grep -q -r --exclude=$(basename $map) \
|
|
-w $symsrc $(dirname $map) ; then
|
|
echo "$map: $sym"
|
|
fi
|
|
done
|
|
done
|
|
}
|
|
|
|
orphan_symbols=$(find_orphan_symbols)
|
|
if [ -n "$orphan_symbols" ] ; then
|
|
echo "Found only in symbol map file:"
|
|
echo "$orphan_symbols" | sed 's,^,\t,'
|
|
exit 1
|
|
fi
|