On Fri, Oct 25, 2024 at 2:25 PM Tomasz Duszynski <tduszyn...@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 <tduszyn...@marvell.com>
--------------START------------------------- > diff --git a/lib/eal/common/eal_common_trace_points.c > b/lib/eal/common/eal_common_trace_points.c > index 0f1240ea3a..c99eab92f4 100644 > --- a/lib/eal/common/eal_common_trace_points.c > +++ b/lib/eal/common/eal_common_trace_points.c > @@ -100,3 +100,8 @@ 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_TRACE_POINT_REGISTER(rte_eal_trace_pmu_read, > + lib.eal.pmu.read) > +#endif > > #define RTE_EAL_TRACE_GENERIC_FUNC rte_eal_trace_generic_func(__func__) > > +#ifdef RTE_LIB_PMU > +#include <rte_pmu.h> > + > +RTE_TRACE_POINT_FP( > + rte_eal_trace_pmu_read, > + RTE_TRACE_POINT_ARGS(unsigned int index), > + uint64_t val = rte_pmu_read(index); > + rte_trace_point_emit_u64(val); > +) > +#endif > + --------------END------------------------- All of the above changes can go to lib/pmu. Right? Like ethdev is adding its trace points in ethdev library? and make trace point name as rte_pmu_trace_read