From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Huang Shijie <shijie@os.amperecomputing.com>, rostedt@goodmis.org
Cc: patches@amperecomputing.com, cl@linux.com,
yang@os.amperecomputing.com, peterz@infradead.org,
jpoimboe@kernel.org, linux-kernel@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH resend ] tracepoint: Print the function symbol when tracepoint_debug is set
Date: Wed, 5 Mar 2025 08:53:43 -0500 [thread overview]
Message-ID: <f600edd0-8855-46af-98ec-1181db1f5dd4@efficios.com> (raw)
In-Reply-To: <20250305015505.14493-1-shijie@os.amperecomputing.com>
On 2025-03-04 20:55, Huang Shijie wrote:
> When tracepoint_debug is set, we may get the output in kernel log:
> [ 380.013843] Probe 0 : 00000000f0d68cda
>
> It is not readable, so change to print the function symbol.
> After this patch, the output may becomes:
> [ 54.930567] Probe 0 : perf_trace_sched_wakeup_template
What would it print if the address is corrupted ?
Perhaps we could do like the backtrace code and print e.g.
[<00000000f0d68cda>] perf_trace_sched_wakeup_template+0xNN/0xMM
?
I don't care about the actual layout, but removing the address
from the formatted output appears to be removing useful data
in debug situations.
Thanks,
Mathieu
>
> Reviewed-by: Christoph Lameter <cl@linux.com>
> Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
> ---
> kernel/tracepoint.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
> index 1848ce7e2976..82bef4b9400a 100644
> --- a/kernel/tracepoint.c
> +++ b/kernel/tracepoint.c
> @@ -127,7 +127,7 @@ static void debug_print_probes(struct tracepoint_func *funcs)
> return;
>
> for (i = 0; funcs[i].func; i++)
> - printk(KERN_DEBUG "Probe %d : %p\n", i, funcs[i].func);
> + printk(KERN_DEBUG "Probe %d : %ps\n", i, funcs[i].func);
> }
>
> static struct tracepoint_func *
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
next prev parent reply other threads:[~2025-03-05 13:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 1:55 Huang Shijie
2025-03-05 13:53 ` Mathieu Desnoyers [this message]
2025-03-05 15:47 ` Steven Rostedt
2025-03-06 2:26 ` Shijie Huang
2025-03-06 3:37 ` Shijie Huang
2025-03-06 15:13 ` Steven Rostedt
2025-03-06 16:37 ` Mathieu Desnoyers
2025-03-07 3:03 ` Shijie Huang
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=f600edd0-8855-46af-98ec-1181db1f5dd4@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=cl@linux.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=patches@amperecomputing.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shijie@os.amperecomputing.com \
--cc=yang@os.amperecomputing.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
all inboxes | Powered by JetHome®