* [PATCH] tracepoint: Print the function symbol when tracepoint_debug is set
@ 2025-03-04 10:18 Huang Shijie
2025-03-04 15:33 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Huang Shijie @ 2025-03-04 10:18 UTC (permalink / raw)
To: rostedt
Cc: patches, cl, yang, mathieu.desnoyers, peterz, jpoimboe,
linux-kernel, Huang Shijie
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
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 *
--
2.40.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] tracepoint: Print the function symbol when tracepoint_debug is set
2025-03-04 10:18 [PATCH] tracepoint: Print the function symbol when tracepoint_debug is set Huang Shijie
@ 2025-03-04 15:33 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2025-03-04 15:33 UTC (permalink / raw)
To: Huang Shijie
Cc: patches, cl, yang, mathieu.desnoyers, peterz, jpoimboe, linux-kernel
Can you resend this with linux-trace-kernel@vger.kernel.org please.
I probably should update the MAINTAINERS file and place this and
include/linux/tracepoint.h under TRACING.
-- Steve
On Tue, 4 Mar 2025 18:18:43 +0800
Huang Shijie <shijie@os.amperecomputing.com> 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
>
> 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 *
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-04 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04 10:18 [PATCH] tracepoint: Print the function symbol when tracepoint_debug is set Huang Shijie
2025-03-04 15:33 ` Steven Rostedt
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®