* [dpdk-dev] [PATCH] devtools: fix tracepoint symbols check
@ 2020-04-24 10:53 Thomas Monjalon
2020-04-24 12:43 ` David Marchand
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2020-04-24 10:53 UTC (permalink / raw)
To: dev; +Cc: david.marchand, jerinj, skori
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.
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 <thomas@monjalon.net>
---
devtools/check-symbol-maps.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index e137d48a49..7fdfaa11c4 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -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
--
2.26.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: fix tracepoint symbols check
2020-04-24 10:53 [dpdk-dev] [PATCH] devtools: fix tracepoint symbols check Thomas Monjalon
@ 2020-04-24 12:43 ` David Marchand
2020-04-24 13:06 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2020-04-24 12:43 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Jerin Jacob Kollanukkaran, Sunil Kumar Kori
On Fri, Apr 24, 2020 at 12:53 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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.
per core or per_lcore_
>
> 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 <thomas@monjalon.net>
> ---
> devtools/check-symbol-maps.sh | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
> index e137d48a49..7fdfaa11c4 100755
> --- a/devtools/check-symbol-maps.sh
> +++ b/devtools/check-symbol-maps.sh
> @@ -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
> --
> 2.26.0
Sorry I missed this.
But on the plus side, we now validate per_lcore_ variables too :-).
Acked-by: David Marchand <david.marchand@redhat.com>
--
David Marchand
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] devtools: fix tracepoint symbols check
2020-04-24 12:43 ` David Marchand
@ 2020-04-24 13:06 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-04-24 13:06 UTC (permalink / raw)
To: David Marchand; +Cc: dev, Jerin Jacob Kollanukkaran, Sunil Kumar Kori
24/04/2020 14:43, David Marchand:
> On Fri, Apr 24, 2020 at 12:53 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 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.
>
> per core or per_lcore_
>
> >
> > 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 <thomas@monjalon.net>
>
> Acked-by: David Marchand <david.marchand@redhat.com>
Applied with updated explanations.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-24 13:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 10:53 [dpdk-dev] [PATCH] devtools: fix tracepoint symbols check Thomas Monjalon
2020-04-24 12:43 ` David Marchand
2020-04-24 13:06 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).