[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f600edd0-8855-46af-98ec-1181db1f5dd4@efficios.com>
Date: Wed, 5 Mar 2025 08:53:43 -0500
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Huang Shijie <shijie@...amperecomputing.com>, rostedt@...dmis.org
Cc: patches@...erecomputing.com, cl@...ux.com, yang@...amperecomputing.com,
peterz@...radead.org, jpoimboe@...nel.org, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH resend ] tracepoint: Print the function symbol when
tracepoint_debug is set
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@...ux.com>
> Signed-off-by: Huang Shijie <shijie@...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
Powered by blists - more mailing lists