Re: [PATCH v2 1/2] tracing/hist: rebuild full_name on each hist_field_name() call

Tom Zanussi
2026-04-08T17:18:03Z

On Wed, 2026-04-08 at 12:25 -0400, Steven Rostedt wrote:
> On Wed, 08 Apr 2026 10:58:06 -0500
> Tom Zanussi <zanussi@kernel.org> wrote:
>
> Hi Tom,
>
> > ->system is set when using fully-qualified variable names. For
> > instance:
> >
> > echo 'hist:keys=pid:ts0=common_timestamp.usecs' >> sys/kernel/debug/tracing/events/sched/sched_waking/trigger
> > echo 'hist:keys=pid:ts0=common_timestamp.usecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger
> > echo 'hist:keys=next_pid:lat0=common_timestamp.usecs-sched.sched_waking.$ts0:lat1=common_timestamp.usecs-sched.sched_wakeup.$ts0' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
> > echo 'hist:keys=next_pid:vals=$lat0,$lat1' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger
> >
> > Here, the sched_switch trigger would error out if the unqualified $ts0
> > variables were used instead of the fully-qualified ones because there's
> > no way to distinguish which $ts0 was meant.
> >
>
> Yep I see that now. I never had a need to use it before, but I probably
> should implement this in libtracefs to be safe.
>
> We should definitely add a selftest that tests this. There's one case that
> does use it but it doesn't use multiple ones. We should add a test that
> does so.
>
> trigger-multi-actions-accept.tc has the system, but it's not needed here.
>
> We should also have a test to test the output of theses lines.

Yeah, definitely. I can try adding this as a test..

Tom

>
> -- Steve