devtools: fix tracepoint symbols check
PATCH 1/1 devtools: fix tracepoint symbols check
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 without the generated prefix.
The same logic is applied to per-lcore variables, previously skipped.
--- devtools/check-symbol-maps.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
devtools/check-symbol-maps.sh +6 -2
@@ -12,10 +12,14 @@ 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 - continue + 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 $sym $(dirname $map) ; then + -w $symsrc $(dirname $map) ; then echo "$map: $sym" fi done
Signature · 1 line
2.26.0
Quoted 7 lines · Thomas Monjalon
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_POINTandRTE_TRACE_POINT_FPare checked without the generated prefix.The same logic is applied to per-lcore variables, previously skipped.
per core or per_lcore_
Quoted 39 lines
Fixes 6c232fc44c74 ("trace: add generic tracepoints")Fixes 4931010619fe ("trace: add alarm tracepoints")Fixes 52f409d614a0 ("trace: add memory tracepoints")Fixes 402321cfca9b ("trace: add memzone tracepoints")Fixes 0baa1e01c339 ("trace: add thread tracepoints")Fixes 05c4105738d8 ("trace: add interrupt tracepoints")Fixes 78d44153de8f ("ethdev: add tracepoints")Fixes 32e326869ed6 ("eventdev: add tracepoints")Fixes 4cf30e3f3c35 ("cryptodev: add tracepoints")Fixes 40b75c73d1c6 ("mempool: add tracepoints")Signed-off-by Thomas Monjalon <[email protected]>--- devtools/check-symbol-maps.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)devtools/check-symbol-maps.sh +6
-3@@ -12,10 +12,14 @@ 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 - continue + 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 $sym $(dirname $map) ; then + -w $symsrc $(dirname $map) ; then echo "$map: $sym" fi done --
Quoted 1 line
2.26.0
Sorry I missed this.
But on the plus side, we now validate per_lcore_ variables too :-).
Signature · 1 line
David Marchand
24/04/2020 14:43, David Marchand:
Quoted 23 lines · Thomas Monjalon
Quoted 7 lines
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_POINTandRTE_TRACE_POINT_FPare checked without the generated prefix.The same logic is applied to per-lcore variables, previously skipped.
per core or
per_lcore_Quoted 12 lines
Fixes 6c232fc44c74 ("trace: add generic tracepoints")Fixes 4931010619fe ("trace: add alarm tracepoints")Fixes 52f409d614a0 ("trace: add memory tracepoints")Fixes 402321cfca9b ("trace: add memzone tracepoints")Fixes 0baa1e01c339 ("trace: add thread tracepoints")Fixes 05c4105738d8 ("trace: add interrupt tracepoints")Fixes 78d44153de8f ("ethdev: add tracepoints")Fixes 32e326869ed6 ("eventdev: add tracepoints")Fixes 4cf30e3f3c35 ("cryptodev: add tracepoints")Fixes 40b75c73d1c6 ("mempool: add tracepoints")
Quoted 3 lines
Quoted 1 line
Signed-off-by Thomas Monjalon <[email protected]>Acked-by David Marchand <[email protected]>
Applied with updated explanations.