All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v10 2/9] tracing/probes: Support dumping fetcharg program for debugging dynamic events
Date: Fri, 26 Jun 2026 13:21:56 +0900	[thread overview]
Message-ID: <20260626132156.5fe3c5daee235a8a3b1739d6@kernel.org> (raw)
In-Reply-To: <178243984380.790911.16958862880276016609.stgit@devnote2>

Sashiko made a good comment:

> commit ce5985c5ce46daa952ae907992e02e403e601c04
> Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> tracing/probes: Support dumping fetcharg program for debugging dynamic events
> This commit introduces a new configuration option
> CONFIG_PROBE_EVENTS_DUMP_FETCHARG to debug dynamic events. When enabled, it
> appends commented lines containing the fetch instructions to dynamic events in
> tracefs files. This helps in verifying the compiled fetch instructions for
> each probe argument.
> > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> > index a8420e6abb56a..cfa807d8e760f 100644
> > --- a/kernel/trace/trace_kprobe.c
> > +++ b/kernel/trace/trace_kprobe.c
> > @@ -1320,6 +1320,8 @@ static int trace_kprobe_show(struct seq_file *m, struct dyn_event *ev)
> >  		seq_printf(m, " %s=%s", tk->tp.args[i].name, tk->tp.args[i].comm);
> >  	seq_putc(m, '\n');
> >  
> > +	trace_probe_dump_args(m, &tk->tp);
> > +
> Does enabling CONFIG_PROBE_EVENTS_DUMP_FETCHARG break in-tree userspace tools
> that parse kprobe_events?
> For example, perf probe reads the kprobe_events file directly. It passes
> the unexpected # lines to parse_probe_trace_command() in
> tools/perf/util/probe-file.c:__probe_file__get_namelist(), which returns
> -EINVAL and immediately aborts the event listing process.
> Similarly, the ftrace2bconf script does not ignore # lines when reading
> kprobe_events, which leads it to mistakenly emit invalid bootconfig syntax
> in tools/bootconfig/scripts/ftrace2bconf.sh:kprobe_event_options()
> (e.g. ftrace.event.kprobes.#.probes += ...).

Yeah, those tools needs to be updated. Anyway, the tools which reads the
files in tracefs should skip the lines started with #, Those are comment
lines. (e.g. trace file, hist file, etc.)

Thanks,

-- 
Masami Hiramatsu

  reply	other threads:[~2026-06-26  4:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  2:10 [PATCH v10 0/9] tracing/probes: Add more typecast features Masami Hiramatsu (Google)
2026-06-26  2:10 ` [PATCH v10 1/9] tracing/probes: Allow eprobe to use variable without $ prefix Masami Hiramatsu (Google)
2026-06-26  2:10 ` [PATCH v10 2/9] tracing/probes: Support dumping fetcharg program for debugging dynamic events Masami Hiramatsu (Google)
2026-06-26  4:21   ` Masami Hiramatsu [this message]
2026-06-26  2:10 ` [PATCH v10 3/9] tracing/probes: Support typecast for various probe events Masami Hiramatsu (Google)
2026-06-26  2:11 ` [PATCH v10 4/9] tracing/probes: Support nested typecast Masami Hiramatsu (Google)
2026-06-26  2:11 ` [PATCH v10 5/9] tracing/probes: Type casting always involves nested calls Masami Hiramatsu (Google)
2026-06-26  2:11 ` [PATCH v10 6/9] tracing/probes: Support field specifier option for typecast Masami Hiramatsu (Google)
2026-06-26  2:11 ` [PATCH v10 7/9] tracing/probes: Add $current variable support Masami Hiramatsu (Google)
2026-06-26  2:11 ` [PATCH v10 8/9] tracing/probes: Add this_cpu_read() and this_cpu_ptr() dereference method to fetcharg Masami Hiramatsu (Google)
2026-06-26  2:11 ` [PATCH v10 9/9] tracing/probes: Add a new testcase for BTF typecasts Masami Hiramatsu (Google)

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=20260626132156.5fe3c5daee235a8a3b1739d6@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.