Re: [PATCH v6 01/12] tools lib traceevent: Convert remaining %p[fF] users to %p[sS]

From: Steven Rostedt
Date: Mon Sep 16 2019 - 10:38:00 EST


On Mon, 16 Sep 2019 14:41:59 +0300
Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> wrote:

> > Well, if you think that works, OK great.
> >
> > But could that work?
> > How would an individual trace record know if
> > another trace record used %pfw?
> >
> > Perhaps not reusing %pf, marking it reserved
> > for a period of years, and using another unused
> > prefix %p<type> like %pnfw may be simpler.
>
> %p[Ff]w does not exist (I grepped for it) in older kernels since v3.0. So
> kernel support for %p[fF] and %pfw are mutually exclusive. If you're ok
> with that, I could change the patch to check %pf isn't followed by 'w',
> in order to support %pf on older kernels.

I think that's what I suggested to do.

>
> Although that still does not address using older tooling on newer kernels
> with support for %pfw.

That should be fine. I don't think it will crash those tools, they will
just give out wrong information, and if people complain, we can try to
get them to use the newer version of those tools ;-) (hopefully they
don't complain to Linus).

>
> If you think that's an issue, I'll opt for another extension than %pfw,
> which I chose originally since it's memorable --- fw for fwnode (names,
> paths, and probably more in the future).
>

I'm fine with the switch, as long as newer tools know how to handle it.

Make sure we also add a comment in the Linux kernel code that states
that older kernels use to have 'f' and 'F' and that new tools look for
'fw' to denote that this isn't an older kernel. This way, people will
hopefully not add another 'fX' pointer name.

-- Steve