From: Jerin Jacob <jerinjacobk@gmail.com>
To: David Marchand <david.marchand@redhat.com>
Cc: "Mattias Rönnblom" <hofors@lysator.liu.se>,
"Jerin Jacob" <jerinj@marvell.com>,
dev@dpdk.org, stable@dpdk.org,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: Re: [PATCH] eventdev: fix symbol export for port maintenance
Date: Thu, 12 Oct 2023 18:02:24 +0530 [thread overview]
Message-ID: <CALBAE1M2OKqJmMH3fD1JkKpePKgYJ5vWZ4E5fEHyJcFGDoMjow@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8xaauD6u8WYAyhmbg9NaY8gWZ7kLMyxWZPP3Luzwdpjqw@mail.gmail.com>
> > >
> > > I can't say I know why it's needed, but the change seems consistent with
> > > other Eventdev trace points.
> >
> > The trace point framework in DPDK relies on a per trace point global
> > variable (whose name is __<trace point name>):
> >
> > #define __RTE_TRACE_POINT(_mode, _tp, _args, ...) \
> > extern rte_trace_point_t __##_tp; \
> > static __rte_always_inline void \
> > _tp _args \
> > { \
> > __rte_trace_point_emit_header_##_mode(&__##_tp); \
> > __VA_ARGS__ \
> > }
> >
> > When tracepoints are called from within a shared library code, and
> > because all symbols of a group of objects are visible, the tracepoint
> > symbols are resolved by the linker.
> > But when this tracepoint is called via an inline helper from some code
> > out of the shared library, this symbol must be exported in the shared
> > library map or it won't be visible to "external" users.
>
> Could we describe / mention this in the trace point library doc?
> Or maybe I read too quickly and there is already something but it was
> not obvious to me.
Following text is available in
https://doc.dpdk.org/guides/prog_guide/trace_lib.html as NOTE.
We may need to update to very specific on FP trace points.
The RTE_TRACE_POINT_REGISTER defines the placeholder for the
rte_trace_point_t tracepoint object. For generic tracepoint or for
tracepoint used in public header files, the user must export a
__<trace_function_name> symbol in the library .map file for this
tracepoint to be used out of the library, in shared builds. For
example, __app_trace_string will be the exported symbol in the above
example.
>
>
> --
> David Marchand
>
next prev parent reply other threads:[~2023-10-12 12:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 14:00 David Marchand
2023-10-11 6:46 ` Mattias Rönnblom
2023-10-11 7:03 ` David Marchand
2023-10-11 7:21 ` David Marchand
2023-10-12 12:32 ` Jerin Jacob [this message]
2023-10-11 6:51 ` Jerin Jacob
2023-10-11 7:03 ` David Marchand
2023-10-11 12:11 ` David Marchand
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=CALBAE1M2OKqJmMH3fD1JkKpePKgYJ5vWZ4E5fEHyJcFGDoMjow@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hofors@lysator.liu.se \
--cc=jerinj@marvell.com \
--cc=mattias.ronnblom@ericsson.com \
--cc=stable@dpdk.org \
/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;
as well as URLs for NNTP newsgroup(s).