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

From: Pengpeng Hou

Date: Tue Apr 07 2026 - 21:39:39 EST


Hi Steve,

Thanks for looking at this.

I believe this path is reachable.

field->system is set when a VAR_REF is created with an event-qualified
reference. The assignment happens in init_var_ref(), which is called
from create_var_ref().

The parser accepts fully qualified references of the form

system.event.$var

and parse_expr() passes the parsed system/event strings into
create_var_ref(). trace_action_create() also accepts explicitly
qualified action parameters in the same form and passes those strings
into create_var_ref().

This is also documented in Documentation/trace/histogram.rst:

fully-qualified name is of the form 'system.event_name.$var_name'
or 'system.event_name.field'.

The path is user-visible because reading back the trigger goes through

event_hist_trigger_print() -> hist_field_print() -> hist_field_name()

so creating a hist trigger that uses an inter-event variable reference
in fully qualified form is enough to exercise it.

So I don't think this is dead code. If you would prefer a different way
of handling the printed name, I can respin accordingly, but I don't
think the current branch is unreachable.

Thanks,
Pengpeng