[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251030052548.31130e33@gandalf.local.home>
Date: Thu, 30 Oct 2025 05:25:48 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Mark Rutland <mark.rutland@....com>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v6 0/2] tracing: Add an option to show symbols in
 _text+offset for function profiler
On Thu, 30 Oct 2025 12:30:05 +0900
"Masami Hiramatsu (Google)" <mhiramat@...nel.org> wrote:
>  kernel/trace/blktrace.c              |    6 +
>  kernel/trace/ftrace.c                |   26 ++++++
>  kernel/trace/trace.c                 |  154 +++++++++++++++++-----------------
>  kernel/trace/trace.h                 |   40 +++++----
>  kernel/trace/trace_events.c          |    4 -
>  kernel/trace/trace_events_synth.c    |    2 
>  kernel/trace/trace_fprobe.c          |    6 +
>  kernel/trace/trace_functions_graph.c |   18 ++--
>  kernel/trace/trace_irqsoff.c         |   30 +++----
>  kernel/trace/trace_kdb.c             |    2 
>  kernel/trace/trace_kprobe.c          |    6 +
>  kernel/trace/trace_output.c          |   18 ++--
>  kernel/trace/trace_sched_wakeup.c    |   24 +++--
>  kernel/trace/trace_syscalls.c        |    4 -
>  kernel/trace/trace_wprobe.c          |    2 
I didn't realize this affected your branch too. Which means I can't apply
this to any branch.
Also, could you make a helper function...
+++ b/kernel/trace/trace_wprobe.c
@@ -260,7 +260,7 @@ print_wprobe_event(struct trace_iterator *iter, int flags,
 
        trace_seq_printf(s, "%s: (", trace_probe_name(tp));
 
-       if (!seq_print_ip_sym(s, field->ip, flags | TRACE_ITER_SYM_OFFSET))
+       if (!seq_print_ip_sym(s, field->ip, flags | TRACE_ITER(SYM_OFFSET)))
                goto out;
 
        trace_seq_putc(s, ')');
that both fprobe and wprobe use? And then you don't need to have this open
coded everywhere.
That is, add this patch:
diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
index 591adc9bb1e9..bd26004cc320 100644
--- a/kernel/trace/trace_probe.h
+++ b/kernel/trace/trace_probe.h
@@ -598,3 +598,9 @@ struct uprobe_dispatch_data {
 	struct trace_uprobe	*tu;
 	unsigned long		bp_addr;
 };
+
+static inline int probe_print_ip_sym(struct trace_seq *s, unsigned long ip,
+				     int flags)
+{
+	retun seq_print_ip_sym(s, field->ip, flags | TRACE_ITER_SYM_OFFSET);
+}
And use that instead.
So, new plan. Base this patch on top of v6.18-rc3 and send that.
Then what we can do is merge this branch into your branch and my branch and
add on top of it.
Note, you should have rebased your probe branch on top of one of the
v6.18-rc releases. It's still based on top of 6.17-rc6, which can cause
other issues.
-- Steve
Powered by blists - more mailing lists
 
