Re: [PATCH resend ] tracepoint: Print the function symbol when tracepoint_debug is set

From: Shijie Huang
Date: Wed Mar 05 2025 - 21:26:58 EST



On 2025/3/5 23:47, Steven Rostedt wrote:
On Wed, 5 Mar 2025 08:53:43 -0500
Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> wrote:

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.

Perhaps this can use "%pS" which shows both the function entry and the

okay, I can change it to use "%pS" in next version if we think it is good enough:

     [   55.225555] Probe 0 : perf_trace_sched_wakeup_template+0x0/0x20


Thanks

Huang Shijie