Re: perf-trace: improving ioctl details

From: Namhyung Kim

Date: Thu Feb 19 2026 - 13:49:46 EST


Hi David!

On Wed, Feb 18, 2026 at 04:34:33PM -0300, Arnaldo Melo wrote:
>
>
> On February 18, 2026 2:09:26 PM GMT-03:00, David Ahern <dsahern@xxxxxxxxxx> wrote:
> >Hi Arnaldo, Namhyung:
> >
> >I have a couple of patches to perf-trace to improve the details on ioctl
> >calls. The first one tracks stats by individual filenames, and for the
> >summary output prints the ioctl stats per filename.
> >
>
> Looks interesting!

Indeed.

>
>
> >The second patch improves the output for the _IOC_NR element of the op
> >argument. For flexibility across kernel versions and drivers, it adds
> >the ability to read input files that contain the conversion from number
> >to human readable name. The files (if the option is set) are parsed at
> >start up. In addition to the summary, the cache is also used to improve
> >the readability of each ioctl line.
> >
> >Questions for you:
> >1. is such an open ended design acceptable for perf-trace?
>
> Is it lazy, i.e. only when needed this cache/table gets loaded?

I think it's ok. But I'm curious what's the actual usecases.. do you
want it for testing kernels and drivers? I guess we can have a default
table for regular users and provide the option for kernel developers.

>
> >
> >2. if yes, is there any preference on file format (json, yaml,
> >key-value, ...)?
>
> We already have JSON parsing infra, so probably that is better?

JSON should be fine, although it's a bit verbose. I'm fine with plain
KEY=VALUE format too if it's really a simple mapping.

>
> Great to see you contributing to perf again!

+1

Thanks,
Namhyung