Re: [PATCH v3 1/8] media: hantro: Trace hevc hw cycles performance register

From: Ezequiel Garcia
Date: Tue Jun 22 2021 - 08:49:16 EST


On Tue, 2021-06-22 at 14:23 +0200, Benjamin Gaignard wrote:
[..]
> > > +
> > > +TRACE_EVENT(hantro_hevc_perf,
> > > +       TP_PROTO(struct hantro_ctx *ctx, u32 hw_cycles),
> > > +
> > > +       TP_ARGS(ctx, hw_cycles),
> > > +
> > > +       TP_STRUCT__entry(
> > > +               __field(int, minor)
> > > +               __field(u32, hw_cycles)
> > > +       ),
> > > +
> > > +       TP_fast_assign(
> > > +               __entry->minor = ctx->fh.vdev->minor;
> > Tracking performance per minor doesn't seem useful,
> > we'd like to track per-fd (i.e. per context).
>
> This part of the driver doesn't know for which fd the decoding job is done
> so impossible to add it there.
>

Maybe you can explore using struct v4l2_m2m_ctx.
There's an RFC where this is discussed:

https://lore.kernel.org/linux-media/20210517183801.1255496-1-emil.l.velikov@xxxxxxxxx/

Kindly,
Ezequiel