public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] tracing/hist: rebuild full_name on each hist_field_name() call
Date: Tue, 7 Apr 2026 22:14:37 -0400	[thread overview]
Message-ID: <20260407221437.786b42f7@gandalf.local.home> (raw)
In-Reply-To: <20260408101500.1-tracing-hist-reachability-reply-pengpeng@iscas.ac.cn>

On Wed, 8 Apr 2026 10:15:00 +0800
Pengpeng Hou <pengpeng@iscas.ac.cn> wrote:

> 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'.

Ah I read the document and missed this part. Thanks for pointing it out.

None of our tests use this, so that definitely needs to be fixed.

OK, yeah I can trigger that path now. I'll continue looking at the patch.

Thanks,

-- Steve


> 
> 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
> 


  reply	other threads:[~2026-04-08  2:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29  3:09 [PATCH 1/2] tracing/hist: bound full field-name construction Pengpeng Hou
2026-03-29 18:39 ` Steven Rostedt
2026-03-30  2:46 ` [PATCH v2 1/2] tracing/hist: rebuild full_name on each hist_field_name() call Pengpeng Hou
2026-03-30 14:22   ` Steven Rostedt
2026-04-01 11:22 ` Pengpeng Hou
2026-04-08  1:05   ` Steven Rostedt
2026-04-08 15:58     ` Tom Zanussi
2026-04-08 16:25       ` Steven Rostedt
2026-04-08 17:18         ` Tom Zanussi
2026-04-08  2:15   ` Pengpeng Hou
2026-04-08  2:14     ` Steven Rostedt [this message]
2026-04-13 22:38   ` Tom Zanussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260407221437.786b42f7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=tom.zanussi@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox