DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Tomasz Duszynski <tduszynski@marvell.com>
Cc: david.marchand@redhat.com, bruce.richardson@intel.com,
	dev@dpdk.org, jerinj@marvell.com, mb@smartsharesystems.com
Subject: Re: [PATCH v7 7/8] trace: add PMU
Date: Mon, 21 Jul 2025 12:45:48 +0200	[thread overview]
Message-ID: <1859501.3VsfAaAtOV@thomas> (raw)
In-Reply-To: <20250721102457.2399936-1-tduszynski@marvell.com>

21/07/2025 12:24, Tomasz Duszynski:
> > On Fri, Jun 27, 2025 at 5:41 PM Tomasz Duszynski <tduszynski@marvell.com> wrote:
> > >
> > > In order to profile app, one needs to store significant amount of samples
> > > somewhere for an analysis later on.
> > > Since trace library supports storing data in a CTF format,
> > > lets take advantage of that and add a dedicated PMU tracepoint.
> > >
> > > Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
[...]
> > > --- a/lib/eal/common/eal_common_trace_points.c
> > > +++ b/lib/eal/common/eal_common_trace_points.c
> > > @@ -119,3 +119,23 @@ RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_enable,
> > >         lib.eal.intr.enable)
> > >  RTE_TRACE_POINT_REGISTER(rte_eal_trace_intr_disable,
> > >         lib.eal.intr.disable)
> > > +
> > > +#ifdef RTE_LIB_PMU
> > > +RTE_EXPORT_EXPERIMENTAL_SYMBOL(__rte_pmu_trace_read, 25.07)
> > > +RTE_TRACE_POINT_REGISTER(rte_pmu_trace_read,
> > > +       lib.pmu.read)
> > > +#endif
> > > +#ifdef RTE_EXEC_ENV_IS_WINDOWS
> > > +/* gen-version-map.py script generates export symbol maps by scanning source files without
> > > + * evaluating conditional compilation. Hence __rte_pmu_trace_read will be included the version map
> > > + * even if library is not compiled.
> > > + *
> > > + * On Windows if msvc linker is used this leads to a hard link error
> > > + * (LNK2001: unresolved external symbol) because msvc requires all symbols listed in the .def file
> > > + * to be present in the object files.
> > > + *
> > > + * Other linkers, e.g: gnu ld or mingw ld, are more forgiving. They silently ignore symbols listed
> > > + * in the map file if those symbols are not present in the binary.
> > > + */
> > > +rte_trace_point_t __rte_pmu_trace_read;
> > > +#endif
> >
> > From a quick look, could you export this symbol from the PMU library itself?
> 
> Got caught up, but here is my take. It would likely make trace a dependency, but I believe the
> dependency should be reversed. Also from my perspective this suggestion feels more like a
> refactoring.
> 
> So unless I've misunderstood your point, I'd rater keep the current solution as is.

I think you got it right: a refactoring looks beneficial.
Please think about it.



  reply	other threads:[~2025-07-21 10:45 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  6:53 [PATCH 0/6] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-16  6:53 ` [PATCH 1/6] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-16  6:53 ` [PATCH 2/6] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-16  6:53 ` [PATCH 3/6] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-16  7:03   ` Thomas Monjalon
2025-06-16  9:54     ` Tomasz Duszynski
2025-06-16  6:53 ` [PATCH 4/6] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-16  7:08   ` Thomas Monjalon
2025-06-16 10:53     ` Tomasz Duszynski
2025-06-16  6:53 ` [PATCH 5/6] test/pmu: enable fast test Tomasz Duszynski
2025-06-16  6:53 ` [PATCH 6/6] trace: add PMU Tomasz Duszynski
2025-06-16  7:13   ` Thomas Monjalon
2025-06-16  9:49     ` Tomasz Duszynski
2025-06-16 10:32       ` Bruce Richardson
2025-06-16 13:18       ` Morten Brørup
2025-06-18  6:56 ` [PATCH v2 0/6] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-18  6:56   ` [PATCH v2 1/6] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-18  6:56   ` [PATCH v2 2/6] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-18  6:56   ` [PATCH v2 3/6] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-18  6:56   ` [PATCH v2 4/6] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-18  6:56   ` [PATCH v2 5/6] test/pmu: enable fast test Tomasz Duszynski
2025-06-18  6:56   ` [PATCH v2 6/6] trace: add PMU Tomasz Duszynski
2025-06-18  7:16     ` Morten Brørup
2025-06-18  9:47       ` Thomas Monjalon
2025-06-18 10:28         ` Bruce Richardson
2025-06-18 11:30           ` Morten Brørup
2025-06-18 10:23       ` Tomasz Duszynski
2025-06-18 10:37         ` Morten Brørup
2025-06-20 12:05   ` [PATCH v3 0/7] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 1/7] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 2/7] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 3/7] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 4/7] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 5/7] test/pmu: enable fast test Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 6/7] trace: add PMU Tomasz Duszynski
2025-06-20 12:05     ` [PATCH v3 7/7] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-24 12:29     ` [PATCH v4 0/7] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 1/7] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 2/7] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 3/7] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 4/7] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 5/7] test/pmu: enable fast test Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 6/7] trace: add PMU Tomasz Duszynski
2025-06-24 12:29       ` [PATCH v4 7/7] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-25  4:47       ` [PATCH v5 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 6/8] test/pmu: enable fast test Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 7/8] trace: add PMU Tomasz Duszynski
2025-06-25  4:47         ` [PATCH v5 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-27 10:57         ` [PATCH v6 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 6/8] test/pmu: enable test Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 7/8] trace: add PMU Tomasz Duszynski
2025-06-27 10:57           ` [PATCH v6 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-27 15:40           ` [PATCH v7 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 6/8] test/pmu: enable test Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 7/8] trace: add PMU Tomasz Duszynski
2025-07-01 13:33               ` David Marchand
2025-07-21 10:24                 ` Tomasz Duszynski
2025-07-21 10:45                   ` Thomas Monjalon [this message]
2025-07-22 10:10                     ` Morten Brørup
2025-07-22 11:06                       ` Tomasz Duszynski
2025-06-27 15:41             ` [PATCH v7 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-07-22 12:00             ` [PATCH v8 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 6/8] test/pmu: enable test Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 7/8] trace: add PMU Tomasz Duszynski
2025-07-22 12:00               ` [PATCH v8 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski

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=1859501.3VsfAaAtOV@thomas \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mb@smartsharesystems.com \
    --cc=tduszynski@marvell.com \
    /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).